[PM] Pull the analyses used for another utility routine into its API

rather than relying on the pass object.

This one is a bit annoying, but will pay off. First, supporting this one
will make the next one much easier, and for utilities like LoopSimplify,
this is moving them (slowly) closer to not having to pass the pass
object around throughout their APIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226396 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth
2015-01-18 09:21:15 +00:00
parent 7478e27573
commit 5817eaff8f
7 changed files with 102 additions and 63 deletions

View File

@@ -168,8 +168,12 @@ BasicBlock *SplitBlock(BasicBlock *Old, Instruction *SplitPt,
/// complicated to handle the case where one of the edges being split
/// is an exit of a loop with other exits).
///
BasicBlock *SplitBlockPredecessors(BasicBlock *BB, ArrayRef<BasicBlock*> Preds,
const char *Suffix, Pass *P = nullptr);
BasicBlock *SplitBlockPredecessors(BasicBlock *BB, ArrayRef<BasicBlock *> Preds,
const char *Suffix,
AliasAnalysis *AA = nullptr,
DominatorTree *DT = nullptr,
LoopInfo *LI = nullptr,
bool PreserveLCSSA = false);
/// SplitLandingPadPredecessors - This method transforms the landing pad,
/// OrigBB, by introducing two new basic blocks into the function. One of those