From d9145fca7f4b88b0b6f7d2e059ad88e7394db5ec Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Mon, 18 May 2009 21:02:18 +0000 Subject: Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return value correctly indicates whether it changed the code. llvm-svn: 72038 --- llvm/lib/CodeGen/CodePlacementOpt.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/CodeGen/CodePlacementOpt.cpp') 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()) { -- cgit v1.2.3