mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Find loop back edges only after empty blocks are eliminated.
llvm-svn: 61752
This commit is contained in:
parent
d72ab018c0
commit
36e238a4d3
@ -125,12 +125,13 @@ void CodeGenPrepare::findLoopBackEdges(Function &F) {
|
||||
bool CodeGenPrepare::runOnFunction(Function &F) {
|
||||
bool EverMadeChange = false;
|
||||
|
||||
findLoopBackEdges(F);
|
||||
|
||||
// First pass, eliminate blocks that contain only PHI nodes and an
|
||||
// unconditional branch.
|
||||
EverMadeChange |= EliminateMostlyEmptyBlocks(F);
|
||||
|
||||
// Now find loop back edges.
|
||||
findLoopBackEdges(F);
|
||||
|
||||
bool MadeChange = true;
|
||||
while (MadeChange) {
|
||||
MadeChange = false;
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=x86 | grep xor | count 1
|
||||
; RUN: llvm-as < %s | llc -march=x86 | grep xor | count 2
|
||||
|
||||
%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 }
|
||||
%struct.ImgT = type { i8, i8*, i8*, %struct.FILE*, i32, i32, i32, i32, i8*, double*, float*, float*, float*, i32*, double, double, i32*, double*, i32*, i32* }
|
||||
|
Loading…
x
Reference in New Issue
Block a user