Reword a few comments for AnalyzeBranch and InsertBranch, and fix

a few typos.

llvm-svn: 79503
This commit is contained in:
Dan Gohman 2009-08-20 01:33:25 +00:00
parent 068928b2a6
commit 30584ea4a4
1 changed files with 13 additions and 14 deletions

View File

@ -211,15 +211,15 @@ public:
/// 2. If this block ends with only an unconditional branch, it sets TBB to be /// 2. If this block ends with only an unconditional branch, it sets TBB to be
/// the destination block. /// the destination block.
/// 3. If this block ends with an conditional branch and it falls through to /// 3. If this block ends with an conditional branch and it falls through to
/// an successor block, it sets TBB to be the branch destination block and /// a successor block, it sets TBB to be the branch destination block and
/// a list of operands that evaluate the condition. These /// a list of operands that evaluate the condition. These
/// operands can be passed to other TargetInstrInfo methods to create new /// operands can be passed to other TargetInstrInfo methods to create new
/// branches. /// branches.
/// 4. If this block ends with an conditional branch and an unconditional /// 4. If this block ends with a conditional branch followed by an
/// block, it returns the 'true' destination in TBB, the 'false' /// unconditional branch, it returns the 'true' destination in TBB, the
/// destination in FBB, and a list of operands that evaluate the condition. /// 'false' destination in FBB, and a list of operands that evaluate the
/// These operands can be passed to other TargetInstrInfo methods to create /// condition. These operands can be passed to other TargetInstrInfo
/// new branches. /// methods to create new branches.
/// ///
/// Note that RemoveBranch and InsertBranch must be implemented to support /// Note that RemoveBranch and InsertBranch must be implemented to support
/// cases where this method returns success. /// cases where this method returns success.
@ -233,7 +233,7 @@ public:
bool AllowModify = false) const { bool AllowModify = false) const {
return true; return true;
} }
/// RemoveBranch - Remove the branching code at the end of the specific MBB. /// RemoveBranch - Remove the branching code at the end of the specific MBB.
/// This is only invoked in cases where AnalyzeBranch returns success. It /// This is only invoked in cases where AnalyzeBranch returns success. It
/// returns the number of instructions that were removed. /// returns the number of instructions that were removed.
@ -241,13 +241,12 @@ public:
assert(0 && "Target didn't implement TargetInstrInfo::RemoveBranch!"); assert(0 && "Target didn't implement TargetInstrInfo::RemoveBranch!");
return 0; return 0;
} }
/// InsertBranch - Insert a branch into the end of the specified /// InsertBranch - Insert branch code into the end of the specified
/// MachineBasicBlock. This operands to this method are the same as those /// MachineBasicBlock. The operands to this method are the same as those
/// returned by AnalyzeBranch. This is invoked in cases where AnalyzeBranch /// returned by AnalyzeBranch. This is only invoked in cases where
/// returns success and when an unconditional branch (TBB is non-null, FBB is /// AnalyzeBranch returns success. It returns the number of instructions
/// null, Cond is empty) needs to be inserted. It returns the number of /// inserted.
/// instructions inserted.
/// ///
/// It is also invoked by tail merging to add unconditional branches in /// It is also invoked by tail merging to add unconditional branches in
/// cases where AnalyzeBranch doesn't apply because there was no original /// cases where AnalyzeBranch doesn't apply because there was no original