From 286f20b1a27626a45d38d5fcafd243bb52ed8d18 Mon Sep 17 00:00:00 2001 From: Kyle Butt Date: Sat, 4 Feb 2017 02:26:34 +0000 Subject: [PATCH] [CodeGen]: BlockPlacement: Skip extraneous logging. 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/MachineBlockPlacement.cpp b/lib/CodeGen/MachineBlockPlacement.cpp index 6be20ab6d5a..8a57f009975 100644 --- a/lib/CodeGen/MachineBlockPlacement.cpp +++ b/lib/CodeGen/MachineBlockPlacement.cpp @@ -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; -- 2.50.1