summaryrefslogtreecommitdiff
path: root/include/llvm/ADT
Commit message (Collapse)AuthorAge
* Bugzilla bug 14357Guy Benyei2012-11-15
| | | | | | | | Merge SPIR64 target from trunk - the 64bit counterpart of SPIR. The new OpenCL SPIR extension spec will define separate SPIR for 32 and 64 bit architectures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168092 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now.Rafael Espindola2012-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167157 91177308-0d34-0410-b5e6-96231b3b80d8
* Add extra declarations of hash_value needed to build llvm with xlc 12.1.Rafael Espindola2012-10-31
| | | | | | Patch by Kai! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167085 91177308-0d34-0410-b5e6-96231b3b80d8
* APFloat cleanup: Remove now unused fields "sign2" and "exponent2".Ulrich Weigand2012-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166952 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop APInt::shl from generating llvm.trapDerek Schuff2012-10-26
| | | | | | | | | | | APInt::shl generated llvm.trap to guard against shifts greater than bit-width. This was already checked with an assert, and there was a special case for shifts equal to bit-width. Modify this check to catch shifts greater than or equal to bit-width, so llvm.trap isn't generated. Patch contributed by JF Bastien git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166803 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve DenseMap checks for power of 2 growth. Thanks for the tip JakobPete Cooper2012-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166609 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support/StringSet] Fix memory leak when inserted key already exists.Michael J. Spencer2012-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166517 91177308-0d34-0410-b5e6-96231b3b80d8
* Change DenseMap to use a power of 2 growth if one is given instead of the ↵Pete Cooper2012-10-23
| | | | | | next power of 2. This was causing DenseMaps to grow 4x instead of 2x. I'll keep an eye on the buildbots as this could impact performance git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166493 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug in SmallDenseMap where it wouldn't leave enough space for an empty ↵Pete Cooper2012-10-23
| | | | | | bucket if the number of values was exactly equal to the small capacity. This led to an infinite loop when finding a non-existent element git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166492 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix case for include of Compiler.h.Jordan Rose2012-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166243 91177308-0d34-0410-b5e6-96231b3b80d8
* Add move constructors for OwningPtr and OwningArrayPtr.Jordan Rose2012-10-18
| | | | | | | While LLVM itself is still C++03, there's no reason why tools built on top of it can't use C++11 features. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166242 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a T&& constructor to llvm::Optional.Jordan Rose2012-10-18
| | | | | | | | This allows llvm::Optional to be used with movable-but-not-copyable types. While LLVM itself is still C++03, there's no reason why tools built on top of it can't use C++11 features. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166241 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculative fix the mask constants to be of type uintptr_t. I don't know of ↵Owen Anderson2012-10-16
| | | | | | any case where the old form was incorrect, but I'm more confident that such cases don't exist in this version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166031 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The ↵Owen Anderson2012-10-16
| | | | | | boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166015 91177308-0d34-0410-b5e6-96231b3b80d8
* Add range-based set()/reset() to BitVector. These allow fast ↵Owen Anderson2012-10-15
| | | | | | setting/resetting of ranges of bits, particularly useful when dealing with very large BitVector's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165984 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo that made ImmutableMap::getMaxElement() useless.Benjamin Kramer2012-10-14
| | | | | | Add a basic unit test for ImmutableMap. Found by inspection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165907 91177308-0d34-0410-b5e6-96231b3b80d8
* Add powerpc-ibm-aix to Triple. Patch by Kai.Duncan Sands2012-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165792 91177308-0d34-0410-b5e6-96231b3b80d8
* Add count() method to MapVectorDouglas Gregor2012-10-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165559 91177308-0d34-0410-b5e6-96231b3b80d8
* Not everyone uses C++11, apparentlyDouglas Gregor2012-10-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165517 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow MapVector clients to specify the map and vector types, and add aDouglas Gregor2012-10-09
| | | | | | | clear() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165514 91177308-0d34-0410-b5e6-96231b3b80d8
* Third try at fixing this. ;] Go back to using std::remove_if, which hasChandler Carruth2012-10-03
| | | | | | | | | | most of the behavior we want, but wrap the predicate in one which erases elements from the set if they pass the predicate. Oh what I wouldn't give for a lambda here. Let me know if the predicate wrapping is too much magic. ;] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165076 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the SetVector::remove_if implementation to use partition whichChandler Carruth2012-10-03
| | | | | | | | | | | | | | preserves the values of the relocated entries, unlikely remove_if. This allows walking them and erasing them. Also flesh out the predicate we are using for this to support the various constraints actually imposed on a UnaryPredicate -- without this we can't compose it with std::not1. Thanks to Sean Silva for the review here and noticing the issue with std::remove_if. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165073 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the new SROA to handle cases where an alloca that has already beenChandler Carruth2012-10-02
| | | | | | | | | | | | | | | | scheduled for processing on the worklist eventually gets deleted while we are processing another alloca, fixing the original test case in PR13990. To facilitate this, add a remove_if helper to the SetVector abstraction. It's not easy to use the standard abstractions for this because of the specifics of SetVectors types and implementation. Finally, a nice small test case is included. Thanks to Benjamin for the fantastic reduced test case here! All I had to do was delete some empty basic blocks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165065 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up these doxygen comments to follow the proposed new style. ThisChandler Carruth2012-10-02
| | | | | | | also makes it more consistent with Clang and several passes' doxygen style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165064 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for generating ELF objects on Windows.Andrew Kaylor2012-10-02
| | | | | | This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present. This patch also enables MCJIT tests on Windows using the new environment value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165030 91177308-0d34-0410-b5e6-96231b3b80d8
* Add in support for SPIR to LLVM core. This adds a new target and two new ↵Micah Villmow2012-10-01
| | | | | | calling conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164948 91177308-0d34-0410-b5e6-96231b3b80d8
* PackedVector: Make the BitVector implementation configurable.Benjamin Kramer2012-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164826 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide malloc-free sentinels for the SparseBitVector internals.Benjamin Kramer2012-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164823 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-27
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::getOrdinalSuffix to get the appropriate -st, -nd, -rd, -th suffix.Jordan Rose2012-09-22
| | | | | | Used by clang to print parameter indexes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164440 91177308-0d34-0410-b5e6-96231b3b80d8
* DenseMap: assert that we have found a bucket before we try to insert into it.Jordan Rose2012-09-22
| | | | | | | This silences literally dozens of analyzer warnings on LLVM (since DenseMap is such a commonly-used class). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164438 91177308-0d34-0410-b5e6-96231b3b80d8
* Make MapVector a bit more expensive but harder to misuse. We now onlyRafael Espindola2012-09-19
| | | | | | | | | provide insertion order iteration, instead of the old option of DenseMap order iteration over keys and insertion order iteration over values. This is implemented by keeping two copies of each key. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164221 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a MapVector class. It provides a regular set iteration, butRafael Espindola2012-09-18
| | | | | | also provides a insertion order iteration over the values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164157 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark unimplemented copy constructors and copy assignment operators as ↵Craig Topper2012-09-17
| | | | | | LLVM_DELETED_FUNCTION. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164014 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment ↵Craig Topper2012-09-16
| | | | | | operators that aren't implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164006 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up formatting of some elses on a separate line from preceding bracing. ↵Craig Topper2012-09-16
| | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163992 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up trailing whitespace.Craig Topper2012-09-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163988 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded header.Craig Topper2012-09-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163987 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Doxygen issues: wrap code examples in \code and use \p to refer toDmitri Gribenko2012-09-15
| | | | | | | parameters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163984 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Doxygen issues:Dmitri Gribenko2012-09-14
| | | | | | | | | | | * wrap code blocks in \code ... \endcode; * refer to parameter names in paragraphs correctly (\arg is not what most people want -- it starts a new paragraph); * use \param instead of \arg to document parameters in order to be consistent with the rest of the codebase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163902 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Doxygen issues:Dmitri Gribenko2012-09-13
| | | | | | | | | * wrap code blocks in \code ... \endcode; * refer to parameter names in paragraphs correctly (\arg is not what most people want -- it starts a new paragraph). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163790 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Nick Lewycky2012-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163782 91177308-0d34-0410-b5e6-96231b3b80d8
* Add operator< for FoldingSetNodeID.Ted Kremenek2012-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163454 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new optimization pass: Stack Coloring, that merges disjoint static ↵Nadav Rotem2012-09-06
| | | | | | | | | | allocations (allocas). Allocas are known to be disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163299 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused typedefs gcc4.8 warns about.Roman Divacky2012-09-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163225 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed Trie.h; unused in a long timeMarshall Clow2012-09-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163191 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ANDROIDEABI to Android.Logan Chien2012-09-02
| | | | | | | | | | | | | | Most of the code guarded with ANDROIDEABI are not ARM-specific, and having no relation with arm-eabi. Thus, it will be more natural to call this environment "Android" instead of "ANDROIDEABI". Note: We are not using ANDROID because several projects are using "-DANDROID" as the conditional compilation flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163087 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix HashString's Bernstein hash to use unsigned chars, as is usually done.Will Dietz2012-08-30
| | | | | | | | | | Changes the hash result for strings containing characters with values >= 128, such as UTF8 strings (not normal ASCII). Changed mostly so we match other implementations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162882 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the Freescale vendor to Triple.Hal Finkel2012-08-28
| | | | | | | | | Adds the vendor 'fsl' (used by Freescale SDK) to Triple. This will allow clang support for Freescale cross-compile configurations. Patch by Tobias von Koch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162726 91177308-0d34-0410-b5e6-96231b3b80d8