summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/FoldingSet.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120298
* Aligned and unaligned copies of the same stringDale Johannesen2010-11-191-7/+22
| | | | | | | were not hashing to the same value. Analysis and patch by Frits van Bommel! llvm-svn: 119770
* Use Bits.data() instead of &Bits[0].Dan Gohman2010-08-241-3/+3
| | | | llvm-svn: 111993
* Add hooks to FoldingSetTrait to allow specializations to provideDan Gohman2010-08-161-35/+52
| | | | | | | | implementations of equality comparison and hash computation. This can be used to optimize node lookup by avoiding creating lots of temporary ID values just for hashing and comparison purposes. llvm-svn: 111130
* Reverse the order of GetNodeProfile's arguments, for consistencyDan Gohman2010-08-161-4/+4
| | | | | | with FoldingSetTrait::Profile. llvm-svn: 111127
* Use calloc instead of new/memset, it is more efficient when the set is very ↵Benjamin Kramer2010-06-191-6/+14
| | | | | | large. llvm-svn: 106390
* Add the ability to "intern" FoldingSetNodeID data into aDan Gohman2010-03-181-0/+10
| | | | | | | | | | | | BumpPtrAllocator-allocated region to allow it to be stored in a more compact form and to avoid the need for a non-trivial destructor call. Use this new mechanism in ScalarEvolution instead of FastFoldingSetNode to avoid leaking memory in the case where a FoldingSetNodeID uses heap storage, and to reduce overall memory usage. llvm-svn: 98829
* Switch FoldingSet::AddString to StringRef based API.Daniel Dunbar2009-09-221-11/+3
| | | | | | - This also fixes a dereference of std::string::end, which makes MSVC unhappy and was causing all the static analyzer clang tests to fail. llvm-svn: 82517
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-1/+1
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+2
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Add an API for strings with possible NULLs in the middle. Refactor the otherNick Lewycky2009-02-071-37/+8
| | | | | | two AddString methods to use it. llvm-svn: 64005
* Do not use host floating point types when emittingDale Johannesen2009-01-211-6/+0
| | | | | | | | | ASCII IR; loading and storing these can change the bits of NaNs on some hosts. Remove or add warnings at a few other places using host floating point; this is a bad thing to do in general. llvm-svn: 62712
* Overload AddInteger on int/long/long long instead of on int/int64_t,Dan Gohman2008-11-031-6/+16
| | | | | | | to avoid overload ambiguities. This fixes build errors introduced by r58623. llvm-svn: 58632
* Add a clear() method to FoldingSet.Dan Gohman2008-08-231-12/+13
| | | | llvm-svn: 55210
* Avoid repeatedly reallocating the FoldingSetNodeID when searchingDan Gohman2008-08-121-2/+4
| | | | | | through multiple nodes in a bucket. llvm-svn: 54687
* Add a version of AddString that takes a const char* so we can avoid extraneousOwen Anderson2008-07-011-0/+38
| | | | | | conversions to std::string. llvm-svn: 52995
* Consistently set "Buckets[NumBuckets] = reinterpret_cast<void*>(-1)" ↵Ted Kremenek2008-06-171-1/+1
| | | | | | throughout FoldingSet.cpp. llvm-svn: 52425
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-2/+2
| | | | llvm-svn: 50659
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-0/+1
| | | | | | annoying warnings. llvm-svn: 47367
* Fixed bug in FoldingSetIteratorImpl where we did not correctly check ifTed Kremenek2008-02-151-2/+4
| | | | | | | we had reached the "fake bucket" after the last bucket, allowing the iterator in some cases to run off the end of the hashtable. llvm-svn: 47178
* Added "Profile" method to APFloat for use with FoldingSet.Ted Kremenek2008-02-111-11/+0
| | | | | | | | | | Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary objects to a profile via dispatch to FoldingSetTrait<T>::Profile(). Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their functionality is now replaced using the above mentioned member template. llvm-svn: 46957
* Add support to FoldingSet for hashing APInt objects.Dan Gohman2008-02-061-0/+4
| | | | llvm-svn: 46833
* Added "bucket_iterators" to FoldingSet. Bucket iterators allow iterationTed Kremenek2008-02-041-1/+7
| | | | | | over all the nodes in a particular bucket. llvm-svn: 46716
* Fixed 80 col. violation.Ted Kremenek2008-02-041-2/+4
| | | | llvm-svn: 46709
* Made 'FoldingSetNodeID' a proper class instead of a nested class inTed Kremenek2008-01-191-19/+19
| | | | | | | | | | 'FoldingSetNodeImpl' (previously 'FoldingSetNodeID' was a typedef of 'FoldingSetNodeImpl::NodeID'). Why? Clients can now easily forward declare 'FoldingSetNodeID' without having to include FoldingSet.h. llvm-svn: 46187
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Change a #include into a forward declarationChris Lattner2007-10-091-0/+1
| | | | llvm-svn: 42781
* Add initial iterator support for folding set.Chris Lattner2007-10-031-0/+32
| | | | llvm-svn: 42589
* Simplify implementation of the FoldingSet circular list, a necessary stepChris Lattner2007-10-031-11/+20
| | | | | | to giving it iterators. llvm-svn: 42586
* fix a gcc warning: comparison between signed and unsigned integer expressionsChris Lattner2007-09-141-1/+1
| | | | llvm-svn: 41972
* Remove the assumption that FP's are either float orDale Johannesen2007-09-141-0/+6
| | | | | | | | | | | | | double from some of the many places in the optimizers it appears, and do something reasonable with x86 long double. Make APInt::dump() public, remove newline, use it to dump ConstantSDNode's. Allow APFloats in FoldingSet. Expand X86 backend handling of long doubles (conversions to/from int, mostly). llvm-svn: 41967
* And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoidDan Gohman2007-09-141-0/+3
| | | | | | ambiguity. llvm-svn: 41960
* remove folding set debug outputChris Lattner2007-02-241-4/+0
| | | | llvm-svn: 34549
* Encode small integers more densely in foldingset, avoiding overflowing the ↵Chris Lattner2007-02-041-1/+4
| | | | | | SmallVector as often. llvm-svn: 33864
* improve comments, add an assertionChris Lattner2007-02-011-3/+6
| | | | llvm-svn: 33750
* Add some debug output.Reid Spencer2007-01-311-0/+4
| | | | llvm-svn: 33718
* minor cleanups. Fix off-by-one in accounting the number of nodes when theChris Lattner2007-01-311-4/+5
| | | | | | table grows. llvm-svn: 33698
* reformat commentChris Lattner2007-01-301-2/+2
| | | | llvm-svn: 33675
* assert.h -> cassertRafael Espindola2006-11-031-1/+1
| | | | llvm-svn: 31399
* #include <assert.h>Rafael Espindola2006-11-021-0/+1
| | | | llvm-svn: 31386
* Allow FoldingSet clients to pump up the initial hash size.Jim Laskey2006-11-021-2/+4
| | | | llvm-svn: 31377
* Try again.Jim Laskey2006-10-291-1/+4
| | | | llvm-svn: 31278
* Not handling zero length strings.Jim Laskey2006-10-291-2/+2
| | | | llvm-svn: 31277
* SmallVector append not insert.Jim Laskey2006-10-271-5/+1
| | | | llvm-svn: 31224
* Grrr.Jim Laskey2006-10-271-1/+1
| | | | llvm-svn: 31223
* Temp patch for missing functionality.Jim Laskey2006-10-271-0/+4
| | | | llvm-svn: 31222
* MathExtras isn't in the llvm/ADT directory but in the llvm/Support directory.Bill Wendling2006-10-271-1/+1
| | | | llvm-svn: 31219
* Apply editorials.Jim Laskey2006-10-271-43/+55
| | | | llvm-svn: 31218
* Breakout folding hash set from SelectionDAGCSEMap.Jim Laskey2006-10-271-0/+282
llvm-svn: 31215
OpenPOWER on IntegriCloud