diff options
| author | 2017-01-14 19:55:43 +0000 | |
|---|---|---|
| committer | 2017-01-14 19:55:43 +0000 | |
| commit | bd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch) | |
| tree | 309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp | |
| parent | killp -a should not kill the window if only one pane. (diff) | |
| download | wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip | |
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp')
| -rw-r--r-- | gnu/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/gnu/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp b/gnu/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp index 95825991cee..49b646a041f 100644 --- a/gnu/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/gnu/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -76,11 +76,10 @@ FunctionPass *llvm::createBreakCriticalEdgesPass() { // Implementation of the external critical edge manipulation functions //===----------------------------------------------------------------------===// -/// createPHIsForSplitLoopExit - When a loop exit edge is split, LCSSA form -/// may require new PHIs in the new exit block. This function inserts the -/// new PHIs, as needed. Preds is a list of preds inside the loop, SplitBB -/// is the new loop exit block, and DestBB is the old loop exit, now the -/// successor of SplitBB. +/// When a loop exit edge is split, LCSSA form may require new PHIs in the new +/// exit block. This function inserts the new PHIs, as needed. Preds is a list +/// of preds inside the loop, SplitBB is the new loop exit block, and DestBB is +/// the old loop exit, now the successor of SplitBB. static void createPHIsForSplitLoopExit(ArrayRef<BasicBlock *> Preds, BasicBlock *SplitBB, BasicBlock *DestBB) { @@ -112,25 +111,9 @@ static void createPHIsForSplitLoopExit(ArrayRef<BasicBlock *> Preds, } } -/// SplitCriticalEdge - If this edge is a critical edge, insert a new node to -/// split the critical edge. This will update DominatorTree information if it -/// is available, thus calling this pass will not invalidate either of them. -/// This returns the new block if the edge was split, null otherwise. -/// -/// If MergeIdenticalEdges is true (not the default), *all* edges from TI to the -/// specified successor will be merged into the same critical edge block. -/// This is most commonly interesting with switch instructions, which may -/// have many edges to any one destination. This ensures that all edges to that -/// dest go to one block instead of each going to a different block, but isn't -/// the standard definition of a "critical edge". -/// -/// It is invalid to call this function on a critical edge that starts at an -/// IndirectBrInst. Splitting these edges will almost always create an invalid -/// program because the address of the new block won't be the one that is jumped -/// to. -/// -BasicBlock *llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, - const CriticalEdgeSplittingOptions &Options) { +BasicBlock * +llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, + const CriticalEdgeSplittingOptions &Options) { if (!isCriticalEdge(TI, SuccNum, Options.MergeIdenticalEdges)) return nullptr; |
