Fix some comments.

llvm-svn: 88932
This commit is contained in:
Bob Wilson 2009-11-16 18:54:08 +00:00
parent 3794ec2519
commit 1a8ea98b76
1 changed files with 4 additions and 5 deletions

View File

@ -1025,8 +1025,8 @@ static bool IsBetterFallthrough(MachineBasicBlock *MBB1,
return MBB2I->getDesc().isCall() && !MBB1I->getDesc().isCall(); return MBB2I->getDesc().isCall() && !MBB1I->getDesc().isCall();
} }
/// TailDuplicate - MBB unconditionally branches to SuccBB. If it is profitable, /// TailDuplicate - If it is profitable, duplicate TailBB's contents in each
/// duplicate SuccBB's contents in MBB to eliminate the branch. /// of its predecessors.
bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB, bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB,
bool PrevFallsThrough, bool PrevFallsThrough,
MachineFunction &MF) { MachineFunction &MF) {
@ -1048,7 +1048,7 @@ bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB,
1 : (TailMergeSize - 1); 1 : (TailMergeSize - 1);
// Check the instructions in the block to determine whether tail-duplication // 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; unsigned i = 0;
bool HasCall = false; bool HasCall = false;
for (MachineBasicBlock::iterator I = TailBB->begin(); for (MachineBasicBlock::iterator I = TailBB->begin();
@ -1088,7 +1088,7 @@ bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB,
// EH edges are ignored by AnalyzeBranch. // EH edges are ignored by AnalyzeBranch.
if (PredBB->succ_size() != 1) if (PredBB->succ_size() != 1)
continue; 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. // only predecessor.
if (PredBB->isLayoutSuccessor(TailBB) && if (PredBB->isLayoutSuccessor(TailBB) &&
PrevFallsThrough && PrevFallsThrough &&
@ -1317,7 +1317,6 @@ ReoptimizeBlock:
} }
} }
// If this branch is the only thing in its block, see if we can forward // If this branch is the only thing in its block, see if we can forward
// other blocks across it. // other blocks across it.
if (CurTBB && CurCond.empty() && CurFBB == 0 && if (CurTBB && CurCond.empty() && CurFBB == 0 &&