[PATCH] D24086: Misleading comments of SplitBlockAndInsertIfThenElse in BasicBlockUtils.h
Zhe Yu Wu via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 09:00:43 PDT 2016
jery created this revision.
jery added reviewers: eugenis, lattner.
jery added a subscriber: llvm-commits.
The comments of SplitBlockAndInsertIfThenElse say the SplitBefore instruction will stay in the old block.
But according to the implementation(split the block at SplitBefore by using splitBasicBlock), the SplitBefore will be moved to the new block.
This patch fixes the comments.
@@ -229,9 +229,9 @@
ReturnInst *FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
-/// Split the containing block at the specified instruction - everything before
-/// and including SplitBefore stays in the old basic block, and everything after
-/// SplitBefore is moved to a new block. The two blocks are connected by a
+/// Split the containing block at the specified instruction - everything BEFORE
+/// SplitBefore stays in the old basic block, and the rest of the instructions
+/// in the BB are moved to a new block. The two blocks are connected by a
/// conditional branch (with value of Cmp being the condition).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 945 bytes
Desc: not available
More information about the llvm-commits