summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodePlacementOpt.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-05-18 21:02:18 +0000
committerBob Wilson <bob.wilson@apple.com>2009-05-18 21:02:18 +0000
commitd9145fca7f4b88b0b6f7d2e059ad88e7394db5ec (patch)
treeaba255dd83650f3e7f4156c49ec847d4071d47cb /llvm/lib/CodeGen/CodePlacementOpt.cpp
parent320d54a2d81dd508a4062d5dd3598d1392dc3c3b (diff)
downloadbcm5719-llvm-d9145fca7f4b88b0b6f7d2e059ad88e7394db5ec.tar.gz
bcm5719-llvm-d9145fca7f4b88b0b6f7d2e059ad88e7394db5ec.zip
Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return value
correctly indicates whether it changed the code. llvm-svn: 72038
Diffstat (limited to 'llvm/lib/CodeGen/CodePlacementOpt.cpp')
-rw-r--r--llvm/lib/CodeGen/CodePlacementOpt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CodePlacementOpt.cpp b/llvm/lib/CodeGen/CodePlacementOpt.cpp
index 919ee54fb3f..383098e11ef 100644
--- a/llvm/lib/CodeGen/CodePlacementOpt.cpp
+++ b/llvm/lib/CodeGen/CodePlacementOpt.cpp
@@ -134,6 +134,7 @@ bool CodePlacementOpt::OptimizeIntraLoopEdges() {
TII->RemoveBranch(*MBB);
ChangedMBBs.insert(MBB);
++NumIntraElim;
+ Changed = true;
continue;
}
@@ -231,6 +232,7 @@ bool CodePlacementOpt::OptimizeIntraLoopEdges() {
TII->InsertBranch(*FtMBB, FtTBB, FtFBB, FtCond);
ChangedMBBs.insert(FtMBB);
}
+ Changed = true;
// If BB is the loop latch, we may have a new loop headr.
if (MBB == L->getLoopLatch()) {
OpenPOWER on IntegriCloud