aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/SmallPtrSet.h
Commit message (Collapse)AuthorAgeFilesLines
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-231-4/+6
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-021-5/+10
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for rebase to r212749.Stephen Hines2014-07-211-2/+3
| | | | | | | Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
* Update to LLVM 3.5a.Stephen Hines2014-04-241-38/+70
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* Add warn_unused_result to empty() on various containers.Benjamin Kramer2013-09-131-1/+1
| | | | | | empty() doesn't actually empty out the container, making this a common typo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190708 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallVector and SmallPtrSet allocations now power-of-two aligned.Jean-Luc Duprat2013-03-291-16/+15
| | | | | | | | This time tested on both OSX and Linux. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178377 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Fix allocations of SmallVector and SmallPtrSet so they are more ↵Rafael Espindola2013-03-291-15/+16
| | | | | | | | | | | | | | | | | prone to" This reverts commit 617330909f0c26a3f2ab8601a029b9bdca48aa61. It broke the bots: /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:150: PushPopTest /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:118: Failure Value of: v[i].getValue() Actual: 0 Expected: value Which is: 2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178334 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix allocations of SmallVector and SmallPtrSet so they are more prone toJean-Luc Duprat2013-03-291-16/+15
| | | | | | | | being power-of-two sized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178332 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment ↵Craig Topper2012-09-161-3/+4
| | | | | | operators that aren't implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164006 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallPtrSet: Reuse DenseMapInfo's pointer hash function instead of inventing ↵Benjamin Kramer2012-04-181-3/+0
| | | | | | | | | | a bad one ourselves. DenseMap's hash function uses slightly more entropy and reduces hash collisions significantly. I also experimented with Hashing.h, but it didn't gave a lot of improvement while being much more expensive to compute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154996 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallPtrSet: Provide a more efficient implementation of swap than the ↵Benjamin Kramer2012-03-061-0/+16
| | | | | | | | | default triple-copy std::swap. This currently assumes that both sets have the same SmallSize to keep the implementation simple, a limitation that can be lifted if someone cares. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152143 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent infinite growth of SmallPtrSet instances.Jakob Stoklund Olesen2011-03-301-1/+1
| | | | | | | | Rehash but don't grow when full of tombstones. Patch by José Fonseca! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128566 91177308-0d34-0410-b5e6-96231b3b80d8
* Spelling fix: consequtive -> consecutive.Duncan Sands2011-02-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125563 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing standard headers. Patch by Joerg Sonnenberger!Nick Lewycky2010-12-191-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122193 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename NextPowerOfTwo to RoundUpToPowerOfTwo.Duncan Sands2010-06-301-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107297 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify that the NextPowerOfTwo template is idempotent.Duncan Sands2010-06-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107286 91177308-0d34-0410-b5e6-96231b3b80d8
* Rather than giving SmallPtrSetImpl a member field SmallArray which is magicallyDuncan Sands2010-06-301-12/+14
| | | | | | | | | | | | | | | | | replaced by a bigger array in SmallPtrSet (by overridding it), instead just use a pointer to the start of the storage, and have SmallPtrSet pass in the value to use. This has the disadvantage that SmallPtrSet becomes bigger by one pointer. It has the advantage that it no longer uses tricky C++ rules, and is clearly correct while I'm not sure the previous version was. This was inspired by g++-4.6 pointing out that SmallPtrSetImpl was writing off the end of SmallArray, which it was. Since SmallArray is replaced with a bigger array in SmallPtrSet, the write was still to valid memory. But it was writing off the end of the declared array type - sounds kind of dubious to me, like it sounded dubious to g++-4.6. Maybe g++-4.6 is wrong and this construct is perfectly valid and correctly compiled by all compilers, but I think it is better to avoid the whole can of worms by avoiding this construct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107285 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a buffer overflow noticed by gcc-4.6: zero is written intoDuncan Sands2010-06-291-1/+1
| | | | | | | | | | | | | | | SmallArray[SmallSize] in the SmallPtrSetIteratorImpl, and this is one off the end of the array. For those who care, right now gcc warns about writing off the end because it is confused about the declaration of SmallArray as having length 1 in the parent class SmallPtrSetIteratorImpl. However if you tweak code to unconfuse it, then it still warns about writing off the end of the array, because of this buffer overflow. In short, even with this fix gcc-4.6 will warn about writing off the end of the array, but now that is only because it is confused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107200 91177308-0d34-0410-b5e6-96231b3b80d8
* NextPowerOfTwo was already used to ensure that SmallSizePowTwo is a powerDuncan Sands2010-06-291-3/+2
| | | | | | | of two, no need to do it a second time (NextPowerOfTwo is idempotent). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107199 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment typo.Bob Wilson2010-02-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96027 91177308-0d34-0410-b5e6-96231b3b80d8
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-261-1/+1
| | | | | | | direct inclusion edge from System to Support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SmallPtrSet iterators real iteratorsDouglas Gregor2009-07-081-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75073 91177308-0d34-0410-b5e6-96231b3b80d8
* rename PointerLikeTypeInto to PointerLikeTypeTraits, add trait for Chris Lattner2009-03-291-27/+3
| | | | | | | # low bits free, and move to its own header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67973 91177308-0d34-0410-b5e6-96231b3b80d8
* declare everything as class to avoid angering the VC++ gods.Chris Lattner2009-03-281-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67931 91177308-0d34-0410-b5e6-96231b3b80d8
* add a traits class for SmallPtrSet that allows us to stick things that areChris Lattner2009-03-281-5/+36
| | | | | | | "basically pointers" into it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67930 91177308-0d34-0410-b5e6-96231b3b80d8
* Change several SmallPtrSetImpl members from public to protected,Dan Gohman2009-02-071-8/+11
| | | | | | | to make the encapsulation more clear. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64017 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed trailing whitespace.Misha Brukman2009-01-091-24/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62000 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords.Dan Gohman2008-03-251-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* make smallptrset more const and type correct, which caught a fewChris Lattner2007-11-061-13/+28
| | | | | | | minor bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43782 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
* When clearing a SmallPtrSet, if the set had a huge capacity, but theChris Lattner2007-08-051-2/+8
| | | | | | | | | | | 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
* 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
* 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
* 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
* Fix PR1329.Jeff Cohen2007-04-141-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36016 91177308-0d34-0410-b5e6-96231b3b80d8
* add range version of insert()Chris Lattner2007-04-021-2/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35572 91177308-0d34-0410-b5e6-96231b3b80d8
* add iterator range version of ctor.Chris Lattner2007-03-041-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34899 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1234 by working around a compiler bug.Chris Lattner2007-03-021-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34845 91177308-0d34-0410-b5e6-96231b3b80d8
* do not let the table fill up with tombstones.Chris Lattner2007-02-071-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33973 91177308-0d34-0410-b5e6-96231b3b80d8
* provide a definition for uintptr_tChris Lattner2007-01-271-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33592 91177308-0d34-0410-b5e6-96231b3b80d8
* add some missing APIChris Lattner2007-01-271-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33583 91177308-0d34-0410-b5e6-96231b3b80d8
* implement SmallPtrSet::eraseChris Lattner2007-01-271-3/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33581 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a limitation of SmallPtrSet. Before it would assert if the smallsizeChris Lattner2007-01-271-2/+30
| | | | | | | was not a power of two. Now it rounds up to the next power of two internally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33580 91177308-0d34-0410-b5e6-96231b3b80d8
* add some comments on the algorithmChris Lattner2007-01-271-1/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33579 91177308-0d34-0410-b5e6-96231b3b80d8