summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodePlacementOpt.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-05-08 06:57:41 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-05-08 06:57:41 +0000
commitb873ed672dd23d9dcc1ed2abaf9d6da0bd79cf89 (patch)
tree9ca4678165394f6382d97fba89e4bb5f83052a5c /llvm/lib/CodeGen/CodePlacementOpt.cpp
parent702fbf94a05b132cd294c02ba70dcb71dfe06d26 (diff)
downloadbcm5719-llvm-b873ed672dd23d9dcc1ed2abaf9d6da0bd79cf89.tar.gz
bcm5719-llvm-b873ed672dd23d9dcc1ed2abaf9d6da0bd79cf89.zip
Add explicit braces to disambiguate nested if/else. Removes a warning.
llvm-svn: 71211
Diffstat (limited to 'llvm/lib/CodeGen/CodePlacementOpt.cpp')
-rw-r--r--llvm/lib/CodeGen/CodePlacementOpt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodePlacementOpt.cpp b/llvm/lib/CodeGen/CodePlacementOpt.cpp
index d297d5aceb6..f6a8421c434 100644
--- a/llvm/lib/CodeGen/CodePlacementOpt.cpp
+++ b/llvm/lib/CodeGen/CodePlacementOpt.cpp
@@ -203,7 +203,7 @@ bool CodePlacementOpt::OptimizeIntraLoopEdges() {
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 @@ bool CodePlacementOpt::OptimizeIntraLoopEdges() {
FBB = 0;
--Cost;
}
+ }
}
if (Cost)
continue;
OpenPOWER on IntegriCloud