1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00

remove the GVNPRE pass. It has been subsumed by the GVN pass.

Ok'd by Owen.

llvm-svn: 83193
This commit is contained in:
Chris Lattner 2009-10-01 02:18:36 +00:00
parent dc5ac208bf
commit 857ed445a8
22 changed files with 0 additions and 2324 deletions

View File

@ -71,7 +71,6 @@ namespace {
(void) llvm::createGlobalDCEPass();
(void) llvm::createGlobalOptimizerPass();
(void) llvm::createGlobalsModRefPass();
(void) llvm::createGVNPREPass();
(void) llvm::createIPConstantPropagationPass();
(void) llvm::createIPSCCPPass();
(void) llvm::createIndVarSimplifyPass();

View File

@ -283,13 +283,6 @@ extern const PassInfo *const LCSSAID;
//
FunctionPass *createPredicateSimplifierPass();
//===----------------------------------------------------------------------===//
//
// GVN-PRE - This pass performs global value numbering and partial redundancy
// elimination.
//
FunctionPass *createGVNPREPass();
//===----------------------------------------------------------------------===//
//
// GVN - This pass performs global value numbering and redundant load

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
define void @_Z4sortI3Lit16LessThan_defaultIS0_EEvPT_iT0_() {
entry:
br label %cond_false
cond_false: ; preds = %cond_false, %entry
br label %cond_false
}

View File

@ -1,19 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
define void @strength_test5(i32* %data) {
entry:
br i1 false, label %cond_next16.preheader, label %cond_true
cond_true: ; preds = %entry
%tmp12 = icmp sgt i32 0, 0 ; <i1> [#uses=1]
br i1 %tmp12, label %return, label %cond_next16.preheader
cond_next16.preheader: ; preds = %cond_true, %entry
%i.01.1.ph = phi i32 [ 1, %entry ], [ 1, %cond_true ] ; <i32> [#uses=1]
%i.01.1 = add i32 0, %i.01.1.ph ; <i32> [#uses=0]
%indvar.next = add i32 0, 1 ; <i32> [#uses=0]
ret void
return: ; preds = %cond_true
ret void
}

View File

@ -1,70 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
@.str1 = external constant [4 x i8] ; <[4 x i8]*> [#uses=1]
@.str2 = external constant [5 x i8] ; <[5 x i8]*> [#uses=1]
define i32 @main(i32 %argc, i8** %argv) {
entry:
br i1 false, label %cond_next, label %cond_true
cond_true: ; preds = %entry
ret i32 0
cond_next: ; preds = %entry
%tmp10 = invoke i16 @_ZN12token_stream4openEPKc( i8* null, i8* null ) signext
to label %invcont unwind label %cleanup690 ; <i16> [#uses=0]
invcont: ; preds = %cond_next
%tmp15 = invoke i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @.str1, i32 0, i32 0) )
to label %invcont14 unwind label %cleanup685 ; <i32> [#uses=0]
invcont14: ; preds = %invcont
%tmp17 = invoke i8* @_ZN24lambda_expression_parser10expressionEPP11arglst_node( i8* null, i8** null )
to label %cond_true22 unwind label %cleanup685
cond_true22: ; preds = %invcont14
%tmp35 = invoke i32 null( i8* null )
to label %cond_next56 unwind label %cleanup685 ; <i32> [#uses=0]
cond_next56: ; preds = %cond_true22
%tmp59 = invoke i32 (i8*, ...)* @printf( i8* getelementptr ([5 x i8]* @.str2, i32 0, i32 0) )
to label %invcont58 unwind label %cleanup685 ; <i32> [#uses=0]
invcont58: ; preds = %cond_next56
invoke void null( i8* null, i8* null, i32 0 )
to label %invcont72 unwind label %cleanup685
invcont72: ; preds = %invcont58
%tmp143 = invoke i32 null( i8* null )
to label %invcont142 unwind label %cleanup685 ; <i32> [#uses=0]
invcont142: ; preds = %invcont72
br i1 false, label %cond_false407, label %cond_true150
cond_true150: ; preds = %invcont142
ret i32 0
cond_false407: ; preds = %invcont142
%tmp431 = invoke i8* null( i8* null, i8* null, i32 0, i32* null )
to label %bb432 unwind label %cleanup685
bb432: ; preds = %bb432, %cond_false407
%rexp413.7 = phi i8* [ %tmp431, %cond_false407 ], [ %rexp413.7, %bb432 ]
%tmp434 = icmp eq i8* %rexp413.7, null ; <i1> [#uses=1]
br i1 %tmp434, label %bb432, label %cond_true437
cond_true437: ; preds = %bb432
ret i32 0
cleanup685: ; preds = %cond_false407, %invcont72, %invcont58, %cond_next56, %cond_true22, %invcont14, %invcont
ret i32 0
cleanup690: ; preds = %cond_next
ret i32 0
}
declare i16 @_ZN12token_stream4openEPKc(i8*, i8*) signext
declare i32 @printf(i8*, ...)
declare i8* @_ZN24lambda_expression_parser10expressionEPP11arglst_node(i8*, i8**)

View File

@ -1,22 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
define fastcc void @compute_max_score_1() {
entry:
%tmp7 = sub i32 0, 0 ; <i32> [#uses=0]
br label %bb
bb: ; preds = %bb212, %entry
%indvar29 = phi i32 [ 0, %entry ], [ %indvar.next30, %bb212 ] ; <i32> [#uses=2]
%j.01.0 = sub i32 %indvar29, 0 ; <i32> [#uses=0]
br label %cond_next166
cond_next166: ; preds = %cond_next166, %bb
br i1 false, label %bb212, label %cond_next166
bb212: ; preds = %cond_next166
%indvar.next30 = add i32 %indvar29, 1 ; <i32> [#uses=1]
br i1 false, label %return, label %bb
return: ; preds = %bb212
ret void
}

View File

@ -1,22 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
define void @vorbis_lsp_to_curve() {
entry:
br i1 false, label %bb.nph, label %return
bb.nph: ; preds = %entry
br label %bb34
bb34: ; preds = %bb34, %bb.nph
%p.1 = phi float [ 0x3FE6A09E60000000, %bb.nph ], [ %tmp48, %bb34 ] ; <float> [#uses=1]
%tmp44 = load float* null ; <float> [#uses=1]
%tmp46 = fsub float %tmp44, 0.000000e+00 ; <float> [#uses=1]
%tmp48 = fmul float %tmp46, %p.1 ; <float> [#uses=1]
br i1 false, label %bb57, label %bb34
bb57: ; preds = %bb34
ret void
return: ; preds = %entry
ret void
}

View File

@ -1,26 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
define i32 @TreeCCStreamFlush(i8* %stream) {
entry:
br i1 false, label %bb55.preheader, label %cond_true
cond_true: ; preds = %entry
ret i32 0
bb55.preheader: ; preds = %entry
%tmp57 = icmp eq i8* null, null ; <i1> [#uses=0]
br i1 false, label %cond_next106, label %bb124
cond_next106: ; preds = %bb55.preheader
%tmp109 = load i8** null
br i1 false, label %bb124, label %bb116
bb116: ; preds = %cond_next106
ret i32 0
bb124: ; preds = %cond_next106, %bb55.preheader
%buffer.4 = phi i8* [ null, %bb55.preheader ], [ %tmp109, %cond_next106 ]
%tmp131 = icmp eq i8* %buffer.4, null
%bothcond = or i1 %tmp131, false
ret i32 0
}

View File

@ -1,14 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
define i64 @foo({ i32, i32 }** %__v) {
entry:
br label %bb
bb: ; preds = %bb, %entry
%__x.066.0 = phi { i32, i32 }* [ null, %entry ], [ null, %bb ]
%tmp2.i.i63 = getelementptr { i32, i32 }* %__x.066.0, i32 0, i32 1
br i1 false, label %bb, label %cond_true
cond_true: ; preds = %bb
ret i64 0
}

View File

@ -1,9 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
define i32* @_ZN6Solver9propagateEv(i32* %this) {
entry:
%tmp15.i48 = load i8* null ; <i8> [#uses=2]
%tmp64.i.i51 = sub i8 0, %tmp15.i48 ; <i8> [#uses=1]
%tmp231.i52 = select i1 false, i8 %tmp15.i48, i8 %tmp64.i.i51 ; <i8> [#uses=0]
ret i32* null
}

View File

@ -1,18 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
define void @set_depth_values(i32 %level) {
cond_true90: ; preds = %cond_next84
br i1 false, label %cond_true105, label %cond_true151
cond_true105: ; preds = %cond_true90
%tmp132 = add i32 %level, -3 ; <i32> [#uses=2]
%tmp133 = icmp sgt i32 %tmp132, 0 ; <i1> [#uses=1]
%max134 = select i1 %tmp133, i32 %tmp132, i32 1 ; <i32> [#uses=0]
br label %cond_true151
cond_true151: ; preds = %cond_true140, %cond_true105
%tmp153 = add i32 %level, -3 ; <i32> [#uses=2]
%tmp154 = icmp sgt i32 %tmp153, 0 ; <i1> [#uses=1]
%max155 = select i1 %tmp154, i32 %tmp153, i32 1 ; <i32> [#uses=0]
ret void
}

View File

@ -1,54 +0,0 @@
; RUN: opt < %s -gvnpre -S | grep tmp114115.gvnpre
%struct.AV = type { %struct.XPVAV*, i32, i32 }
%struct.CLONE_PARAMS = type { %struct.AV*, i32, %struct.PerlInterpreter* }
%struct.HE = type { %struct.HE*, %struct.HEK*, %struct.SV* }
%struct.HEK = type { i32, i32, [1 x i8] }
%struct.HV = type { %struct.XPVHV*, i32, i32 }
%struct.MAGIC = type { %struct.MAGIC*, %struct.MGVTBL*, i16, i8, i8, %struct.SV*, i8*, i32 }
%struct.MGVTBL = type { i32 (%struct.SV*, %struct.MAGIC*)*, i32 (%struct.SV*, %struct.MAGIC*)*, i32 (%struct.SV*, %struct.MAGIC*)*, i32 (%struct.SV*, %struct.MAGIC*)*, i32 (%struct.SV*, %struct.MAGIC*)*, i32 (%struct.SV*, %struct.MAGIC*, %struct.SV*, i8*, i32)*, i32 (%struct.MAGIC*, %struct.CLONE_PARAMS*)* }
%struct.OP = type { %struct.OP*, %struct.OP*, %struct.OP* ()*, i32, i16, i16, i8, i8 }
%struct.PMOP = type { %struct.OP*, %struct.OP*, %struct.OP* ()*, i32, i16, i16, i8, i8, %struct.OP*, %struct.OP*, %struct.OP*, %struct.OP*, %struct.PMOP*, %struct.REGEXP*, i32, i32, i8, %struct.HV* }
%struct.PerlInterpreter = type { i8 }
%struct.REGEXP = type { i32*, i32*, %struct.regnode*, %struct.reg_substr_data*, i8*, %struct.reg_data*, i8*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, [1 x %struct.regnode] }
%struct.SV = type { i8*, i32, i32 }
%struct.XPVAV = type { i8*, i32, i32, i32, double, %struct.MAGIC*, %struct.HV*, %struct.SV**, %struct.SV*, i8 }
%struct.XPVHV = type { i8*, i32, i32, i32, double, %struct.MAGIC*, %struct.HV*, i32, %struct.HE*, %struct.PMOP*, i8* }
%struct.reg_data = type { i32, i8*, [1 x i8*] }
%struct.reg_substr_data = type { [3 x %struct.reg_substr_datum] }
%struct.reg_substr_datum = type { i32, i32, %struct.SV*, %struct.SV* }
%struct.regnode = type { i8, i8, i16 }
define void @Perl_op_clear(%struct.OP* %o) {
entry:
switch i32 0, label %bb106 [
i32 13, label %bb106
i32 31, label %clear_pmop
i32 32, label %clear_pmop
i32 33, label %bb101
]
bb101: ; preds = %entry
%tmp102103 = bitcast %struct.OP* %o to %struct.PMOP* ; <%struct.PMOP*> [#uses=1]
%tmp104 = getelementptr %struct.PMOP* %tmp102103, i32 0, i32 10 ; <%struct.OP**> [#uses=0]
br i1 false, label %cond_next174, label %cond_true122
bb106: ; preds = %entry, %entry
%tmp107108 = bitcast %struct.OP* %o to %struct.PMOP* ; <%struct.PMOP*> [#uses=0]
br label %clear_pmop
clear_pmop: ; preds = %bb106, %entry, %entry
%tmp114115 = bitcast %struct.OP* %o to %struct.PMOP* ; <%struct.PMOP*> [#uses=0]
br label %cond_true122
cond_true122: ; preds = %clear_pmop, %bb101
br i1 false, label %cond_next174, label %cond_true129
cond_true129: ; preds = %cond_true122
ret void
cond_next174: ; preds = %cond_true122, %bb101
%tmp175176 = bitcast %struct.OP* %o to %struct.PMOP* ; <%struct.PMOP*> [#uses=1]
%tmp177 = getelementptr %struct.PMOP* %tmp175176, i32 0, i32 10 ; <%struct.OP**> [#uses=0]
ret void
}

View File

@ -1,14 +0,0 @@
; RUN: opt < %s -gvnpre | llvm-dis
%"struct.ObjectArena<char>" = type { i32, i32, %"struct.ResizeArray<char*>", i8*, i8* }
%"struct.ResizeArray<char*>" = type { i32 (...)**, %"struct.ResizeArrayRaw<char*>"* }
%"struct.ResizeArrayRaw<char*>" = type { i8**, i8*, i32, i32, i32, float, i32 }
define void @_ZN11ObjectArenaIcED1Ev(%"struct.ObjectArena<char>"* %this) {
entry:
br label %cond_true21
cond_true21: ; preds = %cond_true21, %entry
%tmp215.0 = phi %"struct.ResizeArray<char*>"* [ null, %entry ], [ null, %cond_true21 ] ; <%"struct.ResizeArray<char*>"*> [#uses=1]
%tmp2.i2 = getelementptr %"struct.ResizeArray<char*>"* %tmp215.0, i32 0, i32 1 ; <%"struct.ResizeArrayRaw<char*>"**> [#uses=0]
br label %cond_true21
}

View File

@ -1,38 +0,0 @@
; RUN: opt < %s -gvnpre -S | not grep {%z3 =}
; RUN: opt < %s -gvnpre -S | not grep {%z9 =}
define i32 @main() {
block1:
%z1 = bitcast i32 0 to i32 ; <i32> [#uses=5]
br label %block2
block2: ; preds = %block6, %block1
%z2 = phi i32 [ %z1, %block1 ], [ %z3, %block6 ] ; <i32> [#uses=3]
%z3 = add i32 %z2, 1 ; <i32> [#uses=5]
br i1 false, label %block3, label %block7
block3: ; preds = %block2
br i1 true, label %block4, label %block5
block4: ; preds = %block3
%z4 = add i32 %z2, %z3 ; <i32> [#uses=1]
%z5 = bitcast i32 %z4 to i32 ; <i32> [#uses=1]
%z6 = add i32 %z1, %z5 ; <i32> [#uses=0]
br label %block6
block5: ; preds = %block3
%z7 = add i32 %z3, 1 ; <i32> [#uses=1]
br label %block6
block6: ; preds = %block5, %block4
%z8 = phi i32 [ %z1, %block4 ], [ %z7, %block5 ] ; <i32> [#uses=1]
%z9 = add i32 %z2, %z3 ; <i32> [#uses=2]
%z10 = add i32 %z9, %z8 ; <i32> [#uses=0]
%z11 = bitcast i32 12 to i32 ; <i32> [#uses=1]
%z12 = add i32 %z9, %z11 ; <i32> [#uses=1]
%z13 = add i32 %z12, %z3 ; <i32> [#uses=0]
br label %block2
block7: ; preds = %block2
ret i32 %z1
}

View File

@ -1,17 +0,0 @@
; RUN: opt < %s -gvnpre -S | grep b.gvnpre
define i32 @extract() {
entry: ; preds = %cond_false, %entry
br i1 true, label %cond_true, label %cond_false
cond_true:
br label %end
cond_false:
%a = sext i16 0 to i32
br label %end
end:
%b = sext i16 0 to i32
ret i32 %b
}

View File

@ -1,3 +0,0 @@
load_lib llvm.exp
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]

View File

@ -1,18 +0,0 @@
; RUN: opt < %s -gvnpre -S | grep b.gvnpre
define i32 @extract() {
entry: ; preds = %cond_false, %entry
%foo = add <2 x i32> < i32 1, i32 1 >, < i32 1, i32 1 >
br i1 true, label %cond_true, label %cond_false
cond_true:
br label %end
cond_false:
%a = extractelement <2 x i32> %foo, i32 0
br label %end
end:
%b = extractelement <2 x i32> %foo, i32 0
ret i32 %b
}

View File

@ -1,17 +0,0 @@
; RUN: opt < %s -gvnpre -S | grep b.gvnpre
define i32 @extract({ i32 }* %P) {
entry: ; preds = %cond_false, %entry
br i1 true, label %cond_true, label %cond_false
cond_true:
br label %end
cond_false:
%a = getelementptr { i32 }* %P, i32 0, i32 0
br label %end
end:
%b = getelementptr { i32 }* %P, i32 0, i32 0
ret i32 0
}

View File

@ -1,18 +0,0 @@
; RUN: opt < %s -gvnpre -S | grep b.gvnpre
define i32 @extract() {
entry: ; preds = %cond_false, %entry
%foo = add <2 x i32> < i32 1, i32 1 >, < i32 1, i32 1 >
br i1 true, label %cond_true, label %cond_false
cond_true:
br label %end
cond_false:
%a = insertelement <2 x i32> %foo, i32 0, i32 3
br label %end
end:
%b = insertelement <2 x i32> %foo, i32 0, i32 3
ret i32 0
}

View File

@ -1,17 +0,0 @@
; RUN: opt < %s -gvnpre -S | grep b.gvnpre
define i32 @extract() {
entry: ; preds = %cond_false, %entry
br i1 true, label %cond_true, label %cond_false
cond_true:
br label %end
cond_false:
%a = select i1 true, i32 0, i32 1
br label %end
end:
%b = select i1 true, i32 0, i32 1
ret i32 %b
}

View File

@ -1,18 +0,0 @@
; RUN: opt < %s -gvnpre -S | grep b.gvnpre
define i32 @extract() {
entry: ; preds = %cond_false, %entry
%foo = add <2 x i32> < i32 1, i32 1 >, < i32 1, i32 1 >
br i1 true, label %cond_true, label %cond_false
cond_true:
br label %end
cond_false:
%a = shufflevector <2 x i32> %foo, <2 x i32> undef, <2 x i32> < i32 0, i32 1 >
br label %end
end:
%b = shufflevector <2 x i32> %foo, <2 x i32> undef, <2 x i32> < i32 0, i32 1 >
ret i32 0
}