[llvm] 8048005 - [NFC][SimplifyCFG] Update documentation comments for SinkCommonCodeFromPredecessors() after 1886aad

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Wed May 5 10:35:24 PDT 2021


Author: Roman Lebedev
Date: 2021-05-05T20:34:59+03:00
New Revision: 8048005739ebf6734b2d841a528c06595062f899

URL: https://github.com/llvm/llvm-project/commit/8048005739ebf6734b2d841a528c06595062f899
DIFF: https://github.com/llvm/llvm-project/commit/8048005739ebf6734b2d841a528c06595062f899.diff

LOG: [NFC][SimplifyCFG] Update documentation comments for SinkCommonCodeFromPredecessors() after 1886aad

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 7e2b32f1e069..be108c094a0a 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1956,13 +1956,11 @@ namespace {
 
 /// Check whether BB's predecessors end with unconditional branches. If it is
 /// true, sink any common code from the predecessors to BB.
-/// We also allow one predecessor to end with conditional branch (but no more
-/// than one).
 static bool SinkCommonCodeFromPredecessors(BasicBlock *BB,
                                            DomTreeUpdater *DTU) {
   // We support two situations:
   //   (1) all incoming arcs are unconditional
-  //   (2) one incoming arc is conditional
+  //   (2) there are non-unconditional incoming arcs
   //
   // (2) is very common in switch defaults and
   // else-if patterns;


        


More information about the llvm-commits mailing list