summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-11-16 18:54:08 +0000
committerBob Wilson <bob.wilson@apple.com>2009-11-16 18:54:08 +0000
commit1a8ea98b762bb7aabea5fbbe9e01ab845acc1e8d (patch)
tree2bafea0a7b54bee355e6f050da7c8138ce90a889 /llvm/lib/CodeGen/BranchFolding.cpp
parent3794ec25193176aa75da7ec88e380394d8f46080 (diff)
downloadbcm5719-llvm-1a8ea98b762bb7aabea5fbbe9e01ab845acc1e8d.tar.gz
bcm5719-llvm-1a8ea98b762bb7aabea5fbbe9e01ab845acc1e8d.zip
Fix some comments.
llvm-svn: 88932
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 81e7a9779e1..1defbf6cd2d 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -1025,8 +1025,8 @@ static bool IsBetterFallthrough(MachineBasicBlock *MBB1,
return MBB2I->getDesc().isCall() && !MBB1I->getDesc().isCall();
}
-/// TailDuplicate - MBB unconditionally branches to SuccBB. If it is profitable,
-/// duplicate SuccBB's contents in MBB to eliminate the branch.
+/// TailDuplicate - If it is profitable, duplicate TailBB's contents in each
+/// of its predecessors.
bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB,
bool PrevFallsThrough,
MachineFunction &MF) {
@@ -1048,7 +1048,7 @@ bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB,
1 : (TailMergeSize - 1);
// Check the instructions in the block to determine whether tail-duplication
- // is invalid or unlikely to be unprofitable.
+ // is invalid or unlikely to be profitable.
unsigned i = 0;
bool HasCall = false;
for (MachineBasicBlock::iterator I = TailBB->begin();
@@ -1088,7 +1088,7 @@ bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB,
// EH edges are ignored by AnalyzeBranch.
if (PredBB->succ_size() != 1)
continue;
- // Don't duplicate into a fall-through predecessor unless its the
+ // Don't duplicate into a fall-through predecessor unless it's the
// only predecessor.
if (PredBB->isLayoutSuccessor(TailBB) &&
PrevFallsThrough &&
@@ -1317,7 +1317,6 @@ ReoptimizeBlock:
}
}
-
// If this branch is the only thing in its block, see if we can forward
// other blocks across it.
if (CurTBB && CurCond.empty() && CurFBB == 0 &&
OpenPOWER on IntegriCloud