Add SplitEdge and SplitBlock utility routines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37952 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2007-07-06 21:39:20 +00:00
parent ec5614b522
commit 8019893c3f
2 changed files with 72 additions and 0 deletions

View File

@@ -107,6 +107,17 @@ inline bool SplitCriticalEdge(BasicBlock *Src, BasicBlock *Dst, Pass *P = 0,
++i;
}
}
/// SplitEdge - Split the edge connecting specified block. Pass P must
/// not be NULL.
BasicBlock *SplitEdge(BasicBlock *From, BasicBlock *To, Pass *P);
/// SplitBlock - Split the specified block at the specified instruction - every
/// thing before SplitPt stays in Old and everything starting with SplitPt moves
/// to a new block. The two blocks are joined by an unconditional branch and
/// the loop info is updated.
///
BasicBlock *SplitBlock(BasicBlock *Old, Instruction *SplitPt, Pass *P);
} // End llvm namespace
#endif