1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

31 Commits

Author SHA1 Message Date
Chris Lattner
a106725fc5 Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM.  One way to look at it
is through diffstat:
 109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing.  Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
   union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
   uniques them.  This means that the compiler doesn't merge them structurally
   which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
   struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
   in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead 
   "const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.  
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.

llvm-svn: 134829
2011-07-09 17:41:24 +00:00
Argyrios Kyrtzidis
67dd868df2 Add unit tests for ADT/PackedVector
llvm-svn: 133075
2011-06-15 19:19:09 +00:00
Oscar Fuentes
51417218c2 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
22247bd624 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
8d5e1d912b 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
26b4e8ec0a 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
78efe72880 CMake: Fix warning in gtest header used by unit tests.
llvm-svn: 121127
2010-12-07 10:22:07 +00:00
NAKAMURA Takumi
e9ad42c89e 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
88e48a78d5 unittests: Merge SystemTests back into SupportTests.
llvm-svn: 120330
2010-11-29 22:29:04 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
NAKAMURA Takumi
649a6c919c 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
1fbb121684 unittests: Add SystemTests.
llvm-svn: 120101
2010-11-24 19:20:05 +00:00
Dale Johannesen
0840b75ab3 Add test for PR 8111. By Frits van Bommel.
llvm-svn: 119870
2010-11-19 23:23:22 +00:00
Jakob Stoklund Olesen
52d6dd3079 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
9dbf2d0626 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
f3395d898f 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
254cd4bc4d 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
7d82c5c710 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
091345de13 unittests/CMakeLists.txt: Add missing VMCore/ValueMapTest.cpp to VMCoreTests.
llvm-svn: 119040
2010-11-14 12:37:51 +00:00
NAKAMURA Takumi
dece5f27eb unittests/CMakeLists.txt: Don't use RTTI, or linking failed.
llvm-svn: 117646
2010-10-29 08:59:43 +00:00
Oscar Fuentes
884f6a3c67 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
b9734a5b12 Support: Add Endian.h
llvm-svn: 117057
2010-10-21 20:28:21 +00:00
Michael J. Spencer
fcc19613cd 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
0888ccaa19 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
0af3659b5d 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
29e2ba9ca8 Reduce dpendencies for SupportTests.
llvm-svn: 116235
2010-10-11 21:22:34 +00:00
Michael J. Spencer
d0d6c9b01e System: Add SwapByteOrder and update Support/MathExtras.h to use it.
llvm-svn: 116234
2010-10-11 21:22:22 +00:00
Douglas Gregor
7c36f3e073 Remove reference to nonexistent test in CMake makefile for unit tests
llvm-svn: 114835
2010-09-27 16:40:43 +00:00
Oscar Fuentes
40caeda472 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
3302cf4ac1 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
090c16fb92 CMake: Build unittests.
llvm-svn: 114725
2010-09-24 09:01:13 +00:00