[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): add debug output when failing...
authorRoman Lebedev <lebedev.ri@gmail.com>
Wed, 15 Jul 2020 20:48:31 +0000 (23:48 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Wed, 15 Jul 2020 21:21:55 +0000 (00:21 +0300)
llvm/lib/Transforms/Utils/SimplifyCFG.cpp

index 74c7f0d..58995c4 100644 (file)
@@ -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;
   }