[llvm-commits] [llvm] r88932 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp
Bob Wilson
bob.wilson at apple.com
Mon Nov 16 10:54:08 PST 2009
Author: bwilson
Date: Mon Nov 16 12:54:08 2009
New Revision: 88932
URL: http://llvm.org/viewvc/llvm-project?rev=88932&view=rev
Log:
Fix some comments.
Modified:
llvm/trunk/lib/CodeGen/BranchFolding.cpp
Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=88932&r1=88931&r2=88932&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Mon Nov 16 12:54:08 2009
@@ -1025,8 +1025,8 @@
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 @@
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 @@
// 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 @@
}
}
-
// 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 &&
More information about the llvm-commits
mailing list