llvm.org GIT mirror llvm / a5595b0
Reword a few comments for AnalyzeBranch and InsertBranch, and fix a few typos. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79503 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
1 changed file(s) with 13 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
210210 /// 2. If this block ends with only an unconditional branch, it sets TBB to be
211211 /// the destination block.
212212 /// 3. If this block ends with an conditional branch and it falls through to
213 /// an successor block, it sets TBB to be the branch destination block and
213 /// a successor block, it sets TBB to be the branch destination block and
214214 /// a list of operands that evaluate the condition. These
215215 /// operands can be passed to other TargetInstrInfo methods to create new
216216 /// branches.
217 /// 4. If this block ends with an conditional branch and an unconditional
218 /// block, it returns the 'true' destination in TBB, the 'false'
219 /// destination in FBB, and a list of operands that evaluate the condition.
220 /// These operands can be passed to other TargetInstrInfo methods to create
221 /// new branches.
217 /// 4. If this block ends with a conditional branch followed by an
218 /// unconditional branch, it returns the 'true' destination in TBB, the
219 /// 'false' destination in FBB, and a list of operands that evaluate the
220 /// condition. These operands can be passed to other TargetInstrInfo
221 /// methods to create new branches.
222222 ///
223223 /// Note that RemoveBranch and InsertBranch must be implemented to support
224224 /// cases where this method returns success.
232232 bool AllowModify = false) const {
233233 return true;
234234 }
235
235
236236 /// RemoveBranch - Remove the branching code at the end of the specific MBB.
237237 /// This is only invoked in cases where AnalyzeBranch returns success. It
238238 /// returns the number of instructions that were removed.
240240 assert(0 && "Target didn't implement TargetInstrInfo::RemoveBranch!");
241241 return 0;
242242 }
243
244 /// InsertBranch - Insert a branch into the end of the specified
245 /// MachineBasicBlock. This operands to this method are the same as those
246 /// returned by AnalyzeBranch. This is invoked in cases where AnalyzeBranch
247 /// returns success and when an unconditional branch (TBB is non-null, FBB is
248 /// null, Cond is empty) needs to be inserted. It returns the number of
249 /// instructions inserted.
243
244 /// InsertBranch - Insert branch code into the end of the specified
245 /// MachineBasicBlock. The operands to this method are the same as those
246 /// returned by AnalyzeBranch. This is only invoked in cases where
247 /// AnalyzeBranch returns success. It returns the number of instructions
248 /// inserted.
250249 ///
251250 /// It is also invoked by tail merging to add unconditional branches in
252251 /// cases where AnalyzeBranch doesn't apply because there was no original