diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-21 01:28:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-21 01:28:02 +0000 |
commit | 54b9c3ba2a5b0aa8fda817bcc72c370040cfb3f8 (patch) | |
tree | 9c74968eb34fbbee3f53742bb676e32e2c2cffdd /include | |
parent | 1b58678d541b424da32195470664e373706e7898 (diff) | |
download | external_llvm-54b9c3ba2a5b0aa8fda817bcc72c370040cfb3f8.zip external_llvm-54b9c3ba2a5b0aa8fda817bcc72c370040cfb3f8.tar.gz external_llvm-54b9c3ba2a5b0aa8fda817bcc72c370040cfb3f8.tar.bz2 |
Move SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.h
as a global helper function. At the same type, switch it from taking
a vector of predecessors to an arbitrary sequential input. This allows
us to switch LoopSimplify to use a SmallVector for various temporary
vectors that it passed into SplitBlockPredecessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Transforms/Utils/BasicBlockUtils.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/BasicBlockUtils.h b/include/llvm/Transforms/Utils/BasicBlockUtils.h index 4230cb1..a44095f 100644 --- a/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -120,6 +120,19 @@ BasicBlock *SplitEdge(BasicBlock *From, BasicBlock *To, Pass *P); /// the loop info is updated. /// BasicBlock *SplitBlock(BasicBlock *Old, Instruction *SplitPt, Pass *P); + +/// SplitBlockPredecessors - This method transforms BB by introducing a new +/// basic block into the function, and moving some of the predecessors of BB to +/// be predecessors of the new block. The new predecessors are indicated by the +/// Preds array, which has NumPreds elements in it. The new block is given a +/// suffix of 'Suffix'. This function returns the new block. +/// +/// This currently updates the LLVM IR, AliasAnalysis, DominatorTree and +/// DominanceFrontier, but no other analyses. +BasicBlock *SplitBlockPredecessors(BasicBlock *BB, BasicBlock *const *Preds, + unsigned NumPreds, const char *Suffix, + Pass *P = 0); + } // End llvm namespace #endif |