[llvm] 9ed65c7 - [NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): add debug output when failing to actually sink instr

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 14:22:29 PDT 2020


Author: Roman Lebedev
Date: 2020-07-16T00:21:55+03:00
New Revision: 9ed65c76c04944e985ca8cde64e16919af0e26b0

URL: https://github.com/llvm/llvm-project/commit/9ed65c76c04944e985ca8cde64e16919af0e26b0
DIFF: https://github.com/llvm/llvm-project/commit/9ed65c76c04944e985ca8cde64e16919af0e26b0.diff

LOG: [NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): add debug output when failing to actually sink instr

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 74c7f0db01c2..58995c4f3bc9 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1895,8 +1895,12 @@ static bool SinkCommonCodeFromPredecessors(BasicBlock *BB) {
       break;
     }
 
-    if (!sinkLastInstruction(UnconditionalPreds))
+    if (!sinkLastInstruction(UnconditionalPreds)) {
+      LLVM_DEBUG(
+          dbgs()
+          << "SINK: stopping here, failed to actually sink instruction!\n");
       return Changed;
+    }
     NumSinkCommonInstrs++;
     Changed = true;
   }


        


More information about the llvm-commits mailing list