From: Kyle Butt Date: Sat, 4 Feb 2017 02:26:34 +0000 (+0000) Subject: [CodeGen]: BlockPlacement: Skip extraneous logging. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=286f20b1a27626a45d38d5fcafd243bb52ed8d18;p=llvm [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 --- 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;