diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-04-23 16:31:48 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-04-23 16:31:48 +0000 |
commit | 85ce0f1f1fbf238001adbcda622586777e5c01d6 (patch) | |
tree | bd33256bc3df2a9578dc4d1f397d57bdd17e5ce1 /llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp | |
parent | d2d1504805f9bf2a9925dd4f09bfe5329f819030 (diff) | |
download | bcm5719-llvm-85ce0f1f1fbf238001adbcda622586777e5c01d6.tar.gz bcm5719-llvm-85ce0f1f1fbf238001adbcda622586777e5c01d6.zip |
improve documentation comments; NFC
llvm-svn: 267292
Diffstat (limited to 'llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp index 95825991cee..49b646a041f 100644 --- a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/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; |