Standardize header file comments
[oota-llvm.git] / include / llvm / Transforms / Utils / BasicBlockUtils.h
1 //===-- Transform/Utils/BasicBlockUtils.h - BasicBlock Utils ----*- C++ -*-===//
2 //
3 // This family of functions perform manipulations on basic blocks, and
4 // instructions contained within basic blocks.
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_TRANSFORMS_UTILS_BASICBLOCK_H
9 #define LLVM_TRANSFORMS_UTILS_BASICBLOCK_H
10
11 // FIXME: Move to this file: BasicBlock::removePredecessor, BB::splitBasicBlock
12
13 #include "llvm/BasicBlock.h"
14 class Instruction;
15
16 // ReplaceInstWithValue - Replace all uses of an instruction (specified by BI)
17 // with a value, then remove and delete the original instruction.
18 //
19 void ReplaceInstWithValue(BasicBlock::InstListType &BIL,
20                           BasicBlock::iterator &BI, Value *V);
21
22 // ReplaceInstWithInst - Replace the instruction specified by BI with the
23 // instruction specified by I.  The original instruction is deleted and BI is
24 // updated to point to the new instruction.
25 //
26 void ReplaceInstWithInst(BasicBlock::InstListType &BIL,
27                          BasicBlock::iterator &BI, Instruction *I);
28
29 // ReplaceInstWithInst - Replace the instruction specified by From with the
30 // instruction specified by To.
31 //
32 void ReplaceInstWithInst(Instruction *From, Instruction *To);
33
34
35 // RemoveSuccessor - Change the specified terminator instruction such that its
36 // successor #SuccNum no longer exists.  Because this reduces the outgoing
37 // degree of the current basic block, the actual terminator instruction itself
38 // may have to be changed.  In the case where the last successor of the block is
39 // deleted, a return instruction is inserted in its place which can cause a
40 // suprising change in program behavior if it is not expected.
41 //
42 void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum);
43
44 #endif