summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/BasicBlockUtils.cpp34
-rw-r--r--llvm/lib/VMCore/BasicBlock.cpp22
2 files changed, 28 insertions, 28 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index bf1e3612b26..efaf22d459a 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -20,9 +20,9 @@
#include <algorithm>
using namespace llvm;
-// ReplaceInstWithValue - Replace all uses of an instruction (specified by BI)
-// with a value, then remove and delete the original instruction.
-//
+/// ReplaceInstWithValue - Replace all uses of an instruction (specified by BI)
+/// with a value, then remove and delete the original instruction.
+///
void llvm::ReplaceInstWithValue(BasicBlock::InstListType &BIL,
BasicBlock::iterator &BI, Value *V) {
Instruction &I = *BI;
@@ -40,10 +40,10 @@ void llvm::ReplaceInstWithValue(BasicBlock::InstListType &BIL,
}
-// ReplaceInstWithInst - Replace the instruction specified by BI with the
-// instruction specified by I. The original instruction is deleted and BI is
-// updated to point to the new instruction.
-//
+/// ReplaceInstWithInst - Replace the instruction specified by BI with the
+/// instruction specified by I. The original instruction is deleted and BI is
+/// updated to point to the new instruction.
+///
void llvm::ReplaceInstWithInst(BasicBlock::InstListType &BIL,
BasicBlock::iterator &BI, Instruction *I) {
assert(I->getParent() == 0 &&
@@ -59,21 +59,21 @@ void llvm::ReplaceInstWithInst(BasicBlock::InstListType &BIL,
BI = New;
}
-// ReplaceInstWithInst - Replace the instruction specified by From with the
-// instruction specified by To.
-//
+/// ReplaceInstWithInst - Replace the instruction specified by From with the
+/// instruction specified by To.
+///
void llvm::ReplaceInstWithInst(Instruction *From, Instruction *To) {
BasicBlock::iterator BI(From);
ReplaceInstWithInst(From->getParent()->getInstList(), BI, To);
}
-// RemoveSuccessor - Change the specified terminator instruction such that its
-// successor #SuccNum no longer exists. Because this reduces the outgoing
-// degree of the current basic block, the actual terminator instruction itself
-// may have to be changed. In the case where the last successor of the block is
-// deleted, a return instruction is inserted in its place which can cause a
-// surprising change in program behavior if it is not expected.
-//
+/// RemoveSuccessor - Change the specified terminator instruction such that its
+/// successor #SuccNum no longer exists. Because this reduces the outgoing
+/// degree of the current basic block, the actual terminator instruction itself
+/// may have to be changed. In the case where the last successor of the block is
+/// deleted, a return instruction is inserted in its place which can cause a
+/// surprising change in program behavior if it is not expected.
+///
void llvm::RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) {
assert(SuccNum < TI->getNumSuccessors() &&
"Trying to remove a nonexistant successor!");
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index 95eab23edff..65ba49a837f 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/lib/VMCore/BasicBlock.cpp
@@ -195,17 +195,17 @@ void BasicBlock::removePredecessor(BasicBlock *Pred,
}
-// splitBasicBlock - This splits a basic block into two at the specified
-// instruction. Note that all instructions BEFORE the specified iterator stay
-// as part of the original basic block, an unconditional branch is added to
-// the new BB, and the rest of the instructions in the BB are moved to the new
-// BB, including the old terminator. This invalidates the iterator.
-//
-// Note that this only works on well formed basic blocks (must have a
-// terminator), and 'I' must not be the end of instruction list (which would
-// cause a degenerate basic block to be formed, having a terminator inside of
-// the basic block).
-//
+/// splitBasicBlock - This splits a basic block into two at the specified
+/// instruction. Note that all instructions BEFORE the specified iterator stay
+/// as part of the original basic block, an unconditional branch is added to
+/// the new BB, and the rest of the instructions in the BB are moved to the new
+/// BB, including the old terminator. This invalidates the iterator.
+///
+/// Note that this only works on well formed basic blocks (must have a
+/// terminator), and 'I' must not be the end of instruction list (which would
+/// cause a degenerate basic block to be formed, having a terminator inside of
+/// the basic block).
+///
BasicBlock *BasicBlock::splitBasicBlock(iterator I, const std::string &BBName) {
assert(getTerminator() && "Can't use splitBasicBlock on degenerate BB!");
assert(I != InstList.end() &&
OpenPOWER on IntegriCloud