diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-09 17:41:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-09 17:41:24 +0000 |
commit | 1afcace3a3a138b1b18e5c6270caa8dae2261ae2 (patch) | |
tree | 2fed26ec8965151524b81246c7fa7c3e2382fd31 /test/CodeGen/X86 | |
parent | c36ed70ec5c3c99f9559cfaa199373f60219a2be (diff) | |
download | external_llvm-1afcace3a3a138b1b18e5c6270caa8dae2261ae2.zip external_llvm-1afcace3a3a138b1b18e5c6270caa8dae2261ae2.tar.gz external_llvm-1afcace3a3a138b1b18e5c6270caa8dae2261ae2.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r-- | test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll | 4 | ||||
-rw-r--r-- | test/CodeGen/X86/2010-11-09-MOVLPS.ll | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/fp-stack-2results.ll | 24 | ||||
-rw-r--r-- | test/CodeGen/X86/pr3317.ll | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll b/test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll index c5d3d16..739a27a 100644 --- a/test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll +++ b/test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll @@ -22,6 +22,7 @@ module asm "\09.ident\09\22GCC: (GNU) 4.5.0 20100212 (experimental) LLVM: 95975\ %0 = type { %"union gimple_statement_d"* } %"BITMAP_WORD[]" = type [2 x i64] +%"uchar[]" = type [1 x i8] %"char[]" = type [4 x i8] %"enum dom_state[]" = type [2 x i32] %"int[]" = type [4 x i32] @@ -61,6 +62,7 @@ module asm "\09.ident\09\22GCC: (GNU) 4.5.0 20100212 (experimental) LLVM: 95975\ %"struct gimple_seq_d" = type { %"struct gimple_seq_node_d"*, %"struct gimple_seq_node_d"*, %"struct gimple_seq_d"* } %"struct gimple_seq_node_d" = type { %"union gimple_statement_d"*, %"struct gimple_seq_node_d"*, %"struct gimple_seq_node_d"* } %"struct gimple_statement_base" = type { i8, i8, i16, i32, i32, i32, %"struct basic_block_def"*, %"union tree_node"* } +%"struct phi_arg_d[]" = type [1 x %"struct phi_arg_d"] %"struct gimple_statement_phi" = type { %"struct gimple_statement_base", i32, i32, %"union tree_node"*, %"struct phi_arg_d[]" } %"struct htab" = type { i32 (i8*)*, i32 (i8*, i8*)*, void (i8*)*, i8**, i64, i64, i64, i32, i32, i8* (i64, i64)*, void (i8*)*, i8*, i8* (i8*, i64, i64)*, void (i8*, i8*)*, i32 } %"struct iv" = type { %"union tree_node"*, %"union tree_node"*, %"union tree_node"*, %"union tree_node"*, i8, i8, i32 } @@ -78,7 +80,6 @@ module asm "\09.ident\09\22GCC: (GNU) 4.5.0 20100212 (experimental) LLVM: 95975\ %"struct object_block" = type { %"union section"*, i32, i64, %"struct VEC_rtx_gc"*, %"struct VEC_rtx_gc"* } %"struct obstack" = type { i64, %"struct _obstack_chunk"*, i8*, i8*, i8*, i64, i32, %"struct _obstack_chunk"* (i8*, i64)*, void (i8*, %"struct _obstack_chunk"*)*, i8*, i8 } %"struct phi_arg_d" = type { %"struct ssa_use_operand_d", %"union tree_node"*, i32 } -%"struct phi_arg_d[]" = type [1 x %"struct phi_arg_d"] %"struct pointer_map_t" = type opaque %"struct pt_solution" = type { i8, %"struct bitmap_head_def"* } %"struct rtx_def" = type { i16, i8, i8, %"union u" } @@ -98,7 +99,6 @@ module asm "\09.ident\09\22GCC: (GNU) 4.5.0 20100212 (experimental) LLVM: 95975\ %"struct unnamed_section" = type { %"struct section_common", void (i8*)*, i8*, %"union section"* } %"struct use_optype_d" = type { %"struct use_optype_d"*, %"struct ssa_use_operand_d" } %"struct version_info" = type { %"union tree_node"*, %"struct iv"*, i8, i32, i8 } -%"uchar[]" = type [1 x i8] %"union basic_block_il_dependent" = type { %"struct gimple_bb_info"* } %"union edge_def_insns" = type { %"struct gimple_seq_d"* } %"union gimple_statement_d" = type { %"struct gimple_statement_phi" } diff --git a/test/CodeGen/X86/2010-11-09-MOVLPS.ll b/test/CodeGen/X86/2010-11-09-MOVLPS.ll index 2368f3f..710cb86 100644 --- a/test/CodeGen/X86/2010-11-09-MOVLPS.ll +++ b/test/CodeGen/X86/2010-11-09-MOVLPS.ll @@ -5,11 +5,11 @@ target triple = "x86_64-unknown-linux-gnu" module asm "\09.ident\09\22GCC: (GNU) 4.5.2 20100914 (prerelease) LLVM: 114628\22" +%"int[]" = type [4 x i32] %0 = type { %"int[]" } %float = type float %"float[]" = type [4 x float] %int = type i32 -%"int[]" = type [4 x i32] %"long unsigned int" = type i64 define void @swizzle(i8* %a, %0* %b, %0* %c) nounwind { diff --git a/test/CodeGen/X86/fp-stack-2results.ll b/test/CodeGen/X86/fp-stack-2results.ll index e986e36..c8da9ea 100644 --- a/test/CodeGen/X86/fp-stack-2results.ll +++ b/test/CodeGen/X86/fp-stack-2results.ll @@ -5,7 +5,7 @@ ; This is basically this code on x86-64: ; _Complex long double test() { return 1.0; } -define {x86_fp80, x86_fp80} @test() { +define %0 @test() { %A = fpext double 1.0 to x86_fp80 %B = fpext double 0.0 to x86_fp80 %mrv = insertvalue %0 undef, x86_fp80 %A, 0 @@ -18,7 +18,7 @@ define {x86_fp80, x86_fp80} @test() { ; fld1 ; fld %st(0) ; ret -define {x86_fp80, x86_fp80} @test2() { +define %0 @test2() { %A = fpext double 1.0 to x86_fp80 %mrv = insertvalue %0 undef, x86_fp80 %A, 0 %mrv1 = insertvalue %0 %mrv, x86_fp80 %A, 1 @@ -27,39 +27,39 @@ define {x86_fp80, x86_fp80} @test2() { ; Uses both values. define void @call1(x86_fp80 *%P1, x86_fp80 *%P2) { - %a = call {x86_fp80,x86_fp80} @test() - %b = extractvalue {x86_fp80,x86_fp80} %a, 0 + %a = call %0 @test() + %b = extractvalue %0 %a, 0 store x86_fp80 %b, x86_fp80* %P1 - %c = extractvalue {x86_fp80,x86_fp80} %a, 1 + %c = extractvalue %0 %a, 1 store x86_fp80 %c, x86_fp80* %P2 ret void } ; Uses both values, requires fxch define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) { - %a = call {x86_fp80,x86_fp80} @test() - %b = extractvalue {x86_fp80,x86_fp80} %a, 1 + %a = call %0 @test() + %b = extractvalue %0 %a, 1 store x86_fp80 %b, x86_fp80* %P1 - %c = extractvalue {x86_fp80,x86_fp80} %a, 0 + %c = extractvalue %0 %a, 0 store x86_fp80 %c, x86_fp80* %P2 ret void } ; Uses ST(0), ST(1) is dead but must be popped. define void @call3(x86_fp80 *%P1, x86_fp80 *%P2) { - %a = call {x86_fp80,x86_fp80} @test() - %b = extractvalue {x86_fp80,x86_fp80} %a, 0 + %a = call %0 @test() + %b = extractvalue %0 %a, 0 store x86_fp80 %b, x86_fp80* %P1 ret void } ; Uses ST(1), ST(0) is dead and must be popped. define void @call4(x86_fp80 *%P1, x86_fp80 *%P2) { - %a = call {x86_fp80,x86_fp80} @test() + %a = call %0 @test() - %c = extractvalue {x86_fp80,x86_fp80} %a, 1 + %c = extractvalue %0 %a, 1 store x86_fp80 %c, x86_fp80* %P2 ret void } diff --git a/test/CodeGen/X86/pr3317.ll b/test/CodeGen/X86/pr3317.ll index 9d6626b..d83daf0 100644 --- a/test/CodeGen/X86/pr3317.ll +++ b/test/CodeGen/X86/pr3317.ll @@ -1,6 +1,7 @@ ; RUN: llc < %s -march=x86 ; PR3317 +%VT = type [0 x i32 (...)*] %ArraySInt16 = type { %JavaObject, i8*, [0 x i16] } %ArraySInt8 = type { %JavaObject, i8*, [0 x i8] } %Attribut = type { %ArraySInt16*, i32, i32 } @@ -14,7 +15,6 @@ %JavaObject = type { %VT*, %JavaCommonClass*, i8* } %TaskClassMirror = type { i32, i8* } %UTF8 = type { %JavaObject, i8*, [0 x i16] } - %VT = type [0 x i32 (...)*] declare void @jnjvmNullPointerException() |