diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-08 21:06:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-08 21:06:27 +0000 |
commit | e802a023d98b06307831cd122e61da86431e8dac (patch) | |
tree | 7b3bd5dba790a6e174f699b7c84f3dfd2eec36b7 /include/llvm | |
parent | 7ca266fe1f211afaec0bdb3b8d8e8a98d2c78fbc (diff) | |
download | external_llvm-e802a023d98b06307831cd122e61da86431e8dac.zip external_llvm-e802a023d98b06307831cd122e61da86431e8dac.tar.gz external_llvm-e802a023d98b06307831cd122e61da86431e8dac.tar.bz2 |
Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Transforms/Scalar.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index 3161d68..1ade0f4 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -11,6 +11,7 @@ class Pass; class GetElementPtrInst; class PassInfo; +class TerminatorInst; //===----------------------------------------------------------------------===// // @@ -188,6 +189,21 @@ Pass *createCFGSimplificationPass(); Pass *createBreakCriticalEdgesPass(); extern const PassInfo *BreakCriticalEdgesID; +// The BreakCriticalEdges pass also exposes some low-level functionality that +// may be used by other passes. + +/// isCriticalEdge - Return true if the specified edge is a critical edge. +/// Critical edges are edges from a block with multiple successors to a block +/// with multiple predecessors. +/// +bool isCriticalEdge(const TerminatorInst *TI, unsigned SuccNum); + +/// SplitCriticalEdge - Insert a new node node to split the critical edge. This +/// will update DominatorSet, ImmediateDominator and DominatorTree information +/// if a pass is specified, thus calling this pass will not invalidate these +/// analyses. +/// +void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P = 0); //===----------------------------------------------------------------------===// // |