Index: llvm/trunk/lib/Analysis/BlockFrequencyInfo.cpp =================================================================== --- llvm/trunk/lib/Analysis/BlockFrequencyInfo.cpp +++ llvm/trunk/lib/Analysis/BlockFrequencyInfo.cpp @@ -26,7 +26,6 @@ #define DEBUG_TYPE "block-freq" -#ifndef NDEBUG static cl::opt ViewBlockFreqPropagationDAG( "view-block-freq-propagation-dags", cl::Hidden, cl::desc("Pop up a window to show a dag displaying how block " @@ -116,7 +115,6 @@ }; } // end namespace llvm -#endif BlockFrequencyInfo::BlockFrequencyInfo() {} @@ -156,13 +154,11 @@ if (!BFI) BFI.reset(new ImplType); BFI->calculate(F, BPI, LI); -#ifndef NDEBUG if (ViewBlockFreqPropagationDAG != GVDT_None && (ViewBlockFreqFuncName.empty() || F.getName().equals(ViewBlockFreqFuncName))) { view(); } -#endif } BlockFrequency BlockFrequencyInfo::getBlockFreq(const BasicBlock *BB) const { @@ -214,13 +210,7 @@ /// Pop up a ghostview window with the current block frequency propagation /// rendered using dot. void BlockFrequencyInfo::view() const { -// This code is only for debugging. -#ifndef NDEBUG ViewGraph(const_cast(this), "BlockFrequencyDAGs"); -#else - errs() << "BlockFrequencyInfo::view is only available in debug builds on " - "systems with Graphviz or gv!\n"; -#endif // NDEBUG } const Function *BlockFrequencyInfo::getFunction() const { Index: llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp =================================================================== --- llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -28,7 +28,6 @@ #define DEBUG_TYPE "block-freq" -#ifndef NDEBUG static cl::opt ViewMachineBlockFreqPropagationDAG( "view-machine-block-freq-propagation-dags", cl::Hidden, @@ -145,7 +144,6 @@ }; } // end namespace llvm -#endif INITIALIZE_PASS_BEGIN(MachineBlockFrequencyInfo, "machine-block-freq", "Machine Block Frequency Analysis", true, true) @@ -177,13 +175,11 @@ if (!MBFI) MBFI.reset(new ImplType); MBFI->calculate(F, MBPI, MLI); -#ifndef NDEBUG if (ViewMachineBlockFreqPropagationDAG != GVDT_None && (ViewBlockFreqFuncName.empty() || F.getName().equals(ViewBlockFreqFuncName))) { view(); } -#endif return false; } @@ -193,13 +189,8 @@ /// rendered using dot. void MachineBlockFrequencyInfo::view(bool isSimple) const { // This code is only for debugging. -#ifndef NDEBUG ViewGraph(const_cast(this), "MachineBlockFrequencyDAGs", isSimple); -#else - errs() << "MachineBlockFrequencyInfo::view is only available in debug builds " - "on systems with Graphviz or gv!\n"; -#endif // NDEBUG } BlockFrequency Index: llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp =================================================================== --- llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp +++ llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp @@ -160,10 +160,8 @@ extern cl::opt StaticLikelyProb; extern cl::opt ProfileLikelyProb; -#ifndef NDEBUG extern cl::opt ViewBlockLayoutWithBFI; extern cl::opt ViewBlockFreqFuncName; -#endif namespace { class BlockChain; @@ -2365,13 +2363,11 @@ MBI->setAlignment(AlignAllNonFallThruBlocks); } } -#ifndef NDEBUG if (ViewBlockLayoutWithBFI != GVDT_None && (ViewBlockFreqFuncName.empty() || F->getFunction()->getName().equals(ViewBlockFreqFuncName))) { MBFI->view(false); } -#endif // We always return true as we have no way to track whether the final order Index: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp =================================================================== --- llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -1223,7 +1223,6 @@ ColdFunctions.push_back(&F); else if (FreqAttr == PGOUseFunc::FFA_Hot) HotFunctions.push_back(&F); -#ifndef NDEBUG if (PGOViewCounts && (PGOViewFunction.empty() || F.getName().equals(PGOViewFunction))) { LoopInfo LI{DominatorTree(F)}; @@ -1234,7 +1233,6 @@ NewBFI->view(); } -#endif if (PGOViewRawCounts && (PGOViewFunction.empty() || F.getName().equals(PGOViewFunction))) { if (PGOViewFunction.empty())