summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
* unittests: Merge SystemTests back into SupportTests.Michael J. Spencer2010-11-294-28/+6
| | | | llvm-svn: 120330
* Support: Add PathV2 implementation.Michael J. Spencer2010-11-291-2/+72
| | | | llvm-svn: 120329
* Merge System into Support.Michael J. Spencer2010-11-298-10/+8
| | | | llvm-svn: 120298
* Disallow overlapping inserts, even when inserting the same value.Jakob Stoklund Olesen2010-11-281-97/+9
| | | | | | | | | | | 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. llvm-svn: 120264
* Add default constructors for iterators.Jakob Stoklund Olesen2010-11-281-0/+8
| | | | | | | These iterators don't point anywhere, and they can't be compared to anything. They are only good for assigning to. llvm-svn: 120239
* Implement const_iterator::advanceTo().Jakob Stoklund Olesen2010-11-281-0/+42
| | | | | | | This is a version of find() that always searches forwards and is faster for local searches. llvm-svn: 120237
* Add more tests for erase(). Fix a few exposed bugs.Jakob Stoklund Olesen2010-11-271-1/+29
| | | | llvm-svn: 120227
* Add test case with randomly ordered insertions, massive coalescing.Jakob Stoklund Olesen2010-11-271-0/+24
| | | | | | | | | | 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. llvm-svn: 120226
* unittests/JITTests: Don't use --export-dynamic but --export-all-symbols on ↵NAKAMURA Takumi2010-11-262-3/+9
| | | | | | | | | | | | cygming. GNU ld/PECOFF accepts but ignores them below; --version-script --export-dynamic --rpath FIXME: autoconf should be aware of them. llvm-svn: 120179
* Add B+-tree test case that creates a height 3 tree with a smaller root node.Jakob Stoklund Olesen2010-11-261-0/+51
| | | | | | Change temporary debugging code to write a dot file directly. llvm-svn: 120171
* google test depends on Support.Michael J. Spencer2010-11-241-1/+1
| | | | llvm-svn: 120105
* unittests: Add initial Path-V2 test.Michael J. Spencer2010-11-241-0/+3
| | | | llvm-svn: 120103
* unittests: Add SystemTests.Michael J. Spencer2010-11-246-18/+70
| | | | llvm-svn: 120101
* Tweak ImmutableMap/ImmutableSet/ImmutableList APIsTed Kremenek2010-11-241-24/+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. llvm-svn: 120070
* reimplement SwapByteOrder.h in terms of overloading instead of Chris Lattner2010-11-231-8/+8
| | | | | | being in terms of excessively complex template logic. llvm-svn: 119992
* Implement IntervalMap::clear().Jakob Stoklund Olesen2010-11-191-0/+9
| | | | llvm-svn: 119872
* Support backwards iteration starting from end().Jakob Stoklund Olesen2010-11-191-0/+10
| | | | llvm-svn: 119871
* Add test for PR 8111. By Frits van Bommel.Dale Johannesen2010-11-192-0/+40
| | | | llvm-svn: 119870
* Add ADT/IntervalMap.Jakob Stoklund Olesen2010-11-192-0/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 119787
* unittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add ↵NAKAMURA Takumi2010-11-192-1/+11
| | | | | | | | JITTests.def. CMake can pass *.def to link.exe. llvm-svn: 119783
* unittests/CMakeLists.txt: Suppress building ValueMapTest on MSVC older than ↵NAKAMURA Takumi2010-11-191-1/+9
| | | | | | | | | 10(VS2010). MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug. See issue#331418 in Visual Studio. llvm-svn: 119782
* Revert "Add ADT/IntervalMap.", GCC doesn't like it.Jakob Stoklund Olesen2010-11-192-358/+0
| | | | | | This reverts r119772. llvm-svn: 119773
* Add ADT/IntervalMap.Jakob Stoklund Olesen2010-11-192-0/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 119772
* Revert 119600 to unbreak the build. Francois, please investigate.Jim Grosbach2010-11-181-9/+9
| | | | llvm-svn: 119606
* Appease MSVC 2008: you can't use keyword this inside EXPECT_EQ().Francois Pichet2010-11-181-9/+9
| | | | | | This is because of bug 331418 on Microsoft Connect. llvm-svn: 119600
* unittests/CMakeLists.txt: Add missing VMCore/ValueMapTest.cpp to VMCoreTests.NAKAMURA Takumi2010-11-141-0/+1
| | | | llvm-svn: 119040
* unittests/CMakeLists.txt: Don't use RTTI, or linking failed.NAKAMURA Takumi2010-10-291-1/+0
| | | | llvm-svn: 117646
* Document LLVM_BUILD_TESTS, LLVM_INCLUDE_TESTS. New convenience targetOscar Fuentes2010-10-281-0/+3
| | | | | | UnitTests for building all the unit tests. llvm-svn: 117545
* Switch attribute macros to use 'LLVM_' as a prefix. We retain the old namesChandler Carruth2010-10-231-1/+1
| | | | | | until other LLVM projects using these are cleaned up. llvm-svn: 117200
* Support: Add Endian.hMichael J. Spencer2010-10-212-1/+74
| | | | llvm-svn: 117057
* unittests: Use the correct defines and global variables when building on CMake.Michael J. Spencer2010-10-191-0/+2
| | | | llvm-svn: 116834
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-8/+29
| | | | | | | | | | | | | | | | | 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. llvm-svn: 116820
* Unit Tests: Missed this error. MSVC and clang didn't complain.Michael J. Spencer2010-10-111-4/+4
| | | | llvm-svn: 116252
* System: Add SwapByteOrder and update Support/MathExtras.h to use it.Michael J. Spencer2010-10-112-0/+129
| | | | | | This time correctly. llvm-svn: 116247
* Revert "System: Add SwapByteOrder and update Support/MathExtras.h to use it."Michael J. Spencer2010-10-112-129/+0
| | | | | | | | This reverts commit 116234. It compiled just fine with MSVC and clang... llvm-svn: 116242
* Reduce dpendencies for SupportTests.Michael J. Spencer2010-10-111-13/+19
| | | | llvm-svn: 116235
* System: Add SwapByteOrder and update Support/MathExtras.h to use it.Michael J. Spencer2010-10-112-0/+129
| | | | llvm-svn: 116234
* static_cast to long, otherwise MSVC 2008 won't compile.Francois Pichet2010-10-041-1/+1
| | | | llvm-svn: 115503
* Make ConstantRange::makeICmpRegion handle all the edge cases properly. ThisNick Lewycky2010-09-281-0/+8
| | | | | | also fixes PR8250. llvm-svn: 114972
* Remove reference to nonexistent test in CMake makefile for unit testsDouglas Gregor2010-09-271-2/+1
| | | | llvm-svn: 114835
* Move ValueMapTest from ADT to VMCore so that ADT doesn't needDan Gohman2010-09-272-1/+1
| | | | | | to link in "core". llvm-svn: 114831
* Add an all() method to BitVector, for testing whether all bits are set.Dan Gohman2010-09-272-0/+14
| | | | llvm-svn: 114830
* Reverting "CMake: Don't include tools, unittets, or examples asOscar Fuentes2010-09-251-3/+1
| | | | | | | | | | | | 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) llvm-svn: 114795
* CMake: Don't include tools, unittets, or examples as available targetsMichael J. Spencer2010-09-241-1/+3
| | | | | | unless LLVM_INCLUDE_X is ON. LLVM_BUILD_X implies LLVM_INCLUDE_X llvm-svn: 114747
* unittests: Support Windows.Michael J. Spencer2010-09-241-1/+1
| | | | llvm-svn: 114727
* CMake: Build unittests.Michael J. Spencer2010-09-241-0/+95
| | | | llvm-svn: 114725
* Add better support for environment portion of triple. Original patch byDuncan Sands2010-09-161-0/+8
| | | | | | Cameron Esfahani, tweaked to use array_lengthof. llvm-svn: 114073
* Attempt to unbreak the FreeBSD buildbot by XFAILing a unit test that seems to beJakob Stoklund Olesen2010-09-141-0/+5
| | | | | | | | miscompiled by the system gcc-4.2.1 The test remains enabled for the second-stage test. llvm-svn: 113824
* Add a new isSignWrappedSet() method to ConstantRange.Nick Lewycky2010-09-061-4/+22
| | | | | | | | | 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. llvm-svn: 113187
* zap dead code.Chris Lattner2010-09-011-1/+0
| | | | llvm-svn: 112708
OpenPOWER on IntegriCloud