[llvm-commits] [llvm] r71211 - /llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp
Nick Lewycky
nicholas at mxc.ca
Thu May 7 23:57:42 PDT 2009
Author: nicholas
Date: Fri May 8 01:57:41 2009
New Revision: 71211
URL: http://llvm.org/viewvc/llvm-project?rev=71211&view=rev
Log:
Add explicit braces to disambiguate nested if/else. Removes a warning.
Modified:
llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp
Modified: llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp?rev=71211&r1=71210&r2=71211&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp Fri May 8 01:57:41 2009
@@ -203,7 +203,7 @@
if (SuccMBB->isLayoutSuccessor(SSMBB))
// This will become a jmp.
++Cost;
- else if (MBB->isLayoutSuccessor(SSMBB))
+ else if (MBB->isLayoutSuccessor(SSMBB)) {
// One of the successor will become the new fallthrough.
if (SSMBB == FBB) {
FBB = 0;
@@ -216,6 +216,7 @@
FBB = 0;
--Cost;
}
+ }
}
if (Cost)
continue;
More information about the llvm-commits
mailing list