[llvm] r315854 - Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people.
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 14:24:01 PST 2017
Aaron Ballman via llvm-commits <llvm-commits at lists.llvm.org> writes:
> Author: aaronballman
> Date: Sun Oct 15 07:32:27 2017
> New Revision: 315854
>
> URL: http://llvm.org/viewvc/llvm-project?rev=315854&view=rev
> Log:
> Reverting r315590; it did not include changes for llvm-tblgen, which
> is causing link errors for several people.
What's happening with this? Is someone investigating these errors? I'd
really like the part of this change that moves LLVM_ENABLE_DUMP into
llvm-config.h to get in, as it's currently kind of awkward to use in the
half finished state.
> Error LNK2019 unresolved external symbol "public: void __cdecl
> `anonymous namespace'::MatchableInfo::dump(void)const "
> (?dump at MatchableInfo@?A0xf4f1c304@@QEBAXXZ) referenced in function
> "public: void __cdecl `anonymous
> namespace'::AsmMatcherEmitter::run(class llvm::raw_ostream &)"
> (?run at AsmMatcherEmitter@?A0xf4f1c304@@QEAAXAEAVraw_ostream at llvm@@@Z)
> llvm-tblgen D:\llvm\2017\utils\TableGen\AsmMatcherEmitter.obj 1
>
> Modified:
> llvm/trunk/CMakeLists.txt
> llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
> llvm/trunk/include/llvm/Analysis/DominanceFrontier.h
> llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h
> llvm/trunk/include/llvm/Analysis/RegionInfo.h
> llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h
> llvm/trunk/include/llvm/CodeGen/TargetSchedule.h
> llvm/trunk/include/llvm/Config/config.h.cmake
> llvm/trunk/include/llvm/Config/llvm-config.h.cmake
> llvm/trunk/include/llvm/IR/Attributes.h
> llvm/trunk/include/llvm/MC/MCSchedule.h
> llvm/trunk/include/llvm/Object/Wasm.h
> llvm/trunk/include/llvm/Support/Compiler.h
> llvm/trunk/lib/Analysis/AliasSetTracker.cpp
> llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp
> llvm/trunk/lib/Analysis/CallGraph.cpp
> llvm/trunk/lib/Analysis/DependenceAnalysis.cpp
> llvm/trunk/lib/Analysis/DominanceFrontier.cpp
> llvm/trunk/lib/Analysis/IVUsers.cpp
> llvm/trunk/lib/Analysis/InlineCost.cpp
> llvm/trunk/lib/Analysis/LazyCallGraph.cpp
> llvm/trunk/lib/Analysis/LoopInfo.cpp
> llvm/trunk/lib/Analysis/MemorySSA.cpp
> llvm/trunk/lib/Analysis/PHITransAddr.cpp
> llvm/trunk/lib/Analysis/RegionInfo.cpp
> llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> llvm/trunk/lib/Analysis/Trace.cpp
> llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
> llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
> llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h
> llvm/trunk/lib/CodeGen/BranchRelaxation.cpp
> llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
> llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
> llvm/trunk/lib/CodeGen/GlobalISel/RegisterBank.cpp
> llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
> llvm/trunk/lib/CodeGen/InlineSpiller.cpp
> llvm/trunk/lib/CodeGen/LexicalScopes.cpp
> llvm/trunk/lib/CodeGen/LiveDebugValues.cpp
> llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
> llvm/trunk/lib/CodeGen/LiveInterval.cpp
> llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
> llvm/trunk/lib/CodeGen/LivePhysRegs.cpp
> llvm/trunk/lib/CodeGen/LiveVariables.cpp
> llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
> llvm/trunk/lib/CodeGen/MachineFrameInfo.cpp
> llvm/trunk/lib/CodeGen/MachineFunction.cpp
> llvm/trunk/lib/CodeGen/MachineInstr.cpp
> llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp
> llvm/trunk/lib/CodeGen/MachinePipeliner.cpp
> llvm/trunk/lib/CodeGen/MachineRegionInfo.cpp
> llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp
> llvm/trunk/lib/CodeGen/MachineScheduler.cpp
> llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
> llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
> llvm/trunk/lib/CodeGen/RegisterPressure.cpp
> llvm/trunk/lib/CodeGen/SafeStackColoring.cpp
> llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
> llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
> llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp
> llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
> llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
> llvm/trunk/lib/CodeGen/SlotIndexes.cpp
> llvm/trunk/lib/CodeGen/SplitKit.cpp
> llvm/trunk/lib/CodeGen/StackColoring.cpp
> llvm/trunk/lib/CodeGen/TargetRegisterInfo.cpp
> llvm/trunk/lib/CodeGen/VirtRegMap.cpp
> llvm/trunk/lib/IR/AsmWriter.cpp
> llvm/trunk/lib/IR/Attributes.cpp
> llvm/trunk/lib/IR/ConstantRange.cpp
> llvm/trunk/lib/IR/Core.cpp
> llvm/trunk/lib/IR/DebugLoc.cpp
> llvm/trunk/lib/IR/GCOV.cpp
> llvm/trunk/lib/IR/Pass.cpp
> llvm/trunk/lib/IR/ValueSymbolTable.cpp
> llvm/trunk/lib/MC/MCExpr.cpp
> llvm/trunk/lib/MC/MCFragment.cpp
> llvm/trunk/lib/MC/MCInst.cpp
> llvm/trunk/lib/MC/MCLabel.cpp
> llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp
> llvm/trunk/lib/MC/MCSection.cpp
> llvm/trunk/lib/MC/MCSymbol.cpp
> llvm/trunk/lib/MC/MCValue.cpp
> llvm/trunk/lib/MC/SubtargetFeature.cpp
> llvm/trunk/lib/MC/WasmObjectWriter.cpp
> llvm/trunk/lib/Option/Arg.cpp
> llvm/trunk/lib/Option/ArgList.cpp
> llvm/trunk/lib/Option/Option.cpp
> llvm/trunk/lib/ProfileData/SampleProf.cpp
> llvm/trunk/lib/Support/APFloat.cpp
> llvm/trunk/lib/Support/APInt.cpp
> llvm/trunk/lib/Support/BranchProbability.cpp
> llvm/trunk/lib/Support/Twine.cpp
> llvm/trunk/lib/TableGen/Record.cpp
> llvm/trunk/lib/TableGen/TGParser.cpp
> llvm/trunk/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp
> llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp
> llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp
> llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
> llvm/trunk/lib/Target/ARM/ARMConstantPoolValue.cpp
> llvm/trunk/lib/Target/Hexagon/HexagonSplitDouble.cpp
> llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
> llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp
> llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
> llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
> llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
> llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp
> llvm/trunk/lib/Transforms/Scalar/GVN.cpp
> llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
> llvm/trunk/lib/Transforms/Scalar/SROA.cpp
> llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
> llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
> llvm/trunk/utils/TableGen/SubtargetFeatureInfo.cpp
>
> Modified: llvm/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
>
> --- llvm/trunk/CMakeLists.txt (original)
> +++ llvm/trunk/CMakeLists.txt Sun Oct 15 07:32:27 2017
> @@ -388,15 +388,15 @@ option(LLVM_ENABLE_LLD "Use lld as C and
> option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
> option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
>
> +option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF)
> +
> if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
> option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF)
> - option(LLVM_FORCE_ENABLE_DUMP "Enable dump functions in release builds" OFF)
> else()
> option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
> - option(LLVM_FORCE_ENABLE_DUMP "Enable dump functions in release builds" ON)
> endif()
>
> -if( LLVM_ENABLE_ASSERTIONS OR LLVM_FORCE_ENABLE_DUMP )
> +if( LLVM_ENABLE_ASSERTIONS )
> set(LLVM_ENABLE_DUMP ON)
> endif()
>
>
> Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original)
> +++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Sun Oct 15 07:32:27 2017
> @@ -336,7 +336,7 @@ CAMLprim LLVMContextRef llvm_type_contex
>
> /* lltype -> unit */
> CAMLprim value llvm_dump_type(LLVMTypeRef Val) {
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVMDumpType(Val);
> #else
> caml_raise_with_arg(*caml_named_value("Llvm.FeatureDisabled"),
>
> Modified: llvm/trunk/include/llvm/Analysis/DominanceFrontier.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DominanceFrontier.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/DominanceFrontier.h (original)
> +++ llvm/trunk/include/llvm/Analysis/DominanceFrontier.h Sun Oct 15 07:32:27 2017
> @@ -109,7 +109,7 @@ public:
> void print(raw_ostream &OS) const;
>
> /// dump - Dump the dominance frontier to dbgs().
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void dump() const;
> #endif
> };
>
> Modified: llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h (original)
> +++ llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h Sun Oct 15 07:32:27 2017
> @@ -148,7 +148,7 @@ void DominanceFrontierBase<BlockT, IsPos
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> template <class BlockT, bool IsPostDom>
> void DominanceFrontierBase<BlockT, IsPostDom>::dump() const {
> print(dbgs());
>
> Modified: llvm/trunk/include/llvm/Analysis/RegionInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfo.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/RegionInfo.h (original)
> +++ llvm/trunk/include/llvm/Analysis/RegionInfo.h Sun Oct 15 07:32:27 2017
> @@ -437,7 +437,7 @@ public:
> void print(raw_ostream &OS, bool printTree = true, unsigned level = 0,
> PrintStyle Style = PrintNone) const;
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// @brief Print the region to stderr.
> void dump() const;
> #endif
> @@ -805,7 +805,7 @@ public:
> static typename RegionT::PrintStyle printStyle;
>
> void print(raw_ostream &OS) const;
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void dump() const;
> #endif
>
>
> Modified: llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h (original)
> +++ llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h Sun Oct 15 07:32:27 2017
> @@ -521,7 +521,7 @@ void RegionBase<Tr>::print(raw_ostream &
> OS.indent(level * 2) << "} \n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> template <class Tr>
> void RegionBase<Tr>::dump() const {
> print(dbgs(), true, getDepth(), RegionInfoBase<Tr>::printStyle);
> @@ -789,7 +789,7 @@ void RegionInfoBase<Tr>::print(raw_ostre
> OS << "End region tree\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> template <class Tr>
> void RegionInfoBase<Tr>::dump() const { print(dbgs()); }
> #endif
>
> Modified: llvm/trunk/include/llvm/CodeGen/TargetSchedule.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/TargetSchedule.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/TargetSchedule.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/TargetSchedule.h Sun Oct 15 07:32:27 2017
> @@ -116,7 +116,7 @@ public:
> return SchedModel.getProcResource(PIdx);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> const char *getResourceName(unsigned PIdx) const {
> if (!PIdx)
> return "MOps";
>
> Modified: llvm/trunk/include/llvm/Config/config.h.cmake
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Config/config.h.cmake (original)
> +++ llvm/trunk/include/llvm/Config/config.h.cmake Sun Oct 15 07:32:27 2017
> @@ -353,6 +353,9 @@
> /* Has gcc/MSVC atomic intrinsics */
> #cmakedefine01 LLVM_HAS_ATOMICS
>
> +/* Define if LLVM_ENABLE_DUMP is enabled */
> +#cmakedefine LLVM_ENABLE_DUMP
> +
> /* Host triple LLVM will be executed on */
> #cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"
>
>
> Modified: llvm/trunk/include/llvm/Config/llvm-config.h.cmake
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/llvm-config.h.cmake?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Config/llvm-config.h.cmake (original)
> +++ llvm/trunk/include/llvm/Config/llvm-config.h.cmake Sun Oct 15 07:32:27 2017
> @@ -14,10 +14,6 @@
> #ifndef LLVM_CONFIG_H
> #define LLVM_CONFIG_H
>
> -/* Defined in debug builds and release builds if LLVM_FORCE_ENABLE_DUMP
> - or LLVM_ENABLE_ASSERTIONS */
> -#cmakedefine LLVM_ENABLE_DUMP
> -
> /* Define if we link Polly to the tools */
> #cmakedefine LINK_POLLY_INTO_TOOLS
>
>
> Modified: llvm/trunk/include/llvm/IR/Attributes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/Attributes.h (original)
> +++ llvm/trunk/include/llvm/IR/Attributes.h Sun Oct 15 07:32:27 2017
> @@ -283,7 +283,7 @@ public:
>
> iterator begin() const;
> iterator end() const;
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void dump() const;
> #endif
> };
>
> Modified: llvm/trunk/include/llvm/MC/MCSchedule.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSchedule.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/MC/MCSchedule.h (original)
> +++ llvm/trunk/include/llvm/MC/MCSchedule.h Sun Oct 15 07:32:27 2017
> @@ -24,7 +24,7 @@ struct InstrItinerary;
>
> /// Define a kind of processor resource that will be modeled by the scheduler.
> struct MCProcResourceDesc {
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> const char *Name;
> #endif
> unsigned NumUnits; // Number of resource of this kind
> @@ -102,7 +102,7 @@ struct MCSchedClassDesc {
> static const unsigned short InvalidNumMicroOps = UINT16_MAX;
> static const unsigned short VariantNumMicroOps = UINT16_MAX - 1;
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> const char* Name;
> #endif
> unsigned short NumMicroOps;
>
> Modified: llvm/trunk/include/llvm/Object/Wasm.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/Wasm.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Object/Wasm.h (original)
> +++ llvm/trunk/include/llvm/Object/Wasm.h Sun Oct 15 07:32:27 2017
> @@ -87,7 +87,7 @@ public:
> << ", ImportIndex=" << ImportIndex;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
> #endif
> };
>
> Modified: llvm/trunk/include/llvm/Support/Compiler.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/Compiler.h (original)
> +++ llvm/trunk/include/llvm/Support/Compiler.h Sun Oct 15 07:32:27 2017
> @@ -442,10 +442,10 @@ void AnnotateIgnoreWritesEnd(const char
> /// \brief Mark debug helper function definitions like dump() that should not be
> /// stripped from debug builds.
> /// Note that you should also surround dump() functions with
> -/// `#ifdef LLVM_ENABLE_DUMP` so they do always get stripped in release builds
> -/// unless asserts are enabled..
> +/// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always
> +/// get stripped in release builds.
> // FIXME: Move this to a private config.h as it's not usable in public headers.
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
> #else
> #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE
>
> Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original)
> +++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Sun Oct 15 07:32:27 2017
> @@ -648,7 +648,7 @@ void AliasSetTracker::print(raw_ostream
> OS << "\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void AliasSet::dump() const { print(dbgs()); }
> LLVM_DUMP_METHOD void AliasSetTracker::dump() const { print(dbgs()); }
> #endif
>
> Modified: llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp (original)
> +++ llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp Sun Oct 15 07:32:27 2017
> @@ -46,7 +46,7 @@ ScaledNumber<uint64_t> BlockMass::toScal
> return ScaledNumber<uint64_t>(getMass() + 1, -64);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void BlockMass::dump() const { print(dbgs()); }
> #endif
>
>
> Modified: llvm/trunk/lib/Analysis/CallGraph.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CallGraph.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/CallGraph.cpp (original)
> +++ llvm/trunk/lib/Analysis/CallGraph.cpp Sun Oct 15 07:32:27 2017
> @@ -109,7 +109,7 @@ void CallGraph::print(raw_ostream &OS) c
> CN->print(OS);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void CallGraph::dump() const { print(dbgs()); }
> #endif
>
> @@ -178,7 +178,7 @@ void CallGraphNode::print(raw_ostream &O
> OS << '\n';
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void CallGraphNode::dump() const { print(dbgs()); }
> #endif
>
> @@ -292,7 +292,7 @@ void CallGraphWrapperPass::print(raw_ost
> G->print(OS);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> void CallGraphWrapperPass::dump() const { print(dbgs(), nullptr); }
> #endif
>
> Modified: llvm/trunk/lib/Analysis/DependenceAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DependenceAnalysis.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/DependenceAnalysis.cpp (original)
> +++ llvm/trunk/lib/Analysis/DependenceAnalysis.cpp Sun Oct 15 07:32:27 2017
> @@ -385,7 +385,7 @@ void DependenceInfo::Constraint::setAny(
> Kind = Any;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> // For debugging purposes. Dumps the constraint out to OS.
> LLVM_DUMP_METHOD void DependenceInfo::Constraint::dump(raw_ostream &OS) const {
> if (isEmpty())
>
> Modified: llvm/trunk/lib/Analysis/DominanceFrontier.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DominanceFrontier.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/DominanceFrontier.cpp (original)
> +++ llvm/trunk/lib/Analysis/DominanceFrontier.cpp Sun Oct 15 07:32:27 2017
> @@ -59,7 +59,7 @@ void DominanceFrontierWrapperPass::print
> DF.print(OS);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void DominanceFrontierWrapperPass::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/Analysis/IVUsers.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IVUsers.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/IVUsers.cpp (original)
> +++ llvm/trunk/lib/Analysis/IVUsers.cpp Sun Oct 15 07:32:27 2017
> @@ -340,7 +340,7 @@ void IVUsers::print(raw_ostream &OS, con
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void IVUsers::dump() const { print(dbgs()); }
> #endif
>
>
> Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
> +++ llvm/trunk/lib/Analysis/InlineCost.cpp Sun Oct 15 07:32:27 2017
> @@ -1698,7 +1698,7 @@ bool CallAnalyzer::analyzeCall(CallSite
> return Cost < std::max(1, Threshold);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// \brief Dump stats about this call's analysis.
> LLVM_DUMP_METHOD void CallAnalyzer::dump() {
> #define DEBUG_PRINT_STAT(x) dbgs() << " " #x ": " << x << "\n"
>
> Modified: llvm/trunk/lib/Analysis/LazyCallGraph.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyCallGraph.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/LazyCallGraph.cpp (original)
> +++ llvm/trunk/lib/Analysis/LazyCallGraph.cpp Sun Oct 15 07:32:27 2017
> @@ -137,7 +137,7 @@ void LazyCallGraph::Node::replaceFunctio
> F = &NewF;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LazyCallGraph::Node::dump() const {
> dbgs() << *this << '\n';
> }
> @@ -207,7 +207,7 @@ LazyCallGraph &LazyCallGraph::operator=(
> return *this;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LazyCallGraph::SCC::dump() const {
> dbgs() << *this << '\n';
> }
> @@ -281,7 +281,7 @@ bool LazyCallGraph::SCC::isAncestorOf(co
>
> LazyCallGraph::RefSCC::RefSCC(LazyCallGraph &G) : G(&G) {}
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LazyCallGraph::RefSCC::dump() const {
> dbgs() << *this << '\n';
> }
>
> Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/LoopInfo.cpp (original)
> +++ llvm/trunk/lib/Analysis/LoopInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -440,7 +440,7 @@ BasicBlock *Loop::getUniqueExitBlock() c
> return nullptr;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void Loop::dump() const { print(dbgs()); }
>
> LLVM_DUMP_METHOD void Loop::dumpVerbose() const {
>
> Modified: llvm/trunk/lib/Analysis/MemorySSA.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemorySSA.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/MemorySSA.cpp (original)
> +++ llvm/trunk/lib/Analysis/MemorySSA.cpp Sun Oct 15 07:32:27 2017
> @@ -1622,7 +1622,7 @@ void MemorySSA::print(raw_ostream &OS) c
> F.print(OS, &Writer);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MemorySSA::dump() const { print(dbgs()); }
> #endif
>
> @@ -1899,7 +1899,7 @@ void MemoryUse::print(raw_ostream &OS) c
>
> void MemoryAccess::dump() const {
> // Cannot completely remove virtual function even in release mode.
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> print(dbgs());
> dbgs() << "\n";
> #endif
>
> Modified: llvm/trunk/lib/Analysis/PHITransAddr.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PHITransAddr.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/PHITransAddr.cpp (original)
> +++ llvm/trunk/lib/Analysis/PHITransAddr.cpp Sun Oct 15 07:32:27 2017
> @@ -41,7 +41,7 @@ static bool CanPHITrans(Instruction *Ins
> return false;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void PHITransAddr::dump() const {
> if (!Addr) {
> dbgs() << "PHITransAddr: null\n";
>
> Modified: llvm/trunk/lib/Analysis/RegionInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/RegionInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/RegionInfo.cpp (original)
> +++ llvm/trunk/lib/Analysis/RegionInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -152,7 +152,7 @@ void RegionInfoPass::print(raw_ostream &
> RI.print(OS);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RegionInfoPass::dump() const {
> RI.dump();
> }
>
> Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
> +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sun Oct 15 07:32:27 2017
> @@ -212,7 +212,7 @@ static cl::opt<unsigned>
> // Implementation of the SCEV class.
> //
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SCEV::dump() const {
> print(dbgs());
> dbgs() << '\n';
>
> Modified: llvm/trunk/lib/Analysis/Trace.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Trace.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/Trace.cpp (original)
> +++ llvm/trunk/lib/Analysis/Trace.cpp Sun Oct 15 07:32:27 2017
> @@ -44,7 +44,7 @@ void Trace::print(raw_ostream &O) const
> O << "; Trace parent function: \n" << *F;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// dump - Debugger convenience method; writes trace to standard error
> /// output stream.
> LLVM_DUMP_METHOD void Trace::dump() const {
>
> Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original)
> +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Sun Oct 15 07:32:27 2017
> @@ -465,7 +465,7 @@ unsigned ValueEnumerator::getValueID(con
> return I->second-1;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void ValueEnumerator::dump() const {
> print(dbgs(), ValueMap, "Default");
> dbgs() << '\n';
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp Sun Oct 15 07:32:27 2017
> @@ -127,7 +127,7 @@ void DIEAbbrev::print(raw_ostream &O) co
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void DIEAbbrev::dump() const {
> print(dbgs());
> }
> @@ -267,7 +267,7 @@ void DIE::print(raw_ostream &O, unsigned
> O << "\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void DIE::dump() const {
> print(dbgs());
> }
> @@ -359,7 +359,7 @@ void DIEValue::print(raw_ostream &O) con
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void DIEValue::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h Sun Oct 15 07:32:27 2017
> @@ -76,7 +76,7 @@ public:
> const DIExpression *getExpression() const { return Expression; }
> friend bool operator==(const Value &, const Value &);
> friend bool operator<(const Value &, const Value &);
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void dump() const {
> if (isLocation()) {
> llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " ";
>
> Modified: llvm/trunk/lib/CodeGen/BranchRelaxation.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchRelaxation.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/BranchRelaxation.cpp (original)
> +++ llvm/trunk/lib/CodeGen/BranchRelaxation.cpp Sun Oct 15 07:32:27 2017
> @@ -138,7 +138,7 @@ void BranchRelaxation::verify() {
> #endif
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// print block size and offset information - debugging
> LLVM_DUMP_METHOD void BranchRelaxation::dumpBBs() {
> for (auto &MBB : *MF) {
>
> Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
> +++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Sun Oct 15 07:32:27 2017
> @@ -2750,7 +2750,7 @@ static inline raw_ostream &operator<<(ra
> }
> #endif
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void ExtAddrMode::print(raw_ostream &OS) const {
> bool NeedPlus = false;
> OS << "[";
>
> Modified: llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp (original)
> +++ llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp Sun Oct 15 07:32:27 2017
> @@ -986,7 +986,7 @@ bool RegBankSelect::MappingCost::operato
> LocalFreq == Cost.LocalFreq;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RegBankSelect::MappingCost::dump() const {
> print(dbgs());
> dbgs() << '\n';
>
> Modified: llvm/trunk/lib/CodeGen/GlobalISel/RegisterBank.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/RegisterBank.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/GlobalISel/RegisterBank.cpp (original)
> +++ llvm/trunk/lib/CodeGen/GlobalISel/RegisterBank.cpp Sun Oct 15 07:32:27 2017
> @@ -76,7 +76,7 @@ bool RegisterBank::operator==(const Regi
> return &OtherRB == this;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RegisterBank::dump(const TargetRegisterInfo *TRI) const {
> print(dbgs(), /* IsForDebug */ true, TRI);
> }
>
> Modified: llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp (original)
> +++ llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -478,7 +478,7 @@ unsigned RegisterBankInfo::getSizeInBits
> //------------------------------------------------------------------------------
> // Helper classes implementation.
> //------------------------------------------------------------------------------
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RegisterBankInfo::PartialMapping::dump() const {
> print(dbgs());
> dbgs() << '\n';
> @@ -531,7 +531,7 @@ bool RegisterBankInfo::ValueMapping::ver
> return true;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RegisterBankInfo::ValueMapping::dump() const {
> print(dbgs());
> dbgs() << '\n';
> @@ -585,7 +585,7 @@ bool RegisterBankInfo::InstructionMappin
> return true;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RegisterBankInfo::InstructionMapping::dump() const {
> print(dbgs());
> dbgs() << '\n';
> @@ -708,7 +708,7 @@ RegisterBankInfo::OperandsMapper::getVRe
> return Res;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RegisterBankInfo::OperandsMapper::dump() const {
> print(dbgs(), true);
> dbgs() << '\n';
>
> Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)
> +++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Sun Oct 15 07:32:27 2017
> @@ -706,7 +706,7 @@ bool InlineSpiller::coalesceStackAccess(
> return true;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> // Dump the range of instructions from B to E with their slot indexes.
> static void dumpMachineInstrRangeWithSlotIndex(MachineBasicBlock::iterator B,
>
> Modified: llvm/trunk/lib/CodeGen/LexicalScopes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LexicalScopes.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LexicalScopes.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LexicalScopes.cpp Sun Oct 15 07:32:27 2017
> @@ -317,7 +317,7 @@ bool LexicalScopes::dominates(const DILo
> return Result;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LexicalScope::dump(unsigned Indent) const {
> raw_ostream &err = dbgs();
> err.indent(Indent);
>
> Modified: llvm/trunk/lib/CodeGen/LiveDebugValues.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugValues.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveDebugValues.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveDebugValues.cpp Sun Oct 15 07:32:27 2017
> @@ -160,7 +160,7 @@ private:
> /// dominates MBB.
> bool dominates(MachineBasicBlock &MBB) const { return UVS.dominates(&MBB); }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void dump() const { MI.dump(); }
> #endif
>
>
> Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Sun Oct 15 07:32:27 2017
> @@ -398,7 +398,7 @@ public:
>
> } // end anonymous namespace
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> static void printDebugLoc(const DebugLoc &DL, raw_ostream &CommentOS,
> const LLVMContext &Ctx) {
> if (!DL)
> @@ -1218,7 +1218,7 @@ bool LiveDebugVariables::doInitializatio
> return Pass::doInitialization(M);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LiveDebugVariables::dump() const {
> if (pImpl)
> static_cast<LDVImpl*>(pImpl)->print(dbgs());
>
> Modified: llvm/trunk/lib/CodeGen/LiveInterval.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveInterval.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveInterval.cpp Sun Oct 15 07:32:27 2017
> @@ -944,7 +944,7 @@ raw_ostream& llvm::operator<<(raw_ostrea
> return OS << '[' << S.start << ',' << S.end << ':' << S.valno->id << ')';
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LiveRange::Segment::dump() const {
> dbgs() << *this << '\n';
> }
> @@ -993,7 +993,7 @@ void LiveInterval::print(raw_ostream &OS
> OS << SR;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LiveRange::dump() const {
> dbgs() << *this << '\n';
> }
> @@ -1077,7 +1077,7 @@ void LiveInterval::verify(const MachineR
> // When they exist, Spills.back().start <= LastStart,
> // and WriteI[-1].start <= LastStart.
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void LiveRangeUpdater::print(raw_ostream &OS) const {
> if (!isDirty()) {
> if (LR)
>
> Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Oct 15 07:32:27 2017
> @@ -179,7 +179,7 @@ void LiveIntervals::printInstrs(raw_ostr
> MF->print(OS, Indexes);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LiveIntervals::dumpInstrs() const {
> printInstrs(dbgs());
> }
>
> Modified: llvm/trunk/lib/CodeGen/LivePhysRegs.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LivePhysRegs.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LivePhysRegs.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LivePhysRegs.cpp Sun Oct 15 07:32:27 2017
> @@ -130,7 +130,7 @@ void LivePhysRegs::print(raw_ostream &OS
> OS << "\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LivePhysRegs::dump() const {
> dbgs() << " " << *this;
> }
>
> Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Sun Oct 15 07:32:27 2017
> @@ -64,7 +64,7 @@ LiveVariables::VarInfo::findKill(const M
> return nullptr;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LiveVariables::VarInfo::dump() const {
> dbgs() << " Alive in blocks: ";
> for (SparseBitVector<>::iterator I = AliveBlocks.begin(),
>
> Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Sun Oct 15 07:32:27 2017
> @@ -222,7 +222,7 @@ bool MachineBasicBlock::hasEHPadSuccesso
> return false;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineBasicBlock::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/CodeGen/MachineFrameInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFrameInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineFrameInfo.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineFrameInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -242,7 +242,7 @@ void MachineFrameInfo::print(const Machi
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineFrameInfo::dump(const MachineFunction &MF) const {
> print(MF, dbgs());
> }
>
> Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Sun Oct 15 07:32:27 2017
> @@ -478,7 +478,7 @@ const char *MachineFunction::createExter
> return Dest;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineFunction::dump() const {
> print(dbgs());
> }
> @@ -914,7 +914,7 @@ void MachineJumpTableInfo::print(raw_ost
> OS << '\n';
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineJumpTableInfo::dump() const { print(dbgs()); }
> #endif
>
> @@ -1069,6 +1069,6 @@ void MachineConstantPool::print(raw_ostr
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineConstantPool::dump() const { print(dbgs()); }
> #endif
>
> Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Sun Oct 15 07:32:27 2017
> @@ -566,7 +566,7 @@ void MachineOperand::print(raw_ostream &
> OS << "[TF=" << TF << ']';
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineOperand::dump() const {
> dbgs() << *this << '\n';
> }
> @@ -1873,7 +1873,7 @@ void MachineInstr::copyImplicitOps(Machi
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineInstr::dump() const {
> dbgs() << " ";
> print(dbgs());
>
> Modified: llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -138,7 +138,7 @@ MachineLoopInfo::findLoopPreheader(Machi
> return Preheader;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineLoop::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/CodeGen/MachinePipeliner.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachinePipeliner.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachinePipeliner.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachinePipeliner.cpp Sun Oct 15 07:32:27 2017
> @@ -558,7 +558,7 @@ public:
> os << "\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
> #endif
> };
> @@ -4010,7 +4010,7 @@ void SMSchedule::finalizeSchedule(SwingS
> DEBUG(dump(););
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// Print the schedule information to the given output.
> void SMSchedule::print(raw_ostream &os) const {
> // Iterate over each cycle.
>
> Modified: llvm/trunk/lib/CodeGen/MachineRegionInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineRegionInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineRegionInfo.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineRegionInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -118,7 +118,7 @@ void MachineRegionInfoPass::print(raw_os
> RI.print(OS);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineRegionInfoPass::dump() const {
> RI.dump();
> }
>
> Modified: llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -458,7 +458,7 @@ LaneBitmask MachineRegisterInfo::getMaxL
> return TRC.getLaneMask();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MachineRegisterInfo::dumpUses(unsigned Reg) const {
> for (MachineInstr &I : use_instructions(Reg))
> I.dump();
>
> Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Sun Oct 15 07:32:27 2017
> @@ -581,7 +581,7 @@ void MachineSchedulerBase::print(raw_ost
> // unimplemented
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void ReadyQueue::dump() const {
> dbgs() << "Queue " << Name << ": ";
> for (const SUnit *SU : Queue)
> @@ -919,7 +919,7 @@ void ScheduleDAGMI::placeDebugValues() {
> FirstDbgValue = nullptr;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void ScheduleDAGMI::dumpSchedule() const {
> for (MachineBasicBlock::iterator MI = begin(), ME = end(); MI != ME; ++MI) {
> if (SUnit *SU = getSUnit(&(*MI)))
> @@ -2354,7 +2354,7 @@ SUnit *SchedBoundary::pickOnlyChoice() {
> return nullptr;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> // This is useful information to dump after bumpNode.
> // Note that the Queue contents are more useful before pickNodeFromQueue.
> LLVM_DUMP_METHOD void SchedBoundary::dumpScheduledState() const {
> @@ -2698,7 +2698,7 @@ void GenericScheduler::initPolicy(Machin
>
> void GenericScheduler::dumpPolicy() const {
> // Cannot completely remove virtual function even in release mode.
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> dbgs() << "GenericScheduler RegionPolicy: "
> << " ShouldTrackPressure=" << RegionPolicy.ShouldTrackPressure
> << " OnlyTopDown=" << RegionPolicy.OnlyTopDown
>
> Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
> +++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Sun Oct 15 07:32:27 2017
> @@ -251,7 +251,7 @@ void SchedulePostRATDList::exitRegion()
> ScheduleDAGInstrs::exitRegion();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// dumpSchedule - dump the scheduled Sequence.
> LLVM_DUMP_METHOD void SchedulePostRATDList::dumpSchedule() const {
> for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
>
> Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original)
> +++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Sun Oct 15 07:32:27 2017
> @@ -868,7 +868,7 @@ static Printable PrintNodeInfo(PBQP::Reg
> });
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump(raw_ostream &OS) const {
> for (auto NId : nodeIds()) {
> const Vector &Costs = getNodeCosts(NId);
>
> Modified: llvm/trunk/lib/CodeGen/RegisterPressure.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterPressure.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/RegisterPressure.cpp (original)
> +++ llvm/trunk/lib/CodeGen/RegisterPressure.cpp Sun Oct 15 07:32:27 2017
> @@ -76,7 +76,7 @@ static void decreaseSetPressure(std::vec
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> void llvm::dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
> const TargetRegisterInfo *TRI) {
>
> Modified: llvm/trunk/lib/CodeGen/SafeStackColoring.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SafeStackColoring.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SafeStackColoring.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SafeStackColoring.cpp Sun Oct 15 07:32:27 2017
> @@ -250,7 +250,7 @@ void StackColoring::calculateLiveInterva
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void StackColoring::dumpAllocas() {
> dbgs() << "Allocas:\n";
> for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo)
>
> Modified: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp (original)
> +++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp Sun Oct 15 07:32:27 2017
> @@ -335,7 +335,7 @@ void SUnit::biasCriticalPath() {
> std::swap(*Preds.begin(), *BestI);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> raw_ostream &SUnit::print(raw_ostream &OS,
> const SUnit *Entry, const SUnit *Exit) const {
>
> Modified: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
> +++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Sun Oct 15 07:32:27 2017
> @@ -97,7 +97,7 @@ static unsigned getReductionSize() {
> }
>
> static void dumpSUList(ScheduleDAGInstrs::SUList &L) {
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> dbgs() << "{ ";
> for (const SUnit *su : L) {
> dbgs() << "SU(" << su->NodeNum << ")";
> @@ -1096,7 +1096,7 @@ void ScheduleDAGInstrs::fixupKills(Machi
>
> void ScheduleDAGInstrs::dumpNode(const SUnit *SU) const {
> // Cannot completely remove virtual function even in release mode.
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> SU->getInstr()->dump();
> #endif
> }
> @@ -1408,7 +1408,7 @@ void SchedDFSResult::scheduleTree(unsign
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void ILPValue::print(raw_ostream &OS) const {
> OS << InstrCount << " / " << Length << " = ";
> if (!Length)
>
> Modified: llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp (original)
> +++ llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp Sun Oct 15 07:32:27 2017
> @@ -83,7 +83,7 @@ void ScoreboardHazardRecognizer::Reset()
> ReservedScoreboard.reset();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void ScoreboardHazardRecognizer::Scoreboard::dump() const {
> dbgs() << "Scoreboard:\n";
>
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Sun Oct 15 07:32:27 2017
> @@ -1855,7 +1855,7 @@ public:
> return V;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void dump(ScheduleDAG *DAG) const override {
> // Emulate pop() without clobbering NodeQueueIds.
> std::vector<SUnit *> DumpQueue = Queue;
> @@ -2026,7 +2026,7 @@ unsigned RegReductionPQBase::getNodePrio
> // Register Pressure Tracking
> //===----------------------------------------------------------------------===//
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RegReductionPQBase::dumpRegPressure() const {
> for (const TargetRegisterClass *RC : TRI->regclasses()) {
> unsigned Id = RC->getID();
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Sun Oct 15 07:32:27 2017
> @@ -651,7 +651,7 @@ void ScheduleDAGSDNodes::computeOperandL
>
> void ScheduleDAGSDNodes::dumpNode(const SUnit *SU) const {
> // Cannot completely remove virtual function even in release mode.
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> if (!SU->getNode()) {
> dbgs() << "PHYS REG COPY\n";
> return;
> @@ -671,7 +671,7 @@ void ScheduleDAGSDNodes::dumpNode(const
> #endif
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void ScheduleDAGSDNodes::dumpSchedule() const {
> for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
> if (SUnit *SU = Sequence[i])
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp Sun Oct 15 07:32:27 2017
> @@ -401,7 +401,7 @@ static Printable PrintNodeId(const SDNod
> });
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SDNode::dump() const { dump(nullptr); }
>
> LLVM_DUMP_METHOD void SDNode::dump(const SelectionDAG *G) const {
> @@ -634,7 +634,7 @@ static bool shouldPrintInline(const SDNo
> return Node.getNumOperands() == 0;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) {
> for (const SDValue &Op : N->op_values()) {
> if (shouldPrintInline(*Op.getNode()))
> @@ -688,7 +688,7 @@ static bool printOperand(raw_ostream &OS
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> using VisitedSDNodeSet = SmallPtrSet<const SDNode *, 32>;
>
> static void DumpNodesr(raw_ostream &OS, const SDNode *N, unsigned indent,
> @@ -761,7 +761,7 @@ void SDNode::printrFull(raw_ostream &OS,
> printrWithDepth(OS, G, 10);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> void SDNode::dumprWithDepth(const SelectionDAG *G, unsigned depth) const {
> printrWithDepth(dbgs(), G, depth);
>
> Modified: llvm/trunk/lib/CodeGen/SlotIndexes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SlotIndexes.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SlotIndexes.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SlotIndexes.cpp Sun Oct 15 07:32:27 2017
> @@ -250,7 +250,7 @@ void SlotIndexes::repairIndexesInRange(M
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SlotIndexes::dump() const {
> for (IndexList::const_iterator itr = indexList.begin();
> itr != indexList.end(); ++itr) {
> @@ -277,7 +277,7 @@ void SlotIndex::print(raw_ostream &os) c
> os << "invalid";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> // Dump a SlotIndex to stderr.
> LLVM_DUMP_METHOD void SlotIndex::dump() const {
> print(dbgs());
>
> Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Sun Oct 15 07:32:27 2017
> @@ -392,7 +392,7 @@ void SplitEditor::reset(LiveRangeEdit &L
> Edit->anyRematerializable(nullptr);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SplitEditor::dump() const {
> if (RegAssign.empty()) {
> dbgs() << " empty\n";
>
> Modified: llvm/trunk/lib/CodeGen/StackColoring.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackColoring.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/StackColoring.cpp (original)
> +++ llvm/trunk/lib/CodeGen/StackColoring.cpp Sun Oct 15 07:32:27 2017
> @@ -533,7 +533,7 @@ void StackColoring::getAnalysisUsage(Ana
> MachineFunctionPass::getAnalysisUsage(AU);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void StackColoring::dumpBV(const char *tag,
> const BitVector &BV) const {
> dbgs() << tag << " : { ";
>
> Modified: llvm/trunk/lib/CodeGen/TargetRegisterInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetRegisterInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/TargetRegisterInfo.cpp (original)
> +++ llvm/trunk/lib/CodeGen/TargetRegisterInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -424,7 +424,7 @@ bool TargetRegisterInfo::regmaskSubsetEq
> return true;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> void TargetRegisterInfo::dumpReg(unsigned Reg, unsigned SubRegIndex,
> const TargetRegisterInfo *TRI) {
>
> Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original)
> +++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Sun Oct 15 07:32:27 2017
> @@ -156,7 +156,7 @@ void VirtRegMap::print(raw_ostream &OS,
> OS << '\n';
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void VirtRegMap::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/IR/AsmWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/AsmWriter.cpp (original)
> +++ llvm/trunk/lib/IR/AsmWriter.cpp Sun Oct 15 07:32:27 2017
> @@ -3623,7 +3623,7 @@ void Metadata::print(raw_ostream &OS, Mo
> printMetadataImpl(OS, *this, MST, M, /* OnlyAsOperand */ false);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> // Value::dump - allow easy printing of Values from the debugger.
> LLVM_DUMP_METHOD
> void Value::dump() const { print(dbgs(), /*IsForDebug=*/true); dbgs() << '\n'; }
>
> Modified: llvm/trunk/lib/IR/Attributes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/Attributes.cpp (original)
> +++ llvm/trunk/lib/IR/Attributes.cpp Sun Oct 15 07:32:27 2017
> @@ -619,7 +619,7 @@ AttributeSet::iterator AttributeSet::end
> return SetNode ? SetNode->end() : nullptr;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void AttributeSet::dump() const {
> dbgs() << "AS =\n";
> dbgs() << " { ";
> @@ -828,7 +828,7 @@ void AttributeListImpl::Profile(FoldingS
> ID.AddPointer(Set.SetNode);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void AttributeListImpl::dump() const {
> AttributeList(const_cast<AttributeListImpl *>(this)).dump();
> }
> @@ -1288,7 +1288,7 @@ unsigned AttributeList::getNumAttrSets()
> return pImpl ? pImpl->NumAttrSets : 0;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void AttributeList::dump() const {
> dbgs() << "PAL[\n";
>
>
> Modified: llvm/trunk/lib/IR/ConstantRange.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantRange.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/ConstantRange.cpp (original)
> +++ llvm/trunk/lib/IR/ConstantRange.cpp Sun Oct 15 07:32:27 2017
> @@ -939,7 +939,7 @@ void ConstantRange::print(raw_ostream &O
> OS << "[" << Lower << "," << Upper << ")";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void ConstantRange::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/IR/Core.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/Core.cpp (original)
> +++ llvm/trunk/lib/IR/Core.cpp Sun Oct 15 07:32:27 2017
> @@ -358,7 +358,7 @@ LLVMContextRef LLVMGetTypeContext(LLVMTy
> return wrap(&unwrap(Ty)->getContext());
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LLVMDumpType(LLVMTypeRef Ty) {
> return unwrap(Ty)->dump();
> }
>
> Modified: llvm/trunk/lib/IR/DebugLoc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugLoc.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/DebugLoc.cpp (original)
> +++ llvm/trunk/lib/IR/DebugLoc.cpp Sun Oct 15 07:32:27 2017
> @@ -99,7 +99,7 @@ DebugLoc DebugLoc::appendInlinedAt(Debug
> return Last;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void DebugLoc::dump() const {
> if (!Loc)
> return;
>
> Modified: llvm/trunk/lib/IR/GCOV.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/GCOV.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/GCOV.cpp (original)
> +++ llvm/trunk/lib/IR/GCOV.cpp Sun Oct 15 07:32:27 2017
> @@ -108,7 +108,7 @@ void GCOVFile::print(raw_ostream &OS) co
> FPtr->print(OS);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// dump - Dump GCOVFile content to dbgs() for debugging purposes.
> LLVM_DUMP_METHOD void GCOVFile::dump() const {
> print(dbgs());
> @@ -356,7 +356,7 @@ void GCOVFunction::print(raw_ostream &OS
> Block->print(OS);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// dump - Dump GCOVFunction content to dbgs() for debugging purposes.
> LLVM_DUMP_METHOD void GCOVFunction::dump() const {
> print(dbgs());
> @@ -434,7 +434,7 @@ void GCOVBlock::print(raw_ostream &OS) c
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// dump - Dump GCOVBlock content to dbgs() for debugging purposes.
> LLVM_DUMP_METHOD void GCOVBlock::dump() const {
> print(dbgs());
>
> Modified: llvm/trunk/lib/IR/Pass.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Pass.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/Pass.cpp (original)
> +++ llvm/trunk/lib/IR/Pass.cpp Sun Oct 15 07:32:27 2017
> @@ -124,7 +124,7 @@ void Pass::print(raw_ostream &OS, const
> OS << "Pass::print not implemented for pass: '" << getPassName() << "'!\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> // dump - call print(cerr);
> LLVM_DUMP_METHOD void Pass::dump() const {
> print(dbgs(), nullptr);
>
> Modified: llvm/trunk/lib/IR/ValueSymbolTable.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ValueSymbolTable.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/ValueSymbolTable.cpp (original)
> +++ llvm/trunk/lib/IR/ValueSymbolTable.cpp Sun Oct 15 07:32:27 2017
> @@ -100,7 +100,7 @@ ValueName *ValueSymbolTable::createValue
> return makeUniqueName(V, UniqueName);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> // dump - print out the symbol table
> //
> LLVM_DUMP_METHOD void ValueSymbolTable::dump() const {
>
> Modified: llvm/trunk/lib/MC/MCExpr.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCExpr.cpp (original)
> +++ llvm/trunk/lib/MC/MCExpr.cpp Sun Oct 15 07:32:27 2017
> @@ -136,7 +136,7 @@ void MCExpr::print(raw_ostream &OS, cons
> llvm_unreachable("Invalid expression kind!");
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MCExpr::dump() const {
> dbgs() << *this;
> dbgs() << '\n';
>
> Modified: llvm/trunk/lib/MC/MCFragment.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCFragment.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCFragment.cpp (original)
> +++ llvm/trunk/lib/MC/MCFragment.cpp Sun Oct 15 07:32:27 2017
> @@ -306,7 +306,7 @@ raw_ostream &operator<<(raw_ostream &OS,
>
> } // end namespace llvm
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MCFragment::dump() const {
> raw_ostream &OS = errs();
>
>
> Modified: llvm/trunk/lib/MC/MCInst.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCInst.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCInst.cpp (original)
> +++ llvm/trunk/lib/MC/MCInst.cpp Sun Oct 15 07:32:27 2017
> @@ -35,7 +35,7 @@ void MCOperand::print(raw_ostream &OS) c
> OS << ">";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MCOperand::dump() const {
> print(dbgs());
> dbgs() << "\n";
> @@ -66,7 +66,7 @@ void MCInst::dump_pretty(raw_ostream &OS
> OS << ">";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MCInst::dump() const {
> print(dbgs());
> dbgs() << "\n";
>
> Modified: llvm/trunk/lib/MC/MCLabel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCLabel.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCLabel.cpp (original)
> +++ llvm/trunk/lib/MC/MCLabel.cpp Sun Oct 15 07:32:27 2017
> @@ -18,7 +18,7 @@ void MCLabel::print(raw_ostream &OS) con
> OS << '"' << getInstance() << '"';
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MCLabel::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp (original)
> +++ llvm/trunk/lib/MC/MCParser/MCAsmParser.cpp Sun Oct 15 07:32:27 2017
> @@ -131,7 +131,7 @@ bool MCAsmParser::parseExpression(const
>
> void MCParsedAsmOperand::dump() const {
> // Cannot completely remove virtual function even in release mode.
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> dbgs() << " " << *this;
> #endif
> }
>
> Modified: llvm/trunk/lib/MC/MCSection.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSection.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCSection.cpp (original)
> +++ llvm/trunk/lib/MC/MCSection.cpp Sun Oct 15 07:32:27 2017
> @@ -85,7 +85,7 @@ MCSection::getSubsectionInsertionPoint(u
> return IP;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MCSection::dump() const {
> raw_ostream &OS = errs();
>
>
> Modified: llvm/trunk/lib/MC/MCSymbol.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSymbol.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCSymbol.cpp (original)
> +++ llvm/trunk/lib/MC/MCSymbol.cpp Sun Oct 15 07:32:27 2017
> @@ -81,7 +81,7 @@ void MCSymbol::print(raw_ostream &OS, co
> OS << '"';
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MCSymbol::dump() const {
> dbgs() << *this;
> }
>
> Modified: llvm/trunk/lib/MC/MCValue.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCValue.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCValue.cpp (original)
> +++ llvm/trunk/lib/MC/MCValue.cpp Sun Oct 15 07:32:27 2017
> @@ -37,7 +37,7 @@ void MCValue::print(raw_ostream &OS) con
> OS << " + " << getConstant();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MCValue::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/MC/SubtargetFeature.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/SubtargetFeature.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/SubtargetFeature.cpp (original)
> +++ llvm/trunk/lib/MC/SubtargetFeature.cpp Sun Oct 15 07:32:27 2017
> @@ -256,7 +256,7 @@ void SubtargetFeatures::print(raw_ostrea
> OS << "\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SubtargetFeatures::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/MC/WasmObjectWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)
> +++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Sun Oct 15 07:32:27 2017
> @@ -170,7 +170,7 @@ struct WasmRelocationEntry {
> << ", FixupSection=" << FixupSection->getSectionName();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
> #endif
> };
>
> Modified: llvm/trunk/lib/Option/Arg.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Option/Arg.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Option/Arg.cpp (original)
> +++ llvm/trunk/lib/Option/Arg.cpp Sun Oct 15 07:32:27 2017
> @@ -61,7 +61,7 @@ void Arg::print(raw_ostream& O) const {
> O << "]>\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void Arg::dump() const { print(dbgs()); }
> #endif
>
>
> Modified: llvm/trunk/lib/Option/ArgList.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Option/ArgList.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Option/ArgList.cpp (original)
> +++ llvm/trunk/lib/Option/ArgList.cpp Sun Oct 15 07:32:27 2017
> @@ -204,7 +204,7 @@ void ArgList::print(raw_ostream &O) cons
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); }
> #endif
>
>
> Modified: llvm/trunk/lib/Option/Option.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Option/Option.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Option/Option.cpp (original)
> +++ llvm/trunk/lib/Option/Option.cpp Sun Oct 15 07:32:27 2017
> @@ -86,7 +86,7 @@ void Option::print(raw_ostream &O) const
> O << ">\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void Option::dump() const { print(dbgs()); }
> #endif
>
>
> Modified: llvm/trunk/lib/ProfileData/SampleProf.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/SampleProf.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/ProfileData/SampleProf.cpp (original)
> +++ llvm/trunk/lib/ProfileData/SampleProf.cpp Sun Oct 15 07:32:27 2017
> @@ -82,7 +82,7 @@ raw_ostream &llvm::sampleprof::operator<
> return OS;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void LineLocation::dump() const { print(dbgs()); }
> #endif
>
> @@ -97,7 +97,7 @@ void SampleRecord::print(raw_ostream &OS
> OS << "\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SampleRecord::dump() const { print(dbgs(), 0); }
> #endif
>
> @@ -150,6 +150,6 @@ raw_ostream &llvm::sampleprof::operator<
> return OS;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void FunctionSamples::dump() const { print(dbgs(), 0); }
> #endif
>
> Modified: llvm/trunk/lib/Support/APFloat.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/APFloat.cpp (original)
> +++ llvm/trunk/lib/Support/APFloat.cpp Sun Oct 15 07:32:27 2017
> @@ -4486,7 +4486,7 @@ void APFloat::print(raw_ostream &OS) con
> OS << Buffer << "\n";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void APFloat::dump() const { print(dbgs()); }
> #endif
>
>
> Modified: llvm/trunk/lib/Support/APInt.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/APInt.cpp (original)
> +++ llvm/trunk/lib/Support/APInt.cpp Sun Oct 15 07:32:27 2017
> @@ -2120,7 +2120,7 @@ std::string APInt::toString(unsigned Rad
> return S.str();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void APInt::dump() const {
> SmallString<40> S, U;
> this->toStringUnsigned(U);
>
> Modified: llvm/trunk/lib/Support/BranchProbability.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/BranchProbability.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/BranchProbability.cpp (original)
> +++ llvm/trunk/lib/Support/BranchProbability.cpp Sun Oct 15 07:32:27 2017
> @@ -32,7 +32,7 @@ raw_ostream &BranchProbability::print(ra
> Percent);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; }
> #endif
>
>
> Modified: llvm/trunk/lib/Support/Twine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Twine.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/Twine.cpp (original)
> +++ llvm/trunk/lib/Support/Twine.cpp Sun Oct 15 07:32:27 2017
> @@ -173,7 +173,7 @@ void Twine::printRepr(raw_ostream &OS) c
> OS << ")";
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void Twine::dump() const {
> print(dbgs());
> }
>
> Modified: llvm/trunk/lib/TableGen/Record.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Record.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/TableGen/Record.cpp (original)
> +++ llvm/trunk/lib/TableGen/Record.cpp Sun Oct 15 07:32:27 2017
> @@ -48,7 +48,7 @@ IntRecTy IntRecTy::Shared;
> StringRecTy StringRecTy::Shared;
> DagRecTy DagRecTy::Shared;
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RecTy::dump() const { print(errs()); }
> #endif
>
> @@ -172,7 +172,7 @@ RecTy *llvm::resolveTypes(RecTy *T1, Rec
>
> void Init::anchor() {}
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void Init::dump() const { return print(errs()); }
> #endif
>
> @@ -1581,7 +1581,7 @@ StringRef RecordVal::getName() const {
> return cast<StringInit>(getNameInit())->getValue();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void RecordVal::dump() const { errs() << *this; }
> #endif
>
> @@ -1660,7 +1660,7 @@ void Record::resolveReferencesTo(const R
> }
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void Record::dump() const { errs() << *this; }
> #endif
>
> @@ -1854,7 +1854,7 @@ DagInit *Record::getValueAsDag(StringRef
> FieldName + "' does not have a dag initializer!");
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MultiClass::dump() const {
> errs() << "Record:\n";
> Rec.dump();
>
> Modified: llvm/trunk/lib/TableGen/TGParser.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TGParser.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/TableGen/TGParser.cpp (original)
> +++ llvm/trunk/lib/TableGen/TGParser.cpp Sun Oct 15 07:32:27 2017
> @@ -54,7 +54,7 @@ struct SubMultiClassReference {
> void dump() const;
> };
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SubMultiClassReference::dump() const {
> errs() << "Multiclass:\n";
>
>
> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp (original)
> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp Sun Oct 15 07:32:27 2017
> @@ -261,7 +261,7 @@ unsigned PHILinearize::getNumSources(uns
> return phiInfoElementGetSources(findPHIInfoElement(DestReg)).size();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void PHILinearize::dump(MachineRegisterInfo *MRI) {
> const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo();
> dbgs() << "=PHIInfo Start=\n";
>
> Modified: llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp (original)
> +++ llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp Sun Oct 15 07:32:27 2017
> @@ -52,7 +52,7 @@ static inline MachineInstr *getMachineIn
> return SU.getInstr();
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> static void printRegion(raw_ostream &OS,
> MachineBasicBlock::iterator Begin,
>
> Modified: llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp (original)
> +++ llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp Sun Oct 15 07:32:27 2017
> @@ -31,7 +31,7 @@ using namespace llvm;
>
> #define DEBUG_TYPE "machine-scheduler"
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> void llvm::printLivesAt(SlotIndex SI,
> const LiveIntervals &LIS,
> @@ -175,7 +175,7 @@ bool GCNRegPressure::less(const SISubtar
> (getVGPRNum() < O.getVGPRNum());
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> void GCNRegPressure::print(raw_ostream &OS, const SISubtarget *ST) const {
> OS << "VGPRs: " << getVGPRNum();
> @@ -433,7 +433,7 @@ bool GCNDownwardRPTracker::advance(Machi
> return advance(End);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD
> static void reportMismatch(const GCNRPTracker::LiveRegSet &LISLR,
> const GCNRPTracker::LiveRegSet &TrackedLR,
>
> Modified: llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Sun Oct 15 07:32:27 2017
> @@ -320,7 +320,7 @@ void ARMConstantIslands::verify() {
> #endif
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// print block size and offset information - debugging
> LLVM_DUMP_METHOD void ARMConstantIslands::dumpBBs() {
> DEBUG({
>
> Modified: llvm/trunk/lib/Target/ARM/ARMConstantPoolValue.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantPoolValue.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMConstantPoolValue.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMConstantPoolValue.cpp Sun Oct 15 07:32:27 2017
> @@ -97,7 +97,7 @@ ARMConstantPoolValue::hasSameValue(ARMCo
> return false;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void ARMConstantPoolValue::dump() const {
> errs() << " " << *this;
> }
>
> Modified: llvm/trunk/lib/Target/Hexagon/HexagonSplitDouble.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonSplitDouble.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Hexagon/HexagonSplitDouble.cpp (original)
> +++ llvm/trunk/lib/Target/Hexagon/HexagonSplitDouble.cpp Sun Oct 15 07:32:27 2017
> @@ -131,7 +131,7 @@ const TargetRegisterClass *const Hexagon
> INITIALIZE_PASS(HexagonSplitDoubleRegs, "hexagon-split-double",
> "Hexagon Split Double Registers", false, false)
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void HexagonSplitDoubleRegs::dump_partition(raw_ostream &os,
> const USet &Part, const TargetRegisterInfo &TRI) {
> dbgs() << '{';
>
> Modified: llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp (original)
> +++ llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp Sun Oct 15 07:32:27 2017
> @@ -61,7 +61,7 @@ namespace {
> return GV != nullptr || CP != nullptr || ES != nullptr || JT != -1;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void dump() {
> errs() << "MSP430ISelAddressMode " << this << '\n';
> if (BaseType == RegBase && Base.Reg.getNode() != nullptr) {
>
> Modified: llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp (original)
> +++ llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp Sun Oct 15 07:32:27 2017
> @@ -425,7 +425,7 @@ bool MipsConstantIslands::isOffsetInRang
> U.getMaxDisp(), U.NegOk);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// print block size and offset information - debugging
> LLVM_DUMP_METHOD void MipsConstantIslands::dumpBBs() {
> for (unsigned J = 0, E = BBInfo.size(); J !=E; ++J) {
>
> Modified: llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp Sun Oct 15 07:32:27 2017
> @@ -953,7 +953,7 @@ bool PPCVSXSwapRemoval::removeSwaps() {
> return Changed;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> // For debug purposes, dump the contents of the swap vector.
> LLVM_DUMP_METHOD void PPCVSXSwapRemoval::dumpSwapVector() {
>
>
> Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Sun Oct 15 07:32:27 2017
> @@ -169,7 +169,7 @@ namespace {
> // Shuffle live registers to match the expectations of successor blocks.
> void finishBlockStack();
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void dumpStack() const {
> dbgs() << "Stack contents:";
> for (unsigned i = 0; i != StackTop; ++i) {
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Sun Oct 15 07:32:27 2017
> @@ -102,7 +102,7 @@ namespace {
> Base_Reg = Reg;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void dump() {
> dbgs() << "X86ISelAddressMode " << this << '\n';
> dbgs() << "Base_Reg ";
>
> Modified: llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp (original)
> +++ llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp Sun Oct 15 07:32:27 2017
> @@ -133,7 +133,7 @@ struct SuspendCrossingInfo {
> };
> } // end anonymous namespace
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SuspendCrossingInfo::dump(StringRef Label,
> BitVector const &BV) const {
> dbgs() << Label << ":";
>
> Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Sun Oct 15 07:32:27 2017
> @@ -646,7 +646,7 @@ PreservedAnalyses GVN::run(Function &F,
> return PA;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void GVN::dump(DenseMap<uint32_t, Value*>& d) const {
> errs() << "{\n";
> for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sun Oct 15 07:32:27 2017
> @@ -195,7 +195,7 @@ public:
>
> } // end anonymous namespace
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void RegSortData::print(raw_ostream &OS) const {
> OS << "[NumUses=" << UsedByIndices.count() << ']';
> }
> @@ -562,7 +562,7 @@ bool Formula::hasRegsUsedByUsesOtherThan
> return false;
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void Formula::print(raw_ostream &OS) const {
> bool First = true;
> if (BaseGV) {
> @@ -1357,7 +1357,7 @@ bool Cost::isLess(Cost &Other, const Tar
> return TTI.isLSRCostLess(C, Other.C);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void Cost::print(raw_ostream &OS) const {
> if (InsnsCost)
> OS << C.Insns << " instruction" << (C.Insns == 1 ? " " : "s ");
> @@ -1401,7 +1401,7 @@ bool LSRFixup::isUseFullyOutsideLoop(con
> return !L->contains(UserInst);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void LSRFixup::print(raw_ostream &OS) const {
> OS << "UserInst=";
> // Store is common and interesting enough to be worth special-casing.
> @@ -1507,7 +1507,7 @@ void LSRUse::RecomputeRegs(size_t LUIdx,
> RegUses.dropRegister(S, LUIdx);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void LSRUse::print(raw_ostream &OS) const {
> OS << "LSR Use: Kind=";
> switch (Kind) {
> @@ -3880,7 +3880,7 @@ struct WorkItem {
>
> } // end anonymous namespace
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void WorkItem::print(raw_ostream &OS) const {
> OS << "in formulae referencing " << *OrigReg << " in use " << LUIdx
> << " , add offset " << Imm;
> @@ -5341,7 +5341,7 @@ LSRInstance::LSRInstance(Loop *L, IVUser
> ImplementSolution(Solution);
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void LSRInstance::print_factors_and_types(raw_ostream &OS) const {
> if (Factors.empty() && Types.empty()) return;
>
>
> Modified: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SROA.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Sun Oct 15 07:32:27 2017
> @@ -292,7 +292,7 @@ public:
> /// need to replace with undef.
> ArrayRef<Use *> getDeadOperands() const { return DeadOperands; }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> void print(raw_ostream &OS, const_iterator I, StringRef Indent = " ") const;
> void printSlice(raw_ostream &OS, const_iterator I,
> StringRef Indent = " ") const;
> @@ -309,7 +309,7 @@ private:
>
> friend class AllocaSlices::SliceBuilder;
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> /// \brief Handle to alloca instruction to simplify method interfaces.
> AllocaInst &AI;
> #endif
> @@ -1027,7 +1027,7 @@ private:
>
> AllocaSlices::AllocaSlices(const DataLayout &DL, AllocaInst &AI)
> :
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> AI(AI),
> #endif
> PointerEscapingInstr(nullptr) {
> @@ -1059,7 +1059,7 @@ AllocaSlices::AllocaSlices(const DataLay
> std::sort(Slices.begin(), Slices.end());
> }
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
>
> void AllocaSlices::print(raw_ostream &OS, const_iterator I,
> StringRef Indent) const {
> @@ -1098,7 +1098,7 @@ LLVM_DUMP_METHOD void AllocaSlices::dump
> }
> LLVM_DUMP_METHOD void AllocaSlices::dump() const { print(dbgs()); }
>
> -#endif // LLVM_ENABLE_DUMP
> +#endif // !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
>
> /// Walk the range of a partitioning looking for a common type to cover this
> /// sequence of slices.
>
> Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
> +++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Sun Oct 15 07:32:27 2017
> @@ -766,7 +766,7 @@ public:
>
> } // end anonymous namespace
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void MatchableInfo::dump() const {
> errs() << TheDef->getName() << " -- " << "flattened:\"" << AsmString <<"\"\n";
>
>
> Modified: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SubtargetEmitter.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp (original)
> +++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp Sun Oct 15 07:32:27 2017
> @@ -1233,7 +1233,7 @@ void SubtargetEmitter::EmitSchedModel(ra
> OS << "#ifdef DBGFIELD\n"
> << "#error \"<target>GenSubtargetInfo.inc requires a DBGFIELD macro\"\n"
> << "#endif\n"
> - << "#ifdef LLVM_ENABLE_DUMP\n"
> + << "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)\n"
> << "#define DBGFIELD(x) x,\n"
> << "#else\n"
> << "#define DBGFIELD(x)\n"
>
> Modified: llvm/trunk/utils/TableGen/SubtargetFeatureInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SubtargetFeatureInfo.cpp?rev=315854&r1=315853&r2=315854&view=diff
> ==============================================================================
> --- llvm/trunk/utils/TableGen/SubtargetFeatureInfo.cpp (original)
> +++ llvm/trunk/utils/TableGen/SubtargetFeatureInfo.cpp Sun Oct 15 07:32:27 2017
> @@ -16,7 +16,7 @@
>
> using namespace llvm;
>
> -#ifdef LLVM_ENABLE_DUMP
> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> LLVM_DUMP_METHOD void SubtargetFeatureInfo::dump() const {
> errs() << getEnumName() << " " << Index << "\n" << *TheDef;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list