summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Disallow overlapping inserts, even when inserting the same value.Jakob Stoklund Olesen2010-11-28
| | | | | | | | | | | We always disallowed overlapping inserts with different values, and this makes the insertion code smaller and faster. If an overwriting insert is needed, it can be added as a separate method that trims any existing intervals before inserting. The immediate use cases for IntervalMap don't need this - they only use disjoint insertions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120264 91177308-0d34-0410-b5e6-96231b3b80d8
* Add default constructors for iterators.Jakob Stoklund Olesen2010-11-28
| | | | | | | These iterators don't point anywhere, and they can't be compared to anything. They are only good for assigning to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120239 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement const_iterator::advanceTo().Jakob Stoklund Olesen2010-11-28
| | | | | | | This is a version of find() that always searches forwards and is faster for local searches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120237 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more tests for erase(). Fix a few exposed bugs.Jakob Stoklund Olesen2010-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120227 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test case with randomly ordered insertions, massive coalescing.Jakob Stoklund Olesen2010-11-27
| | | | | | | | | | Implement iterator::erase() in a simple version that erases nodes when they become empty, but doesn't try to redistribute elements among siblings for better packing. Handle coalescing across leaf nodes which may require erasing entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120226 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/JITTests: Don't use --export-dynamic but --export-all-symbols on ↵NAKAMURA Takumi2010-11-26
| | | | | | | | | | | | | cygming. GNU ld/PECOFF accepts but ignores them below; --version-script --export-dynamic --rpath FIXME: autoconf should be aware of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120179 91177308-0d34-0410-b5e6-96231b3b80d8
* Add B+-tree test case that creates a height 3 tree with a smaller root node.Jakob Stoklund Olesen2010-11-26
| | | | | | Change temporary debugging code to write a dot file directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120171 91177308-0d34-0410-b5e6-96231b3b80d8
* google test depends on Support.Michael J. Spencer2010-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120105 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: Add initial Path-V2 test.Michael J. Spencer2010-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120103 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: Add SystemTests.Michael J. Spencer2010-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120101 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak ImmutableMap/ImmutableSet/ImmutableList APIsTed Kremenek2010-11-24
| | | | | | | | | | to use lowercase letters for the start of most method names and to replace some method names with more descriptive names (e.g., "getLeft()" instead of "Left()"). No real functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120070 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement SwapByteOrder.h in terms of overloading instead of Chris Lattner2010-11-23
| | | | | | | being in terms of excessively complex template logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119992 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement IntervalMap::clear().Jakob Stoklund Olesen2010-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119872 91177308-0d34-0410-b5e6-96231b3b80d8
* Support backwards iteration starting from end().Jakob Stoklund Olesen2010-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119871 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test for PR 8111. By Frits van Bommel.Dale Johannesen2010-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119870 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ADT/IntervalMap.Jakob Stoklund Olesen2010-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a sorted interval map data structure for small keys and values with automatic coalescing and bidirectional iteration over coalesced intervals. Except for coalescing intervals, it provides similar functionality to std::map. It is however much more compact for small keys and values, and hopefully faster too. The container object itself can hold the first few intervals without any allocations, then it switches to a cache conscious B+-tree representation. A recycling allocator can be shared between many containers, even between containers holding different types. The IntervalMap is initially intended to be used with SlotIndex intervals for: - Backing store for LiveIntervalUnion that is smaller and faster than std::set. - Backing store for LiveInterval with less overhead than std::vector for typical intervals and O(N log N) merging of large intervals. 99% of virtual registers need 4 entries or less and would benefit from the small object optimization. - Backing store for LiveDebugVariable which doesn't exist yet, but will track debug variables during register allocation. This is a work in progress. Missing items are: - Performance metrics. - erase(). - insert() shrinkage. - clear(). - More performance metrics. - Simplification and detemplatization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119787 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add ↵NAKAMURA Takumi2010-11-19
| | | | | | | | JITTests.def. CMake can pass *.def to link.exe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119783 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/CMakeLists.txt: Suppress building ValueMapTest on MSVC older than ↵NAKAMURA Takumi2010-11-19
| | | | | | | | | 10(VS2010). MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug. See issue#331418 in Visual Studio. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119782 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add ADT/IntervalMap.", GCC doesn't like it.Jakob Stoklund Olesen2010-11-19
| | | | | | This reverts r119772. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119773 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ADT/IntervalMap.Jakob Stoklund Olesen2010-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a sorted interval map data structure for small keys and values with automatic coalescing and bidirectional iteration over coalesced intervals. Except for coalescing intervals, it provides similar functionality to std::map. It is however much more compact for small keys and values, and hopefully faster too. The container object itself can hold the first few intervals without any allocations, then it switches to a cache conscious B+-tree representation. A recycling allocator can be shared between many containers, even between containers holding different types. The IntervalMap is initially intended to be used with SlotIndex intervals for: - Backing store for LiveIntervalUnion that is smaller and faster than std::set. - Backing store for LiveInterval with less overhead than std::vector for typical intervals and O(N log N) merging of large intervals. 99% of virtual registers need 4 entries or less and would benefit from the small object optimization. - Backing store for LiveDebugVariable which doesn't exist yet, but will track debug variables during register allocation. This is a work in progress. Missing items are: - Performance metrics. - erase(). - insert() shrinkage. - clear(). - More performance metrics. - Simplification and detemplatization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119772 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 119600 to unbreak the build. Francois, please investigate.Jim Grosbach2010-11-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119606 91177308-0d34-0410-b5e6-96231b3b80d8
* Appease MSVC 2008: you can't use keyword this inside EXPECT_EQ().Francois Pichet2010-11-18
| | | | | | This is because of bug 331418 on Microsoft Connect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119600 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/CMakeLists.txt: Add missing VMCore/ValueMapTest.cpp to VMCoreTests.NAKAMURA Takumi2010-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119040 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/CMakeLists.txt: Don't use RTTI, or linking failed.NAKAMURA Takumi2010-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117646 91177308-0d34-0410-b5e6-96231b3b80d8
* Document LLVM_BUILD_TESTS, LLVM_INCLUDE_TESTS. New convenience targetOscar Fuentes2010-10-28
| | | | | | UnitTests for building all the unit tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117545 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch attribute macros to use 'LLVM_' as a prefix. We retain the old namesChandler Carruth2010-10-23
| | | | | | | until other LLVM projects using these are cleaned up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117200 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: Add Endian.hMichael J. Spencer2010-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117057 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: Use the correct defines and global variables when building on CMake.Michael J. Spencer2010-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116834 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-19
| | | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
* Unit Tests: Missed this error. MSVC and clang didn't complain.Michael J. Spencer2010-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116252 91177308-0d34-0410-b5e6-96231b3b80d8
* System: Add SwapByteOrder and update Support/MathExtras.h to use it.Michael J. Spencer2010-10-11
| | | | | | This time correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116247 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "System: Add SwapByteOrder and update Support/MathExtras.h to use it."Michael J. Spencer2010-10-11
| | | | | | | | This reverts commit 116234. It compiled just fine with MSVC and clang... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116242 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce dpendencies for SupportTests.Michael J. Spencer2010-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116235 91177308-0d34-0410-b5e6-96231b3b80d8
* System: Add SwapByteOrder and update Support/MathExtras.h to use it.Michael J. Spencer2010-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116234 91177308-0d34-0410-b5e6-96231b3b80d8
* static_cast to long, otherwise MSVC 2008 won't compile.Francois Pichet2010-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115503 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ConstantRange::makeICmpRegion handle all the edge cases properly. ThisNick Lewycky2010-09-28
| | | | | | | also fixes PR8250. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114972 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove reference to nonexistent test in CMake makefile for unit testsDouglas Gregor2010-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114835 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ValueMapTest from ADT to VMCore so that ADT doesn't needDan Gohman2010-09-27
| | | | | | | to link in "core". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114831 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an all() method to BitVector, for testing whether all bits are set.Dan Gohman2010-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114830 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting "CMake: Don't include tools, unittets, or examples asOscar Fuentes2010-09-25
| | | | | | | | | | | | available targets unless LLVM_INCLUDE_X is ON. LLVM_BUILD_X implies LLVM_INCLUDE_X" It breaks the configuration phase when cmake is invoked without parameters, it is too complex for the purpose and introduces an incovenience for the user (as both LLVM_BUILD_X and LLVM_INCLUDE_X must set to OFF for not including X on the build) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114795 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Don't include tools, unittets, or examples as available targetsMichael J. Spencer2010-09-24
| | | | | | unless LLVM_INCLUDE_X is ON. LLVM_BUILD_X implies LLVM_INCLUDE_X git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114747 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: Support Windows.Michael J. Spencer2010-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114727 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Build unittests.Michael J. Spencer2010-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114725 91177308-0d34-0410-b5e6-96231b3b80d8
* Add better support for environment portion of triple. Original patch byDuncan Sands2010-09-16
| | | | | | | Cameron Esfahani, tweaked to use array_lengthof. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114073 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to unbreak the FreeBSD buildbot by XFAILing a unit test that seems to beJakob Stoklund Olesen2010-09-14
| | | | | | | | miscompiled by the system gcc-4.2.1 The test remains enabled for the second-stage test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113824 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new isSignWrappedSet() method to ConstantRange.Nick Lewycky2010-09-06
| | | | | | | | | | Fix zeroExtend and signExtend to support empty sets, and to return the smallest possible result set which contains the extension of each element in their inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10) which contains 63446 members. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113187 91177308-0d34-0410-b5e6-96231b3b80d8
* zap dead code.Chris Lattner2010-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112708 91177308-0d34-0410-b5e6-96231b3b80d8
* StringRef::compare_numeric also differed from StringRef::compare for ↵Benjamin Kramer2010-08-26
| | | | | | characters > 127. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112189 91177308-0d34-0410-b5e6-96231b3b80d8
* Do unsigned char comparisons in StringRef::compare_lower to be more ↵Benjamin Kramer2010-08-26
| | | | | | consistent with compare in corner cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112185 91177308-0d34-0410-b5e6-96231b3b80d8