aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
Commit message (Collapse)AuthorAgeFilesLines
* Enhance APFloat to retain bits of NaNs (fixes oggenc).Dale Johannesen2007-08-312-4/+18
| | | | | | | | Use APFloat interfaces for more references, mostly of ConstantFPSDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41632 91177308-0d34-0410-b5e6-96231b3b80d8
* getMinSignedBits needs to take into consider the sign bit when the value is ↵Chris Lattner2007-08-291-1/+1
| | | | | | positive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41566 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords and remove spurious trailing semicolons.Dan Gohman2007-08-271-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41482 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment out declaration of operator== (undefined).Dale Johannesen2007-08-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41383 91177308-0d34-0410-b5e6-96231b3b80d8
* Poison APFloat::operator==. Replace existing uses with bitwiseIsEqual.Dale Johannesen2007-08-241-6/+6
| | | | | | | | This means backing out the preceding change to Constants.cpp, alas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41378 91177308-0d34-0410-b5e6-96231b3b80d8
* Revised per review feedback from previous patch.Dale Johannesen2007-08-241-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41353 91177308-0d34-0410-b5e6-96231b3b80d8
* Change internal representation of ConstantFP to use APFloat.Dale Johannesen2007-08-241-1/+15
| | | | | | | | Interface to rest of the compiler unchanged, as yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41348 91177308-0d34-0410-b5e6-96231b3b80d8
* default this to radix 10 like the toString(Un)Signed methods.Chris Lattner2007-08-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41311 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid hiding issues.Chris Lattner2007-08-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41310 91177308-0d34-0410-b5e6-96231b3b80d8
* rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()Chris Lattner2007-08-232-1/+7
| | | | | | | | Add an APSInt::toString() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41309 91177308-0d34-0410-b5e6-96231b3b80d8
* initial checkin of Neil's APFloat work.Chris Lattner2007-08-202-3/+262
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41203 91177308-0d34-0410-b5e6-96231b3b80d8
* add reverse iterators to smallvectorChris Lattner2007-08-201-3/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41198 91177308-0d34-0410-b5e6-96231b3b80d8
* improve iplist comments. Switch iplist from allocating its sentinal object ↵Chris Lattner2007-08-171-17/+56
| | | | | | | | | | | (for end()) eagerly to allocating it lazily. This saves a lot of memory for JIT applications that read a module but don't materialize most of the functions (e.g. 62K for 252.eon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41142 91177308-0d34-0410-b5e6-96231b3b80d8
* This adds a bunch of static functions that implement unsignedChris Lattner2007-08-161-0/+126
| | | | | | | | | | | | | two's complement bignum arithmetic. They could be used to implement much of APInt, but the idea is they are enough to implement APFloat as well, which the current APInt interface is not suited for. Patch by Neil Booth! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41124 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot a line.Owen Anderson2007-08-161-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41115 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a copy constructor and an assignment operator to DenseMap.Owen Anderson2007-08-161-1/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41114 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly use const qualifiersAnton Korobeynikov2007-08-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41111 91177308-0d34-0410-b5e6-96231b3b80d8
* Change casts from old style to new style. This helps document the detailsReid Spencer2007-08-122-14/+17
| | | | | | | | better, gives the compiler a chance to validate the cast and reduces warnings if the user turns on -Wold-style-cast option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41033 91177308-0d34-0410-b5e6-96231b3b80d8
* memcpy with zero length is hugely expensive, so avoid it. This speeds up ↵Chris Lattner2007-08-101-1/+5
| | | | | | coallescing from 1.17s to 0.88s on siod. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40984 91177308-0d34-0410-b5e6-96231b3b80d8
* small speedup in the case where a smallvector is default ctor'd fromChris Lattner2007-08-101-1/+2
| | | | | | | an empty vector. This speeds up llc slightly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40983 91177308-0d34-0410-b5e6-96231b3b80d8
* This fixes resizing issues with BitVectors. It ensures that the BitWord type ↵Chandler Carruth2007-08-061-11/+26
| | | | | | and type size is always used, and ensures completely correct clearing of unused high bits, and setting of bits when resizing. It should resolve PR1563. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40871 91177308-0d34-0410-b5e6-96231b3b80d8
* Document a missing parameter.Reid Spencer2007-08-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40852 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in DenseMap::clear, where we never reset a tombstoneChris Lattner2007-08-051-3/+5
| | | | | | | to EmptyKey. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40839 91177308-0d34-0410-b5e6-96231b3b80d8
* When clearing a SmallPtrSet, if the set had a huge capacity, but theChris Lattner2007-08-052-2/+10
| | | | | | | | | | | contents of the set were small, deallocate and shrink the set. This avoids having us to memset as much data, significantly speeding up some pathological cases. For example, this speeds up the verifier from 0.3899s to 0.0763 (5.1x) on the testcase from PR1432 in a release build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40837 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug spotted by Chris.Anders Carlsson2007-08-021-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40725 91177308-0d34-0410-b5e6-96231b3b80d8
* Add extend and extOrTrunc methods that do sign or zero extension depending ↵Anders Carlsson2007-08-021-0/+16
| | | | | | on whether the integer is signed or not git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40724 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow SmallPtrSet to hold pointers to const data.Owen Anderson2007-07-271-13/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40556 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable the string map copy ctor and assignment operators,Chris Lattner2007-07-221-1/+16
| | | | | | | | | | | they don't do the right thing. Implement StringMap::erase. Fix a nasty bug in the default ctor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40395 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the heuristic for shrinking DenseMap smarter.Owen Anderson2007-07-201-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40114 91177308-0d34-0410-b5e6-96231b3b80d8
* Have DenseMap auto-shrink itself on clear(). This improves the time to optimizeOwen Anderson2007-07-201-1/+36
| | | | | | | 403.gcc from 15.2s to 14.3s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40100 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build by putting calls to free into the implementation file andReid Spencer2007-07-171-4/+1
| | | | | | | having that implementation file #include <cstdlib>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39952 91177308-0d34-0410-b5e6-96231b3b80d8
* Use realloc() to (potentially) resize the contents of SmallPtrSet in place.Owen Anderson2007-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39926 91177308-0d34-0410-b5e6-96231b3b80d8
* add a helper method.Chris Lattner2007-07-151-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39885 91177308-0d34-0410-b5e6-96231b3b80d8
* Evidently my earlier fix did not go far enough. When resizing a zero-sizedOwen Anderson2007-07-101-1/+2
| | | | | | | BitVector, make sure to set or clear ALL of the bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38481 91177308-0d34-0410-b5e6-96231b3b80d8
* When resizing a BitVector with size 0, be sure to clear the low word before ↵Owen Anderson2007-07-091-0/+5
| | | | | | using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38476 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the assignment operator for SmallPtrSet return a reference, and fix a ↵Owen Anderson2007-07-091-1/+1
| | | | | | | | | | | long-standing bug in the copy ctor while I'm at it. Thanks to Chris Lattner for help with this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38470 91177308-0d34-0410-b5e6-96231b3b80d8
* work around an aparent gcc name resolution bug by Chris Lattner2007-07-091-2/+1
| | | | | | | detemplatizing this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38461 91177308-0d34-0410-b5e6-96231b3b80d8
* implement operator= for smallptrsetChris Lattner2007-07-091-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38460 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an explicit keyword. Thanks Chris!Dan Gohman2007-06-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37819 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert .cvsignore filesJohn Criswell2007-06-291-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37801 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a default parameter to a SmallVector constructor to allow it toDan Gohman2007-06-281-1/+1
| | | | | | | be called with just an initial length value, just like in std::vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37779 91177308-0d34-0410-b5e6-96231b3b80d8
* Have internal df_iterator's use SmallPtrSet instead of std::set. This ↵Owen Anderson2007-06-211-3/+5
| | | | | | provides compile time speedups to any pass using df_iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37694 91177308-0d34-0410-b5e6-96231b3b80d8
* silence some "comparison between signed and unsigned integer expressions"Chris Lattner2007-05-171-3/+3
| | | | | | | warnings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37177 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some sporadic segfaults that are triggered when SmallVector's heapDan Gohman2007-05-171-3/+3
| | | | | | | | | | storage lands near the end of the available address space. In the expression Begin+N > Capacity, the Begin+N was overflowing. Fix this by replacing it by with an expression that doesn't involve computation of an address beyond the end of allocated memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37171 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some things needed by the llvm-gcc version supporting bit accurate integerReid Spencer2007-05-131-0/+39
| | | | | | | | | | | | types: 1. Functions to compute div/rem at the same time. 2. Further assurance that an APInt with 0 bitwidth cannot be constructed. 3. Left and right rotate operations. 4. An exactLogBase2 function which requires an exact power of two or it returns -1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37025 91177308-0d34-0410-b5e6-96231b3b80d8
* This is a patch to fix a compile error in STLExtras.h, andChris Lattner2007-05-031-1/+1
| | | | | | | | | a bug in GraphWriter.cpp. Patch by Florian Brandner git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36684 91177308-0d34-0410-b5e6-96231b3b80d8
* remove useless type qualifiersChris Lattner2007-05-031-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36676 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename identifier that GCC uses as a macro, breaking llvm-gcc build.Jeff Cohen2007-04-261-22/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36474 91177308-0d34-0410-b5e6-96231b3b80d8
* add a missing operatorChris Lattner2007-04-231-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36375 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some VC++ warnings.Jeff Cohen2007-04-191-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36259 91177308-0d34-0410-b5e6-96231b3b80d8