Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2 |
|
#
480f5d26 |
| 26-Nov-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Lift self-copy protection up to the header file and add self-move protection to the same layer.
This is in line with Howard's advice on how best to handle self-move assignment as he explained on SO[
Lift self-copy protection up to the header file and add self-move protection to the same layer.
This is in line with Howard's advice on how best to handle self-move assignment as he explained on SO[1]. It also ensures that implementing swap with move assignment continues to work in the case of self-swap.
[1]: http://stackoverflow.com/questions/9322174/move-assignment-operator-and-if-this-rhs
llvm-svn: 195705
show more ...
|
#
2664317b |
| 26-Nov-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a self-memcpy which only breaks under Valgrind's memcpy implementation. Silliness, but it'll be a trivial performance optimization. This should clear up a failure on the vg_leak bot.
llvm-svn: 1
Fix a self-memcpy which only breaks under Valgrind's memcpy implementation. Silliness, but it'll be a trivial performance optimization. This should clear up a failure on the vg_leak bot.
llvm-svn: 195704
show more ...
|
#
c74010df |
| 20-Nov-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Make the moved-from SmallPtrSet be a valid, empty, small-state object. Enhance the tests to actually require moves in C++11 mode, in addition to testing the moved-from state. Further enhance the test
Make the moved-from SmallPtrSet be a valid, empty, small-state object. Enhance the tests to actually require moves in C++11 mode, in addition to testing the moved-from state. Further enhance the tests to cover copy-assignment into a moved-from object and moving a large-state object. (Note that we can't really test small-state vs. large-state as that isn't an observable property of the API really.) This should finish addressing review on r195239.
llvm-svn: 195261
show more ...
|
#
55758e96 |
| 20-Nov-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Give SmallPtrSet move semantics when we have R-value references. Somehow, this ADT got missed which is moderately terrifying considering the efficiency of move for it.
The code to implement move sem
Give SmallPtrSet move semantics when we have R-value references. Somehow, this ADT got missed which is moderately terrifying considering the efficiency of move for it.
The code to implement move semantics for it is pretty horrible currently but was written to reasonably closely match the rest of the code. Unittests that cover both copying and moving (at a basic level) added.
llvm-svn: 195239
show more ...
|
Revision tags: llvmorg-3.4.0-rc1 |
|
#
5de2378f |
| 18-Nov-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Fixing a possible memory leak from a failing realloc() call.
llvm-svn: 195018
|
Revision tags: llvmorg-3.3.1-rc1, llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1 |
|
#
89fe2470 |
| 29-Mar-2013 |
Jean-Luc Duprat <jduprat@apple.com> |
SmallVector and SmallPtrSet allocations now power-of-two aligned. This time tested on both OSX and Linux.
llvm-svn: 178377
|
#
de657514 |
| 29-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert "Fix allocations of SmallVector and SmallPtrSet so they are more prone to"
This reverts commit 617330909f0c26a3f2ab8601a029b9bdca48aa61.
It broke the bots:
/home/clangbuild2/clang-ppc64-2/l
Revert "Fix allocations of SmallVector and SmallPtrSet so they are more 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
llvm-svn: 178334
show more ...
|
#
67ce1472 |
| 29-Mar-2013 |
Jean-Luc Duprat <jduprat@apple.com> |
Fix allocations of SmallVector and SmallPtrSet so they are more prone to being power-of-two sized.
llvm-svn: 178332
|
Revision tags: llvmorg-3.2.0, llvmorg-3.2.0-rc3, llvmorg-3.2.0-rc2, llvmorg-3.2.0-rc1, llvmorg-3.1.0, llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2, llvmorg-3.1.0-rc1 |
|
#
94988cb3 |
| 18-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
SmallPtrSet: Reuse DenseMapInfo's pointer hash function instead of inventing a bad one ourselves.
DenseMap's hash function uses slightly more entropy and reduces hash collisions significantly. I al
SmallPtrSet: Reuse DenseMapInfo's pointer hash function instead of inventing 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.
llvm-svn: 154996
show more ...
|
#
22842f89 |
| 07-Mar-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Copy the right amount of elements.
llvm-svn: 152254
|
#
6e8d4b8e |
| 07-Mar-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
SmallPtrSet: Copy all the elements when swapping, not just numelements.
This fixes a build failure in webkit. Copying all elements shouldn't be necessary, I'll look out for a better fix soon.
llvm-
SmallPtrSet: Copy all the elements when swapping, not just numelements.
This fixes a build failure in webkit. Copying all elements shouldn't be necessary, I'll look out for a better fix soon.
llvm-svn: 152252
show more ...
|
#
e1c34e9f |
| 06-Mar-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
SmallPtrSet: Provide a more efficient implementation of swap than the default triple-copy std::swap.
This currently assumes that both sets have the same SmallSize to keep the implementation simple,
SmallPtrSet: Provide a more efficient implementation of swap than the 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.
llvm-svn: 152143
show more ...
|
Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3, llvmorg-3.0.0-rc2, llvmorg-3.0.0-rc1, llvmorg-2.9.0 |
|
#
bdc1b012 |
| 30-Mar-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Prevent infinite growth of SmallPtrSet instances.
Rehash but don't grow when full of tombstones.
Patch by José Fonseca!
llvm-svn: 128566
|
Revision tags: llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2, llvmorg-2.9.0-rc1, llvmorg-2.8.0, llvmorg-2.8.0-rc3, llvmorg-2.8.0-rc2, llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0 |
|
#
7b90966d |
| 30-Jun-2010 |
Duncan Sands <baldrick@free.fr> |
Rather than giving SmallPtrSetImpl a member field SmallArray which is magically replaced by a bigger array in SmallPtrSet (by overridding it), instead just use a pointer to the start of the storage,
Rather than giving SmallPtrSetImpl a member field SmallArray which is magically 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.
llvm-svn: 107285
show more ...
|
Revision tags: llvmorg-2.7.0, llvmorg-2.6.0, llvmorg-2.5.0, llvmorg-2.4.0 |
|
#
e955c481 |
| 05-Aug-2008 |
Dan Gohman <gohman@apple.com> |
Fix several const-correctness issues, resolving some -Wcast-qual warnings.
llvm-svn: 54349
|
Revision tags: llvmorg-2.3.0, llvmorg-2.2.0 |
|
#
f3ebc3f3 |
| 29-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
|
#
581f006f |
| 06-Nov-2007 |
Chris Lattner <sabre@nondot.org> |
make smallptrset more const and type correct, which caught a few minor bugs.
llvm-svn: 43782
|
Revision tags: llvmorg-2.1.0 |
|
#
b61c63ec |
| 15-Aug-2007 |
Anton Korobeynikov <asl@math.spbu.ru> |
Properly use const qualifiers
llvm-svn: 41111
|
#
44f7d3aa |
| 05-Aug-2007 |
Chris Lattner <sabre@nondot.org> |
When clearing a SmallPtrSet, if the set had a huge capacity, but the contents of the set were small, deallocate and shrink the set. This avoids having us to memset as much data, significantly speedi
When clearing a SmallPtrSet, if the set had a huge capacity, but the 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.
llvm-svn: 40837
show more ...
|
#
49f037ac |
| 27-Jul-2007 |
Owen Anderson <resistor@mac.com> |
Allow SmallPtrSet to hold pointers to const data.
llvm-svn: 40556
|
#
4c540243 |
| 24-Jul-2007 |
Owen Anderson <resistor@mac.com> |
Make the copy constructor of SmallPtrSet much faster.
llvm-svn: 40474
|
#
ee990107 |
| 19-Jul-2007 |
Owen Anderson <resistor@mac.com> |
Remember to free the heap allocated array if we're not going to use it.
llvm-svn: 40043
|
#
e21f2708 |
| 18-Jul-2007 |
Owen Anderson <resistor@mac.com> |
Fix an issue where assignments that caused a SmallPtrSet to become non-small would result in calling realloc() on a null pointer. Instead, if we encounter this situation, make a normal call to mallo
Fix an issue where assignments that caused a SmallPtrSet to become non-small would result in calling realloc() on a null pointer. Instead, if we encounter this situation, make a normal call to malloc().
llvm-svn: 40014
show more ...
|
#
5060fd0f |
| 17-Jul-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Unbreak the build by putting calls to free into the implementation file and having that implementation file #include <cstdlib>.
llvm-svn: 39952
|
#
81990a3f |
| 16-Jul-2007 |
Owen Anderson <resistor@mac.com> |
Use realloc() to (potentially) resize the contents of SmallPtrSet in place.
llvm-svn: 39926
|