]> granicus.if.org Git - llvm/commitdiff
[CodeGen]: BlockPlacement: Skip extraneous logging.
authorKyle Butt <kyle+llvm@iteratee.net>
Sat, 4 Feb 2017 02:26:34 +0000 (02:26 +0000)
committerKyle Butt <kyle+llvm@iteratee.net>
Sat, 4 Feb 2017 02:26:34 +0000 (02:26 +0000)
Move a check for blocks that are not candidates for tail duplication up before
the logging. Reduces logging noise. No non-logging changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294086 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineBlockPlacement.cpp

index 6be20ab6d5a06370f7abfa0da013dba8eb1982f4..8a57f0099751045a7296c24362a34ef4a4b0c052 100644 (file)
@@ -2215,13 +2215,13 @@ bool MachineBlockPlacement::maybeTailDuplicateBlock(
     BlockChain &Chain, BlockFilterSet *BlockFilter,
     MachineFunction::iterator &PrevUnplacedBlockIt,
     bool &DuplicatedToLPred) {
-
   DuplicatedToLPred = false;
+  if (!shouldTailDuplicate(BB))
+    return false;
+
   DEBUG(dbgs() << "Redoing tail duplication for Succ#"
         << BB->getNumber() << "\n");
 
-  if (!shouldTailDuplicate(BB))
-    return false;
   // This has to be a callback because none of it can be done after
   // BB is deleted.
   bool Removed = false;