llvm.org GIT mirror llvm / 7e66c0d
Find loop back edges only after empty blocks are eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61752 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
2 changed file(s) with 4 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
124124 bool CodeGenPrepare::runOnFunction(Function &F) {
125125 bool EverMadeChange = false;
126126
127 findLoopBackEdges(F);
128
129127 // First pass, eliminate blocks that contain only PHI nodes and an
130128 // unconditional branch.
131129 EverMadeChange |= EliminateMostlyEmptyBlocks(F);
130
131 // Now find loop back edges.
132 findLoopBackEdges(F);
132133
133134 bool MadeChange = true;
134135 while (MadeChange) {
None ; RUN: llvm-as < %s | llc -march=x86 | grep xor | count 1
0 ; RUN: llvm-as < %s | llc -march=x86 | grep xor | count 2
11
22 %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
33 %struct.ImgT = type { i8, i8*, i8*, %struct.FILE*, i32, i32, i32, i32, i8*, double*, float*, float*, float*, i32*, double, double, i32*, double*, i32*, i32* }