Commit Graph

30 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 59d8c60719 Add unit tests for ADT/PackedVector
llvm-svn: 133075
2011-06-15 19:19:09 +00:00
Oscar Fuentes ab84a7bf73 Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.

Fixes PR9886.

llvm-svn: 131181
2011-05-11 13:53:08 +00:00
Oscar Fuentes 3145e923c1 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

llvm-svn: 126092
2011-02-20 22:06:10 +00:00
Oscar Fuentes b7c43b8c59 Disable RTTI when building unit tests. This avoids errors at link time.
llvm-svn: 123377
2011-01-13 15:31:45 +00:00
Jakob Stoklund Olesen baee655c5e Add ADT/IntEqClasses.h as a light-weight implementation of EquivalenceClasses.h.
This implementation already exists as ConnectedVNInfoEqClasses in
LiveInterval.cpp, and it seems to be generally useful to have a light-weight way
of forming equivalence classes of small integers.

IntEqClasses doesn't allow enumeration of the elements in a class.

llvm-svn: 122293
2010-12-21 00:04:46 +00:00
Frits van Bommel 716f34c6fb CMake: Fix warning in gtest header used by unit tests.
llvm-svn: 121127
2010-12-07 10:22:07 +00:00
NAKAMURA Takumi 7291ebc353 unittests/CMakeLists.txt: Tweak unittests' layout to be identical to GNU build.
llvm-svn: 121117
2010-12-07 07:41:23 +00:00
Michael J. Spencer 3ef91c5593 unittests: Merge SystemTests back into SupportTests.
llvm-svn: 120330
2010-11-29 22:29:04 +00:00
Michael J. Spencer 447762da85 Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
NAKAMURA Takumi 98fa0159fc unittests/JITTests: Don't use --export-dynamic but --export-all-symbols on cygming.
GNU ld/PECOFF accepts but ignores them below;
  --version-script
  --export-dynamic
  --rpath

FIXME: autoconf should be aware of them.
llvm-svn: 120179
2010-11-26 09:32:02 +00:00
Michael J. Spencer 98847783f2 unittests: Add SystemTests.
llvm-svn: 120101
2010-11-24 19:20:05 +00:00
Dale Johannesen 87a98b57b8 Add test for PR 8111. By Frits van Bommel.
llvm-svn: 119870
2010-11-19 23:23:22 +00:00
Jakob Stoklund Olesen 345945e355 Add ADT/IntervalMap.
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
2010-11-19 04:47:19 +00:00
NAKAMURA Takumi 1818edb53f unittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add JITTests.def.
CMake can pass *.def to link.exe.

llvm-svn: 119783
2010-11-19 03:19:42 +00:00
NAKAMURA Takumi 7a953baa1d unittests/CMakeLists.txt: Suppress building ValueMapTest on MSVC older than 10(VS2010).
MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
See issue#331418 in Visual Studio.

llvm-svn: 119782
2010-11-19 03:19:32 +00:00
Jakob Stoklund Olesen 09770251f6 Revert "Add ADT/IntervalMap.", GCC doesn't like it.
This reverts r119772.

llvm-svn: 119773
2010-11-19 01:21:03 +00:00
Jakob Stoklund Olesen 6d89171dcc Add ADT/IntervalMap.
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
2010-11-19 01:14:40 +00:00
NAKAMURA Takumi dddfdc81ef unittests/CMakeLists.txt: Add missing VMCore/ValueMapTest.cpp to VMCoreTests.
llvm-svn: 119040
2010-11-14 12:37:51 +00:00
NAKAMURA Takumi dd7bb199b7 unittests/CMakeLists.txt: Don't use RTTI, or linking failed.
llvm-svn: 117646
2010-10-29 08:59:43 +00:00
Oscar Fuentes b1f9380cac Document LLVM_BUILD_TESTS, LLVM_INCLUDE_TESTS. New convenience target
UnitTests for building all the unit tests.

llvm-svn: 117545
2010-10-28 14:38:35 +00:00
Michael J. Spencer b550b66543 Support: Add Endian.h
llvm-svn: 117057
2010-10-21 20:28:21 +00:00
Michael J. Spencer 58efb6d19b unittests: Use the correct defines and global variables when building on CMake.
llvm-svn: 116834
2010-10-19 18:04:19 +00:00
Michael J. Spencer ded95b79f2 System: Add SwapByteOrder and update Support/MathExtras.h to use it.
This time correctly.

llvm-svn: 116247
2010-10-11 21:56:16 +00:00
Michael J. Spencer 43e92d1162 Revert "System: Add SwapByteOrder and update Support/MathExtras.h to use it."
This reverts commit 116234.

It compiled just fine with MSVC and clang...

llvm-svn: 116242
2010-10-11 21:39:24 +00:00
Michael J. Spencer 8827889d89 Reduce dpendencies for SupportTests.
llvm-svn: 116235
2010-10-11 21:22:34 +00:00
Michael J. Spencer ae0c34e127 System: Add SwapByteOrder and update Support/MathExtras.h to use it.
llvm-svn: 116234
2010-10-11 21:22:22 +00:00
Douglas Gregor cc277157e3 Remove reference to nonexistent test in CMake makefile for unit tests
llvm-svn: 114835
2010-09-27 16:40:43 +00:00
Oscar Fuentes 46d8a93005 Reverting "CMake: Don't include tools, unittets, or examples as
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
2010-09-25 20:25:25 +00:00
Michael J. Spencer e35a611aa5 CMake: Don't include tools, unittets, or examples as available targets
unless LLVM_INCLUDE_X is ON. LLVM_BUILD_X implies LLVM_INCLUDE_X

llvm-svn: 114747
2010-09-24 19:10:51 +00:00
Michael J. Spencer 10d274d874 CMake: Build unittests.
llvm-svn: 114725
2010-09-24 09:01:13 +00:00