1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[dump] Remove NDEBUG from test to enable dump methods [NFC]

Summary:
Add LLVM_FORCE_ENABLE_DUMP cmake option, and use it along with
LLVM_ENABLE_ASSERTIONS to set LLVM_ENABLE_DUMP.

Remove NDEBUG and only use LLVM_ENABLE_DUMP to enable dump methods.

Move definition of LLVM_ENABLE_DUMP from config.h to llvm-config.h so
it'll be picked up by public headers.

Differential Revision: https://reviews.llvm.org/D38406

llvm-svn: 315590
This commit is contained in:
Don Hinton 2017-10-12 16:16:06 +00:00
parent aa2c5f46cf
commit 16622c817e
113 changed files with 173 additions and 172 deletions

View File

@ -388,15 +388,15 @@ option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF)
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) 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_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" ) if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF) option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF)
option(LLVM_FORCE_ENABLE_DUMP "Enable dump functions in release builds" OFF)
else() else()
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON) option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
option(LLVM_FORCE_ENABLE_DUMP "Enable dump functions in release builds" ON)
endif() endif()
if( LLVM_ENABLE_ASSERTIONS ) if( LLVM_ENABLE_ASSERTIONS OR LLVM_FORCE_ENABLE_DUMP )
set(LLVM_ENABLE_DUMP ON) set(LLVM_ENABLE_DUMP ON)
endif() endif()

View File

@ -336,7 +336,7 @@ CAMLprim LLVMContextRef llvm_type_context(LLVMTypeRef Ty) {
/* lltype -> unit */ /* lltype -> unit */
CAMLprim value llvm_dump_type(LLVMTypeRef Val) { CAMLprim value llvm_dump_type(LLVMTypeRef Val) {
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVMDumpType(Val); LLVMDumpType(Val);
#else #else
caml_raise_with_arg(*caml_named_value("Llvm.FeatureDisabled"), caml_raise_with_arg(*caml_named_value("Llvm.FeatureDisabled"),

View File

@ -109,7 +109,7 @@ public:
void print(raw_ostream &OS) const; void print(raw_ostream &OS) const;
/// dump - Dump the dominance frontier to dbgs(). /// dump - Dump the dominance frontier to dbgs().
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
void dump() const; void dump() const;
#endif #endif
}; };

View File

@ -148,7 +148,7 @@ void DominanceFrontierBase<BlockT, IsPostDom>::print(raw_ostream &OS) const {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
template <class BlockT, bool IsPostDom> template <class BlockT, bool IsPostDom>
void DominanceFrontierBase<BlockT, IsPostDom>::dump() const { void DominanceFrontierBase<BlockT, IsPostDom>::dump() const {
print(dbgs()); print(dbgs());

View File

@ -437,7 +437,7 @@ public:
void print(raw_ostream &OS, bool printTree = true, unsigned level = 0, void print(raw_ostream &OS, bool printTree = true, unsigned level = 0,
PrintStyle Style = PrintNone) const; PrintStyle Style = PrintNone) const;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// @brief Print the region to stderr. /// @brief Print the region to stderr.
void dump() const; void dump() const;
#endif #endif
@ -805,7 +805,7 @@ public:
static typename RegionT::PrintStyle printStyle; static typename RegionT::PrintStyle printStyle;
void print(raw_ostream &OS) const; void print(raw_ostream &OS) const;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
void dump() const; void dump() const;
#endif #endif

View File

@ -521,7 +521,7 @@ void RegionBase<Tr>::print(raw_ostream &OS, bool print_tree, unsigned level,
OS.indent(level * 2) << "} \n"; OS.indent(level * 2) << "} \n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
template <class Tr> template <class Tr>
void RegionBase<Tr>::dump() const { void RegionBase<Tr>::dump() const {
print(dbgs(), true, getDepth(), RegionInfoBase<Tr>::printStyle); print(dbgs(), true, getDepth(), RegionInfoBase<Tr>::printStyle);
@ -789,7 +789,7 @@ void RegionInfoBase<Tr>::print(raw_ostream &OS) const {
OS << "End region tree\n"; OS << "End region tree\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
template <class Tr> template <class Tr>
void RegionInfoBase<Tr>::dump() const { print(dbgs()); } void RegionInfoBase<Tr>::dump() const { print(dbgs()); }
#endif #endif

View File

@ -116,7 +116,7 @@ public:
return SchedModel.getProcResource(PIdx); return SchedModel.getProcResource(PIdx);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
const char *getResourceName(unsigned PIdx) const { const char *getResourceName(unsigned PIdx) const {
if (!PIdx) if (!PIdx)
return "MOps"; return "MOps";

View File

@ -353,9 +353,6 @@
/* Has gcc/MSVC atomic intrinsics */ /* Has gcc/MSVC atomic intrinsics */
#cmakedefine01 LLVM_HAS_ATOMICS #cmakedefine01 LLVM_HAS_ATOMICS
/* Define if LLVM_ENABLE_DUMP is enabled */
#cmakedefine LLVM_ENABLE_DUMP
/* Host triple LLVM will be executed on */ /* Host triple LLVM will be executed on */
#cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}" #cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"

View File

@ -14,6 +14,10 @@
#ifndef LLVM_CONFIG_H #ifndef LLVM_CONFIG_H
#define 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 */ /* Define if we link Polly to the tools */
#cmakedefine LINK_POLLY_INTO_TOOLS #cmakedefine LINK_POLLY_INTO_TOOLS

View File

@ -283,7 +283,7 @@ public:
iterator begin() const; iterator begin() const;
iterator end() const; iterator end() const;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
void dump() const; void dump() const;
#endif #endif
}; };

View File

@ -24,7 +24,7 @@ struct InstrItinerary;
/// Define a kind of processor resource that will be modeled by the scheduler. /// Define a kind of processor resource that will be modeled by the scheduler.
struct MCProcResourceDesc { struct MCProcResourceDesc {
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
const char *Name; const char *Name;
#endif #endif
unsigned NumUnits; // Number of resource of this kind 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 InvalidNumMicroOps = UINT16_MAX;
static const unsigned short VariantNumMicroOps = UINT16_MAX - 1; static const unsigned short VariantNumMicroOps = UINT16_MAX - 1;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
const char* Name; const char* Name;
#endif #endif
unsigned short NumMicroOps; unsigned short NumMicroOps;

View File

@ -87,7 +87,7 @@ public:
<< ", ImportIndex=" << ImportIndex; << ", ImportIndex=" << ImportIndex;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void dump() const { print(dbgs()); } LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
#endif #endif
}; };

View File

@ -442,10 +442,10 @@ void AnnotateIgnoreWritesEnd(const char *file, int line);
/// \brief Mark debug helper function definitions like dump() that should not be /// \brief Mark debug helper function definitions like dump() that should not be
/// stripped from debug builds. /// stripped from debug builds.
/// Note that you should also surround dump() functions with /// Note that you should also surround dump() functions with
/// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always /// `#ifdef LLVM_ENABLE_DUMP` so they do always get stripped in release builds
/// get stripped in release builds. /// unless asserts are enabled..
// FIXME: Move this to a private config.h as it's not usable in public headers. // FIXME: Move this to a private config.h as it's not usable in public headers.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
#define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
#else #else
#define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE

View File

@ -648,7 +648,7 @@ void AliasSetTracker::print(raw_ostream &OS) const {
OS << "\n"; OS << "\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void AliasSet::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void AliasSet::dump() const { print(dbgs()); }
LLVM_DUMP_METHOD void AliasSetTracker::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void AliasSetTracker::dump() const { print(dbgs()); }
#endif #endif

View File

@ -46,7 +46,7 @@ ScaledNumber<uint64_t> BlockMass::toScaled() const {
return ScaledNumber<uint64_t>(getMass() + 1, -64); return ScaledNumber<uint64_t>(getMass() + 1, -64);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void BlockMass::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void BlockMass::dump() const { print(dbgs()); }
#endif #endif

View File

@ -109,7 +109,7 @@ void CallGraph::print(raw_ostream &OS) const {
CN->print(OS); CN->print(OS);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void CallGraph::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void CallGraph::dump() const { print(dbgs()); }
#endif #endif
@ -178,7 +178,7 @@ void CallGraphNode::print(raw_ostream &OS) const {
OS << '\n'; OS << '\n';
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void CallGraphNode::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void CallGraphNode::dump() const { print(dbgs()); }
#endif #endif
@ -292,7 +292,7 @@ void CallGraphWrapperPass::print(raw_ostream &OS, const Module *) const {
G->print(OS); G->print(OS);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
void CallGraphWrapperPass::dump() const { print(dbgs(), nullptr); } void CallGraphWrapperPass::dump() const { print(dbgs(), nullptr); }
#endif #endif

View File

@ -385,7 +385,7 @@ void DependenceInfo::Constraint::setAny(ScalarEvolution *NewSE) {
Kind = Any; Kind = Any;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
// For debugging purposes. Dumps the constraint out to OS. // For debugging purposes. Dumps the constraint out to OS.
LLVM_DUMP_METHOD void DependenceInfo::Constraint::dump(raw_ostream &OS) const { LLVM_DUMP_METHOD void DependenceInfo::Constraint::dump(raw_ostream &OS) const {
if (isEmpty()) if (isEmpty())

View File

@ -59,7 +59,7 @@ void DominanceFrontierWrapperPass::print(raw_ostream &OS, const Module *) const
DF.print(OS); DF.print(OS);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void DominanceFrontierWrapperPass::dump() const { LLVM_DUMP_METHOD void DominanceFrontierWrapperPass::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -340,7 +340,7 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void IVUsers::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void IVUsers::dump() const { print(dbgs()); }
#endif #endif

View File

@ -1698,7 +1698,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {
return Cost < std::max(1, Threshold); return Cost < std::max(1, Threshold);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// \brief Dump stats about this call's analysis. /// \brief Dump stats about this call's analysis.
LLVM_DUMP_METHOD void CallAnalyzer::dump() { LLVM_DUMP_METHOD void CallAnalyzer::dump() {
#define DEBUG_PRINT_STAT(x) dbgs() << " " #x ": " << x << "\n" #define DEBUG_PRINT_STAT(x) dbgs() << " " #x ": " << x << "\n"

View File

@ -137,7 +137,7 @@ void LazyCallGraph::Node::replaceFunction(Function &NewF) {
F = &NewF; F = &NewF;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LazyCallGraph::Node::dump() const { LLVM_DUMP_METHOD void LazyCallGraph::Node::dump() const {
dbgs() << *this << '\n'; dbgs() << *this << '\n';
} }
@ -207,7 +207,7 @@ LazyCallGraph &LazyCallGraph::operator=(LazyCallGraph &&G) {
return *this; return *this;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LazyCallGraph::SCC::dump() const { LLVM_DUMP_METHOD void LazyCallGraph::SCC::dump() const {
dbgs() << *this << '\n'; dbgs() << *this << '\n';
} }
@ -281,7 +281,7 @@ bool LazyCallGraph::SCC::isAncestorOf(const SCC &TargetC) const {
LazyCallGraph::RefSCC::RefSCC(LazyCallGraph &G) : G(&G) {} LazyCallGraph::RefSCC::RefSCC(LazyCallGraph &G) : G(&G) {}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LazyCallGraph::RefSCC::dump() const { LLVM_DUMP_METHOD void LazyCallGraph::RefSCC::dump() const {
dbgs() << *this << '\n'; dbgs() << *this << '\n';
} }

View File

@ -407,7 +407,7 @@ BasicBlock *Loop::getUniqueExitBlock() const {
return nullptr; return nullptr;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void Loop::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void Loop::dump() const { print(dbgs()); }
LLVM_DUMP_METHOD void Loop::dumpVerbose() const { LLVM_DUMP_METHOD void Loop::dumpVerbose() const {

View File

@ -1622,7 +1622,7 @@ void MemorySSA::print(raw_ostream &OS) const {
F.print(OS, &Writer); F.print(OS, &Writer);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MemorySSA::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void MemorySSA::dump() const { print(dbgs()); }
#endif #endif
@ -1899,7 +1899,7 @@ void MemoryUse::print(raw_ostream &OS) const {
void MemoryAccess::dump() const { void MemoryAccess::dump() const {
// Cannot completely remove virtual function even in release mode. // Cannot completely remove virtual function even in release mode.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
print(dbgs()); print(dbgs());
dbgs() << "\n"; dbgs() << "\n";
#endif #endif

View File

@ -41,7 +41,7 @@ static bool CanPHITrans(Instruction *Inst) {
return false; return false;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void PHITransAddr::dump() const { LLVM_DUMP_METHOD void PHITransAddr::dump() const {
if (!Addr) { if (!Addr) {
dbgs() << "PHITransAddr: null\n"; dbgs() << "PHITransAddr: null\n";

View File

@ -152,7 +152,7 @@ void RegionInfoPass::print(raw_ostream &OS, const Module *) const {
RI.print(OS); RI.print(OS);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RegionInfoPass::dump() const { LLVM_DUMP_METHOD void RegionInfoPass::dump() const {
RI.dump(); RI.dump();
} }

View File

@ -212,7 +212,7 @@ static cl::opt<unsigned>
// Implementation of the SCEV class. // Implementation of the SCEV class.
// //
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void SCEV::dump() const { LLVM_DUMP_METHOD void SCEV::dump() const {
print(dbgs()); print(dbgs());
dbgs() << '\n'; dbgs() << '\n';

View File

@ -44,7 +44,7 @@ void Trace::print(raw_ostream &O) const {
O << "; Trace parent function: \n" << *F; O << "; Trace parent function: \n" << *F;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// dump - Debugger convenience method; writes trace to standard error /// dump - Debugger convenience method; writes trace to standard error
/// output stream. /// output stream.
LLVM_DUMP_METHOD void Trace::dump() const { LLVM_DUMP_METHOD void Trace::dump() const {

View File

@ -465,7 +465,7 @@ unsigned ValueEnumerator::getValueID(const Value *V) const {
return I->second-1; return I->second-1;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ValueEnumerator::dump() const { LLVM_DUMP_METHOD void ValueEnumerator::dump() const {
print(dbgs(), ValueMap, "Default"); print(dbgs(), ValueMap, "Default");
dbgs() << '\n'; dbgs() << '\n';

View File

@ -127,7 +127,7 @@ void DIEAbbrev::print(raw_ostream &O) const {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void DIEAbbrev::dump() const { LLVM_DUMP_METHOD void DIEAbbrev::dump() const {
print(dbgs()); print(dbgs());
} }
@ -267,7 +267,7 @@ void DIE::print(raw_ostream &O, unsigned IndentCount) const {
O << "\n"; O << "\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void DIE::dump() const { LLVM_DUMP_METHOD void DIE::dump() const {
print(dbgs()); print(dbgs());
} }
@ -359,7 +359,7 @@ void DIEValue::print(raw_ostream &O) const {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void DIEValue::dump() const { LLVM_DUMP_METHOD void DIEValue::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -76,7 +76,7 @@ public:
const DIExpression *getExpression() const { return Expression; } const DIExpression *getExpression() const { return Expression; }
friend bool operator==(const Value &, const Value &); friend bool operator==(const Value &, const Value &);
friend bool operator<(const Value &, const Value &); friend bool operator<(const Value &, const Value &);
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void dump() const { LLVM_DUMP_METHOD void dump() const {
if (isLocation()) { if (isLocation()) {
llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " "; llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " ";

View File

@ -138,7 +138,7 @@ void BranchRelaxation::verify() {
#endif #endif
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// print block size and offset information - debugging /// print block size and offset information - debugging
LLVM_DUMP_METHOD void BranchRelaxation::dumpBBs() { LLVM_DUMP_METHOD void BranchRelaxation::dumpBBs() {
for (auto &MBB : *MF) { for (auto &MBB : *MF) {

View File

@ -2750,7 +2750,7 @@ static inline raw_ostream &operator<<(raw_ostream &OS, const ExtAddrMode &AM) {
} }
#endif #endif
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
void ExtAddrMode::print(raw_ostream &OS) const { void ExtAddrMode::print(raw_ostream &OS) const {
bool NeedPlus = false; bool NeedPlus = false;
OS << "["; OS << "[";

View File

@ -987,7 +987,7 @@ bool RegBankSelect::MappingCost::operator==(const MappingCost &Cost) const {
LocalFreq == Cost.LocalFreq; LocalFreq == Cost.LocalFreq;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RegBankSelect::MappingCost::dump() const { LLVM_DUMP_METHOD void RegBankSelect::MappingCost::dump() const {
print(dbgs()); print(dbgs());
dbgs() << '\n'; dbgs() << '\n';

View File

@ -76,7 +76,7 @@ bool RegisterBank::operator==(const RegisterBank &OtherRB) const {
return &OtherRB == this; return &OtherRB == this;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RegisterBank::dump(const TargetRegisterInfo *TRI) const { LLVM_DUMP_METHOD void RegisterBank::dump(const TargetRegisterInfo *TRI) const {
print(dbgs(), /* IsForDebug */ true, TRI); print(dbgs(), /* IsForDebug */ true, TRI);
} }

View File

@ -465,7 +465,7 @@ unsigned RegisterBankInfo::getSizeInBits(unsigned Reg,
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Helper classes implementation. // Helper classes implementation.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RegisterBankInfo::PartialMapping::dump() const { LLVM_DUMP_METHOD void RegisterBankInfo::PartialMapping::dump() const {
print(dbgs()); print(dbgs());
dbgs() << '\n'; dbgs() << '\n';
@ -518,7 +518,7 @@ bool RegisterBankInfo::ValueMapping::verify(unsigned MeaningfulBitWidth) const {
return true; return true;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RegisterBankInfo::ValueMapping::dump() const { LLVM_DUMP_METHOD void RegisterBankInfo::ValueMapping::dump() const {
print(dbgs()); print(dbgs());
dbgs() << '\n'; dbgs() << '\n';
@ -571,7 +571,7 @@ bool RegisterBankInfo::InstructionMapping::verify(
return true; return true;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RegisterBankInfo::InstructionMapping::dump() const { LLVM_DUMP_METHOD void RegisterBankInfo::InstructionMapping::dump() const {
print(dbgs()); print(dbgs());
dbgs() << '\n'; dbgs() << '\n';
@ -694,7 +694,7 @@ RegisterBankInfo::OperandsMapper::getVRegs(unsigned OpIdx,
return Res; return Res;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RegisterBankInfo::OperandsMapper::dump() const { LLVM_DUMP_METHOD void RegisterBankInfo::OperandsMapper::dump() const {
print(dbgs(), true); print(dbgs(), true);
dbgs() << '\n'; dbgs() << '\n';

View File

@ -706,7 +706,7 @@ bool InlineSpiller::coalesceStackAccess(MachineInstr *MI, unsigned Reg) {
return true; return true;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
// Dump the range of instructions from B to E with their slot indexes. // Dump the range of instructions from B to E with their slot indexes.
static void dumpMachineInstrRangeWithSlotIndex(MachineBasicBlock::iterator B, static void dumpMachineInstrRangeWithSlotIndex(MachineBasicBlock::iterator B,

View File

@ -317,7 +317,7 @@ bool LexicalScopes::dominates(const DILocation *DL, MachineBasicBlock *MBB) {
return Result; return Result;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LexicalScope::dump(unsigned Indent) const { LLVM_DUMP_METHOD void LexicalScope::dump(unsigned Indent) const {
raw_ostream &err = dbgs(); raw_ostream &err = dbgs();
err.indent(Indent); err.indent(Indent);

View File

@ -160,7 +160,7 @@ private:
/// dominates MBB. /// dominates MBB.
bool dominates(MachineBasicBlock &MBB) const { return UVS.dominates(&MBB); } bool dominates(MachineBasicBlock &MBB) const { return UVS.dominates(&MBB); }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void dump() const { MI.dump(); } LLVM_DUMP_METHOD void dump() const { MI.dump(); }
#endif #endif

View File

@ -398,7 +398,7 @@ public:
} // end anonymous namespace } // end anonymous namespace
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
static void printDebugLoc(const DebugLoc &DL, raw_ostream &CommentOS, static void printDebugLoc(const DebugLoc &DL, raw_ostream &CommentOS,
const LLVMContext &Ctx) { const LLVMContext &Ctx) {
if (!DL) if (!DL)
@ -1218,7 +1218,7 @@ bool LiveDebugVariables::doInitialization(Module &M) {
return Pass::doInitialization(M); return Pass::doInitialization(M);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LiveDebugVariables::dump() const { LLVM_DUMP_METHOD void LiveDebugVariables::dump() const {
if (pImpl) if (pImpl)
static_cast<LDVImpl*>(pImpl)->print(dbgs()); static_cast<LDVImpl*>(pImpl)->print(dbgs());

View File

@ -944,7 +944,7 @@ raw_ostream& llvm::operator<<(raw_ostream& OS, const LiveRange::Segment &S) {
return OS << '[' << S.start << ',' << S.end << ':' << S.valno->id << ')'; return OS << '[' << S.start << ',' << S.end << ':' << S.valno->id << ')';
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LiveRange::Segment::dump() const { LLVM_DUMP_METHOD void LiveRange::Segment::dump() const {
dbgs() << *this << '\n'; dbgs() << *this << '\n';
} }
@ -993,7 +993,7 @@ void LiveInterval::print(raw_ostream &OS) const {
OS << SR; OS << SR;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LiveRange::dump() const { LLVM_DUMP_METHOD void LiveRange::dump() const {
dbgs() << *this << '\n'; dbgs() << *this << '\n';
} }
@ -1077,7 +1077,7 @@ void LiveInterval::verify(const MachineRegisterInfo *MRI) const {
// When they exist, Spills.back().start <= LastStart, // When they exist, Spills.back().start <= LastStart,
// and WriteI[-1].start <= LastStart. // and WriteI[-1].start <= LastStart.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
void LiveRangeUpdater::print(raw_ostream &OS) const { void LiveRangeUpdater::print(raw_ostream &OS) const {
if (!isDirty()) { if (!isDirty()) {
if (LR) if (LR)

View File

@ -179,7 +179,7 @@ void LiveIntervals::printInstrs(raw_ostream &OS) const {
MF->print(OS, Indexes); MF->print(OS, Indexes);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LiveIntervals::dumpInstrs() const { LLVM_DUMP_METHOD void LiveIntervals::dumpInstrs() const {
printInstrs(dbgs()); printInstrs(dbgs());
} }

View File

@ -130,7 +130,7 @@ void LivePhysRegs::print(raw_ostream &OS) const {
OS << "\n"; OS << "\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LivePhysRegs::dump() const { LLVM_DUMP_METHOD void LivePhysRegs::dump() const {
dbgs() << " " << *this; dbgs() << " " << *this;
} }

View File

@ -64,7 +64,7 @@ LiveVariables::VarInfo::findKill(const MachineBasicBlock *MBB) const {
return nullptr; return nullptr;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LiveVariables::VarInfo::dump() const { LLVM_DUMP_METHOD void LiveVariables::VarInfo::dump() const {
dbgs() << " Alive in blocks: "; dbgs() << " Alive in blocks: ";
for (SparseBitVector<>::iterator I = AliveBlocks.begin(), for (SparseBitVector<>::iterator I = AliveBlocks.begin(),

View File

@ -222,7 +222,7 @@ bool MachineBasicBlock::hasEHPadSuccessor() const {
return false; return false;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineBasicBlock::dump() const { LLVM_DUMP_METHOD void MachineBasicBlock::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -242,7 +242,7 @@ void MachineFrameInfo::print(const MachineFunction &MF, raw_ostream &OS) const{
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineFrameInfo::dump(const MachineFunction &MF) const { LLVM_DUMP_METHOD void MachineFrameInfo::dump(const MachineFunction &MF) const {
print(MF, dbgs()); print(MF, dbgs());
} }

View File

@ -478,7 +478,7 @@ const char *MachineFunction::createExternalSymbolName(StringRef Name) {
return Dest; return Dest;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineFunction::dump() const { LLVM_DUMP_METHOD void MachineFunction::dump() const {
print(dbgs()); print(dbgs());
} }
@ -914,7 +914,7 @@ void MachineJumpTableInfo::print(raw_ostream &OS) const {
OS << '\n'; OS << '\n';
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineJumpTableInfo::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void MachineJumpTableInfo::dump() const { print(dbgs()); }
#endif #endif
@ -1069,6 +1069,6 @@ void MachineConstantPool::print(raw_ostream &OS) const {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineConstantPool::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void MachineConstantPool::dump() const { print(dbgs()); }
#endif #endif

View File

@ -566,7 +566,7 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
OS << "[TF=" << TF << ']'; OS << "[TF=" << TF << ']';
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineOperand::dump() const { LLVM_DUMP_METHOD void MachineOperand::dump() const {
dbgs() << *this << '\n'; dbgs() << *this << '\n';
} }
@ -1873,7 +1873,7 @@ void MachineInstr::copyImplicitOps(MachineFunction &MF,
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineInstr::dump() const { LLVM_DUMP_METHOD void MachineInstr::dump() const {
dbgs() << " "; dbgs() << " ";
print(dbgs()); print(dbgs());

View File

@ -138,7 +138,7 @@ MachineLoopInfo::findLoopPreheader(MachineLoop *L,
return Preheader; return Preheader;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineLoop::dump() const { LLVM_DUMP_METHOD void MachineLoop::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -558,7 +558,7 @@ public:
os << "\n"; os << "\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void dump() const { print(dbgs()); } LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
#endif #endif
}; };
@ -4010,7 +4010,7 @@ void SMSchedule::finalizeSchedule(SwingSchedulerDAG *SSD) {
DEBUG(dump();); DEBUG(dump(););
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// Print the schedule information to the given output. /// Print the schedule information to the given output.
void SMSchedule::print(raw_ostream &os) const { void SMSchedule::print(raw_ostream &os) const {
// Iterate over each cycle. // Iterate over each cycle.

View File

@ -118,7 +118,7 @@ void MachineRegionInfoPass::print(raw_ostream &OS, const Module *) const {
RI.print(OS); RI.print(OS);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineRegionInfoPass::dump() const { LLVM_DUMP_METHOD void MachineRegionInfoPass::dump() const {
RI.dump(); RI.dump();
} }

View File

@ -458,7 +458,7 @@ LaneBitmask MachineRegisterInfo::getMaxLaneMaskForVReg(unsigned Reg) const {
return TRC.getLaneMask(); return TRC.getLaneMask();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MachineRegisterInfo::dumpUses(unsigned Reg) const { LLVM_DUMP_METHOD void MachineRegisterInfo::dumpUses(unsigned Reg) const {
for (MachineInstr &I : use_instructions(Reg)) for (MachineInstr &I : use_instructions(Reg))
I.dump(); I.dump();

View File

@ -581,7 +581,7 @@ void MachineSchedulerBase::print(raw_ostream &O, const Module* m) const {
// unimplemented // unimplemented
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ReadyQueue::dump() const { LLVM_DUMP_METHOD void ReadyQueue::dump() const {
dbgs() << "Queue " << Name << ": "; dbgs() << "Queue " << Name << ": ";
for (const SUnit *SU : Queue) for (const SUnit *SU : Queue)
@ -919,7 +919,7 @@ void ScheduleDAGMI::placeDebugValues() {
FirstDbgValue = nullptr; FirstDbgValue = nullptr;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ScheduleDAGMI::dumpSchedule() const { LLVM_DUMP_METHOD void ScheduleDAGMI::dumpSchedule() const {
for (MachineBasicBlock::iterator MI = begin(), ME = end(); MI != ME; ++MI) { for (MachineBasicBlock::iterator MI = begin(), ME = end(); MI != ME; ++MI) {
if (SUnit *SU = getSUnit(&(*MI))) if (SUnit *SU = getSUnit(&(*MI)))
@ -2354,7 +2354,7 @@ SUnit *SchedBoundary::pickOnlyChoice() {
return nullptr; return nullptr;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
// This is useful information to dump after bumpNode. // This is useful information to dump after bumpNode.
// Note that the Queue contents are more useful before pickNodeFromQueue. // Note that the Queue contents are more useful before pickNodeFromQueue.
LLVM_DUMP_METHOD void SchedBoundary::dumpScheduledState() const { LLVM_DUMP_METHOD void SchedBoundary::dumpScheduledState() const {
@ -2698,7 +2698,7 @@ void GenericScheduler::initPolicy(MachineBasicBlock::iterator Begin,
void GenericScheduler::dumpPolicy() const { void GenericScheduler::dumpPolicy() const {
// Cannot completely remove virtual function even in release mode. // Cannot completely remove virtual function even in release mode.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
dbgs() << "GenericScheduler RegionPolicy: " dbgs() << "GenericScheduler RegionPolicy: "
<< " ShouldTrackPressure=" << RegionPolicy.ShouldTrackPressure << " ShouldTrackPressure=" << RegionPolicy.ShouldTrackPressure
<< " OnlyTopDown=" << RegionPolicy.OnlyTopDown << " OnlyTopDown=" << RegionPolicy.OnlyTopDown

View File

@ -251,7 +251,7 @@ void SchedulePostRATDList::exitRegion() {
ScheduleDAGInstrs::exitRegion(); ScheduleDAGInstrs::exitRegion();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// dumpSchedule - dump the scheduled Sequence. /// dumpSchedule - dump the scheduled Sequence.
LLVM_DUMP_METHOD void SchedulePostRATDList::dumpSchedule() const { LLVM_DUMP_METHOD void SchedulePostRATDList::dumpSchedule() const {
for (unsigned i = 0, e = Sequence.size(); i != e; i++) { for (unsigned i = 0, e = Sequence.size(); i != e; i++) {

View File

@ -868,7 +868,7 @@ static Printable PrintNodeInfo(PBQP::RegAlloc::PBQPRAGraph::NodeId NId,
}); });
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump(raw_ostream &OS) const { LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump(raw_ostream &OS) const {
for (auto NId : nodeIds()) { for (auto NId : nodeIds()) {
const Vector &Costs = getNodeCosts(NId); const Vector &Costs = getNodeCosts(NId);

View File

@ -76,7 +76,7 @@ static void decreaseSetPressure(std::vector<unsigned> &CurrSetPressure,
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
void llvm::dumpRegSetPressure(ArrayRef<unsigned> SetPressure, void llvm::dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
const TargetRegisterInfo *TRI) { const TargetRegisterInfo *TRI) {

View File

@ -250,7 +250,7 @@ void StackColoring::calculateLiveIntervals() {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void StackColoring::dumpAllocas() { LLVM_DUMP_METHOD void StackColoring::dumpAllocas() {
dbgs() << "Allocas:\n"; dbgs() << "Allocas:\n";
for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo) for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo)

View File

@ -335,7 +335,7 @@ void SUnit::biasCriticalPath() {
std::swap(*Preds.begin(), *BestI); std::swap(*Preds.begin(), *BestI);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
raw_ostream &SUnit::print(raw_ostream &OS, raw_ostream &SUnit::print(raw_ostream &OS,
const SUnit *Entry, const SUnit *Exit) const { const SUnit *Entry, const SUnit *Exit) const {

View File

@ -97,7 +97,7 @@ static unsigned getReductionSize() {
} }
static void dumpSUList(ScheduleDAGInstrs::SUList &L) { static void dumpSUList(ScheduleDAGInstrs::SUList &L) {
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
dbgs() << "{ "; dbgs() << "{ ";
for (const SUnit *su : L) { for (const SUnit *su : L) {
dbgs() << "SU(" << su->NodeNum << ")"; dbgs() << "SU(" << su->NodeNum << ")";
@ -1096,7 +1096,7 @@ void ScheduleDAGInstrs::fixupKills(MachineBasicBlock &MBB) {
void ScheduleDAGInstrs::dumpNode(const SUnit *SU) const { void ScheduleDAGInstrs::dumpNode(const SUnit *SU) const {
// Cannot completely remove virtual function even in release mode. // Cannot completely remove virtual function even in release mode.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
SU->getInstr()->dump(); SU->getInstr()->dump();
#endif #endif
} }
@ -1408,7 +1408,7 @@ void SchedDFSResult::scheduleTree(unsigned SubtreeID) {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ILPValue::print(raw_ostream &OS) const { LLVM_DUMP_METHOD void ILPValue::print(raw_ostream &OS) const {
OS << InstrCount << " / " << Length << " = "; OS << InstrCount << " / " << Length << " = ";
if (!Length) if (!Length)

View File

@ -83,7 +83,7 @@ void ScoreboardHazardRecognizer::Reset() {
ReservedScoreboard.reset(); ReservedScoreboard.reset();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ScoreboardHazardRecognizer::Scoreboard::dump() const { LLVM_DUMP_METHOD void ScoreboardHazardRecognizer::Scoreboard::dump() const {
dbgs() << "Scoreboard:\n"; dbgs() << "Scoreboard:\n";

View File

@ -1855,7 +1855,7 @@ public:
return V; return V;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void dump(ScheduleDAG *DAG) const override { LLVM_DUMP_METHOD void dump(ScheduleDAG *DAG) const override {
// Emulate pop() without clobbering NodeQueueIds. // Emulate pop() without clobbering NodeQueueIds.
std::vector<SUnit *> DumpQueue = Queue; std::vector<SUnit *> DumpQueue = Queue;
@ -2026,7 +2026,7 @@ unsigned RegReductionPQBase::getNodePriority(const SUnit *SU) const {
// Register Pressure Tracking // Register Pressure Tracking
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RegReductionPQBase::dumpRegPressure() const { LLVM_DUMP_METHOD void RegReductionPQBase::dumpRegPressure() const {
for (const TargetRegisterClass *RC : TRI->regclasses()) { for (const TargetRegisterClass *RC : TRI->regclasses()) {
unsigned Id = RC->getID(); unsigned Id = RC->getID();

View File

@ -651,7 +651,7 @@ void ScheduleDAGSDNodes::computeOperandLatency(SDNode *Def, SDNode *Use,
void ScheduleDAGSDNodes::dumpNode(const SUnit *SU) const { void ScheduleDAGSDNodes::dumpNode(const SUnit *SU) const {
// Cannot completely remove virtual function even in release mode. // Cannot completely remove virtual function even in release mode.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
if (!SU->getNode()) { if (!SU->getNode()) {
dbgs() << "PHYS REG COPY\n"; dbgs() << "PHYS REG COPY\n";
return; return;
@ -671,7 +671,7 @@ void ScheduleDAGSDNodes::dumpNode(const SUnit *SU) const {
#endif #endif
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
void ScheduleDAGSDNodes::dumpSchedule() const { void ScheduleDAGSDNodes::dumpSchedule() const {
for (unsigned i = 0, e = Sequence.size(); i != e; i++) { for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
if (SUnit *SU = Sequence[i]) if (SUnit *SU = Sequence[i])

View File

@ -401,7 +401,7 @@ static Printable PrintNodeId(const SDNode &Node) {
}); });
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void SDNode::dump() const { dump(nullptr); } LLVM_DUMP_METHOD void SDNode::dump() const { dump(nullptr); }
LLVM_DUMP_METHOD void SDNode::dump(const SelectionDAG *G) const { LLVM_DUMP_METHOD void SDNode::dump(const SelectionDAG *G) const {
@ -604,7 +604,7 @@ static bool shouldPrintInline(const SDNode &Node) {
return Node.getNumOperands() == 0; return Node.getNumOperands() == 0;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) { static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) {
for (const SDValue &Op : N->op_values()) { for (const SDValue &Op : N->op_values()) {
if (shouldPrintInline(*Op.getNode())) if (shouldPrintInline(*Op.getNode()))
@ -658,7 +658,7 @@ static bool printOperand(raw_ostream &OS, const SelectionDAG *G,
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
using VisitedSDNodeSet = SmallPtrSet<const SDNode *, 32>; using VisitedSDNodeSet = SmallPtrSet<const SDNode *, 32>;
static void DumpNodesr(raw_ostream &OS, const SDNode *N, unsigned indent, static void DumpNodesr(raw_ostream &OS, const SDNode *N, unsigned indent,
@ -731,7 +731,7 @@ void SDNode::printrFull(raw_ostream &OS, const SelectionDAG *G) const {
printrWithDepth(OS, G, 10); printrWithDepth(OS, G, 10);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
void SDNode::dumprWithDepth(const SelectionDAG *G, unsigned depth) const { void SDNode::dumprWithDepth(const SelectionDAG *G, unsigned depth) const {
printrWithDepth(dbgs(), G, depth); printrWithDepth(dbgs(), G, depth);

View File

@ -250,7 +250,7 @@ void SlotIndexes::repairIndexesInRange(MachineBasicBlock *MBB,
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void SlotIndexes::dump() const { LLVM_DUMP_METHOD void SlotIndexes::dump() const {
for (IndexList::const_iterator itr = indexList.begin(); for (IndexList::const_iterator itr = indexList.begin();
itr != indexList.end(); ++itr) { itr != indexList.end(); ++itr) {
@ -277,7 +277,7 @@ void SlotIndex::print(raw_ostream &os) const {
os << "invalid"; os << "invalid";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
// Dump a SlotIndex to stderr. // Dump a SlotIndex to stderr.
LLVM_DUMP_METHOD void SlotIndex::dump() const { LLVM_DUMP_METHOD void SlotIndex::dump() const {
print(dbgs()); print(dbgs());

View File

@ -392,7 +392,7 @@ void SplitEditor::reset(LiveRangeEdit &LRE, ComplementSpillMode SM) {
Edit->anyRematerializable(nullptr); Edit->anyRematerializable(nullptr);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void SplitEditor::dump() const { LLVM_DUMP_METHOD void SplitEditor::dump() const {
if (RegAssign.empty()) { if (RegAssign.empty()) {
dbgs() << " empty\n"; dbgs() << " empty\n";

View File

@ -533,7 +533,7 @@ void StackColoring::getAnalysisUsage(AnalysisUsage &AU) const {
MachineFunctionPass::getAnalysisUsage(AU); MachineFunctionPass::getAnalysisUsage(AU);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void StackColoring::dumpBV(const char *tag, LLVM_DUMP_METHOD void StackColoring::dumpBV(const char *tag,
const BitVector &BV) const { const BitVector &BV) const {
dbgs() << tag << " : { "; dbgs() << tag << " : { ";

View File

@ -424,7 +424,7 @@ bool TargetRegisterInfo::regmaskSubsetEqual(const uint32_t *mask0,
return true; return true;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
void TargetRegisterInfo::dumpReg(unsigned Reg, unsigned SubRegIndex, void TargetRegisterInfo::dumpReg(unsigned Reg, unsigned SubRegIndex,
const TargetRegisterInfo *TRI) { const TargetRegisterInfo *TRI) {

View File

@ -156,7 +156,7 @@ void VirtRegMap::print(raw_ostream &OS, const Module*) const {
OS << '\n'; OS << '\n';
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void VirtRegMap::dump() const { LLVM_DUMP_METHOD void VirtRegMap::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -3623,7 +3623,7 @@ void Metadata::print(raw_ostream &OS, ModuleSlotTracker &MST,
printMetadataImpl(OS, *this, MST, M, /* OnlyAsOperand */ false); printMetadataImpl(OS, *this, MST, M, /* OnlyAsOperand */ false);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
// Value::dump - allow easy printing of Values from the debugger. // Value::dump - allow easy printing of Values from the debugger.
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
void Value::dump() const { print(dbgs(), /*IsForDebug=*/true); dbgs() << '\n'; } void Value::dump() const { print(dbgs(), /*IsForDebug=*/true); dbgs() << '\n'; }

View File

@ -619,7 +619,7 @@ AttributeSet::iterator AttributeSet::end() const {
return SetNode ? SetNode->end() : nullptr; return SetNode ? SetNode->end() : nullptr;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void AttributeSet::dump() const { LLVM_DUMP_METHOD void AttributeSet::dump() const {
dbgs() << "AS =\n"; dbgs() << "AS =\n";
dbgs() << " { "; dbgs() << " { ";
@ -828,7 +828,7 @@ void AttributeListImpl::Profile(FoldingSetNodeID &ID,
ID.AddPointer(Set.SetNode); ID.AddPointer(Set.SetNode);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void AttributeListImpl::dump() const { LLVM_DUMP_METHOD void AttributeListImpl::dump() const {
AttributeList(const_cast<AttributeListImpl *>(this)).dump(); AttributeList(const_cast<AttributeListImpl *>(this)).dump();
} }
@ -1288,7 +1288,7 @@ unsigned AttributeList::getNumAttrSets() const {
return pImpl ? pImpl->NumAttrSets : 0; return pImpl ? pImpl->NumAttrSets : 0;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void AttributeList::dump() const { LLVM_DUMP_METHOD void AttributeList::dump() const {
dbgs() << "PAL[\n"; dbgs() << "PAL[\n";

View File

@ -939,7 +939,7 @@ void ConstantRange::print(raw_ostream &OS) const {
OS << "[" << Lower << "," << Upper << ")"; OS << "[" << Lower << "," << Upper << ")";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ConstantRange::dump() const { LLVM_DUMP_METHOD void ConstantRange::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -358,7 +358,7 @@ LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty) {
return wrap(&unwrap(Ty)->getContext()); return wrap(&unwrap(Ty)->getContext());
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LLVMDumpType(LLVMTypeRef Ty) { LLVM_DUMP_METHOD void LLVMDumpType(LLVMTypeRef Ty) {
return unwrap(Ty)->dump(); return unwrap(Ty)->dump();
} }

View File

@ -99,7 +99,7 @@ DebugLoc DebugLoc::appendInlinedAt(DebugLoc DL, DILocation *InlinedAt,
return Last; return Last;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void DebugLoc::dump() const { LLVM_DUMP_METHOD void DebugLoc::dump() const {
if (!Loc) if (!Loc)
return; return;

View File

@ -108,7 +108,7 @@ void GCOVFile::print(raw_ostream &OS) const {
FPtr->print(OS); FPtr->print(OS);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// dump - Dump GCOVFile content to dbgs() for debugging purposes. /// dump - Dump GCOVFile content to dbgs() for debugging purposes.
LLVM_DUMP_METHOD void GCOVFile::dump() const { LLVM_DUMP_METHOD void GCOVFile::dump() const {
print(dbgs()); print(dbgs());
@ -356,7 +356,7 @@ void GCOVFunction::print(raw_ostream &OS) const {
Block->print(OS); Block->print(OS);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// dump - Dump GCOVFunction content to dbgs() for debugging purposes. /// dump - Dump GCOVFunction content to dbgs() for debugging purposes.
LLVM_DUMP_METHOD void GCOVFunction::dump() const { LLVM_DUMP_METHOD void GCOVFunction::dump() const {
print(dbgs()); print(dbgs());
@ -434,7 +434,7 @@ void GCOVBlock::print(raw_ostream &OS) const {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// dump - Dump GCOVBlock content to dbgs() for debugging purposes. /// dump - Dump GCOVBlock content to dbgs() for debugging purposes.
LLVM_DUMP_METHOD void GCOVBlock::dump() const { LLVM_DUMP_METHOD void GCOVBlock::dump() const {
print(dbgs()); print(dbgs());

View File

@ -124,7 +124,7 @@ void Pass::print(raw_ostream &OS, const Module *) const {
OS << "Pass::print not implemented for pass: '" << getPassName() << "'!\n"; OS << "Pass::print not implemented for pass: '" << getPassName() << "'!\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
// dump - call print(cerr); // dump - call print(cerr);
LLVM_DUMP_METHOD void Pass::dump() const { LLVM_DUMP_METHOD void Pass::dump() const {
print(dbgs(), nullptr); print(dbgs(), nullptr);

View File

@ -100,7 +100,7 @@ ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) {
return makeUniqueName(V, UniqueName); return makeUniqueName(V, UniqueName);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
// dump - print out the symbol table // dump - print out the symbol table
// //
LLVM_DUMP_METHOD void ValueSymbolTable::dump() const { LLVM_DUMP_METHOD void ValueSymbolTable::dump() const {

View File

@ -136,7 +136,7 @@ void MCExpr::print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens) const {
llvm_unreachable("Invalid expression kind!"); llvm_unreachable("Invalid expression kind!");
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MCExpr::dump() const { LLVM_DUMP_METHOD void MCExpr::dump() const {
dbgs() << *this; dbgs() << *this;
dbgs() << '\n'; dbgs() << '\n';

View File

@ -306,7 +306,7 @@ raw_ostream &operator<<(raw_ostream &OS, const MCFixup &AF) {
} // end namespace llvm } // end namespace llvm
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MCFragment::dump() const { LLVM_DUMP_METHOD void MCFragment::dump() const {
raw_ostream &OS = errs(); raw_ostream &OS = errs();

View File

@ -35,7 +35,7 @@ void MCOperand::print(raw_ostream &OS) const {
OS << ">"; OS << ">";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MCOperand::dump() const { LLVM_DUMP_METHOD void MCOperand::dump() const {
print(dbgs()); print(dbgs());
dbgs() << "\n"; dbgs() << "\n";
@ -66,7 +66,7 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer,
OS << ">"; OS << ">";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MCInst::dump() const { LLVM_DUMP_METHOD void MCInst::dump() const {
print(dbgs()); print(dbgs());
dbgs() << "\n"; dbgs() << "\n";

View File

@ -18,7 +18,7 @@ void MCLabel::print(raw_ostream &OS) const {
OS << '"' << getInstance() << '"'; OS << '"' << getInstance() << '"';
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MCLabel::dump() const { LLVM_DUMP_METHOD void MCLabel::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -131,7 +131,7 @@ bool MCAsmParser::parseExpression(const MCExpr *&Res) {
void MCParsedAsmOperand::dump() const { void MCParsedAsmOperand::dump() const {
// Cannot completely remove virtual function even in release mode. // Cannot completely remove virtual function even in release mode.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
dbgs() << " " << *this; dbgs() << " " << *this;
#endif #endif
} }

View File

@ -85,7 +85,7 @@ MCSection::getSubsectionInsertionPoint(unsigned Subsection) {
return IP; return IP;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MCSection::dump() const { LLVM_DUMP_METHOD void MCSection::dump() const {
raw_ostream &OS = errs(); raw_ostream &OS = errs();

View File

@ -81,7 +81,7 @@ void MCSymbol::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
OS << '"'; OS << '"';
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MCSymbol::dump() const { LLVM_DUMP_METHOD void MCSymbol::dump() const {
dbgs() << *this; dbgs() << *this;
} }

View File

@ -37,7 +37,7 @@ void MCValue::print(raw_ostream &OS) const {
OS << " + " << getConstant(); OS << " + " << getConstant();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MCValue::dump() const { LLVM_DUMP_METHOD void MCValue::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -256,7 +256,7 @@ void SubtargetFeatures::print(raw_ostream &OS) const {
OS << "\n"; OS << "\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void SubtargetFeatures::dump() const { LLVM_DUMP_METHOD void SubtargetFeatures::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -170,7 +170,7 @@ struct WasmRelocationEntry {
<< ", FixupSection=" << FixupSection->getSectionName(); << ", FixupSection=" << FixupSection->getSectionName();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void dump() const { print(dbgs()); } LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
#endif #endif
}; };

View File

@ -61,7 +61,7 @@ void Arg::print(raw_ostream& O) const {
O << "]>\n"; O << "]>\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void Arg::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void Arg::dump() const { print(dbgs()); }
#endif #endif

View File

@ -204,7 +204,7 @@ void ArgList::print(raw_ostream &O) const {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); }
#endif #endif

View File

@ -86,7 +86,7 @@ void Option::print(raw_ostream &O) const {
O << ">\n"; O << ">\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void Option::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void Option::dump() const { print(dbgs()); }
#endif #endif

View File

@ -82,7 +82,7 @@ raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS,
return OS; return OS;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void LineLocation::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void LineLocation::dump() const { print(dbgs()); }
#endif #endif
@ -97,7 +97,7 @@ void SampleRecord::print(raw_ostream &OS, unsigned Indent) const {
OS << "\n"; OS << "\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void SampleRecord::dump() const { print(dbgs(), 0); } LLVM_DUMP_METHOD void SampleRecord::dump() const { print(dbgs(), 0); }
#endif #endif
@ -150,6 +150,6 @@ raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS,
return OS; return OS;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void FunctionSamples::dump() const { print(dbgs(), 0); } LLVM_DUMP_METHOD void FunctionSamples::dump() const { print(dbgs(), 0); }
#endif #endif

View File

@ -4486,7 +4486,7 @@ void APFloat::print(raw_ostream &OS) const {
OS << Buffer << "\n"; OS << Buffer << "\n";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void APFloat::dump() const { print(dbgs()); } LLVM_DUMP_METHOD void APFloat::dump() const { print(dbgs()); }
#endif #endif

View File

@ -2120,7 +2120,7 @@ std::string APInt::toString(unsigned Radix = 10, bool Signed = true) const {
return S.str(); return S.str();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void APInt::dump() const { LLVM_DUMP_METHOD void APInt::dump() const {
SmallString<40> S, U; SmallString<40> S, U;
this->toStringUnsigned(U); this->toStringUnsigned(U);

View File

@ -32,7 +32,7 @@ raw_ostream &BranchProbability::print(raw_ostream &OS) const {
Percent); Percent);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; } LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; }
#endif #endif

View File

@ -173,7 +173,7 @@ void Twine::printRepr(raw_ostream &OS) const {
OS << ")"; OS << ")";
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void Twine::dump() const { LLVM_DUMP_METHOD void Twine::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -48,7 +48,7 @@ IntRecTy IntRecTy::Shared;
StringRecTy StringRecTy::Shared; StringRecTy StringRecTy::Shared;
DagRecTy DagRecTy::Shared; DagRecTy DagRecTy::Shared;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RecTy::dump() const { print(errs()); } LLVM_DUMP_METHOD void RecTy::dump() const { print(errs()); }
#endif #endif
@ -172,7 +172,7 @@ RecTy *llvm::resolveTypes(RecTy *T1, RecTy *T2) {
void Init::anchor() {} void Init::anchor() {}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void Init::dump() const { return print(errs()); } LLVM_DUMP_METHOD void Init::dump() const { return print(errs()); }
#endif #endif
@ -1581,7 +1581,7 @@ StringRef RecordVal::getName() const {
return cast<StringInit>(getNameInit())->getValue(); return cast<StringInit>(getNameInit())->getValue();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void RecordVal::dump() const { errs() << *this; } LLVM_DUMP_METHOD void RecordVal::dump() const { errs() << *this; }
#endif #endif
@ -1660,7 +1660,7 @@ void Record::resolveReferencesTo(const RecordVal *RV) {
} }
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void Record::dump() const { errs() << *this; } LLVM_DUMP_METHOD void Record::dump() const { errs() << *this; }
#endif #endif
@ -1854,7 +1854,7 @@ DagInit *Record::getValueAsDag(StringRef FieldName) const {
FieldName + "' does not have a dag initializer!"); FieldName + "' does not have a dag initializer!");
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void MultiClass::dump() const { LLVM_DUMP_METHOD void MultiClass::dump() const {
errs() << "Record:\n"; errs() << "Record:\n";
Rec.dump(); Rec.dump();

View File

@ -54,7 +54,7 @@ struct SubMultiClassReference {
void dump() const; void dump() const;
}; };
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void SubMultiClassReference::dump() const { LLVM_DUMP_METHOD void SubMultiClassReference::dump() const {
errs() << "Multiclass:\n"; errs() << "Multiclass:\n";

View File

@ -261,7 +261,7 @@ unsigned PHILinearize::getNumSources(unsigned DestReg) {
return phiInfoElementGetSources(findPHIInfoElement(DestReg)).size(); return phiInfoElementGetSources(findPHIInfoElement(DestReg)).size();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void PHILinearize::dump(MachineRegisterInfo *MRI) { LLVM_DUMP_METHOD void PHILinearize::dump(MachineRegisterInfo *MRI) {
const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo(); const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo();
dbgs() << "=PHIInfo Start=\n"; dbgs() << "=PHIInfo Start=\n";

View File

@ -52,7 +52,7 @@ static inline MachineInstr *getMachineInstr(const SUnit &SU) {
return SU.getInstr(); return SU.getInstr();
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
static void printRegion(raw_ostream &OS, static void printRegion(raw_ostream &OS,
MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator Begin,

View File

@ -31,7 +31,7 @@ using namespace llvm;
#define DEBUG_TYPE "machine-scheduler" #define DEBUG_TYPE "machine-scheduler"
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
void llvm::printLivesAt(SlotIndex SI, void llvm::printLivesAt(SlotIndex SI,
const LiveIntervals &LIS, const LiveIntervals &LIS,
@ -175,7 +175,7 @@ bool GCNRegPressure::less(const SISubtarget &ST,
(getVGPRNum() < O.getVGPRNum()); (getVGPRNum() < O.getVGPRNum());
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
void GCNRegPressure::print(raw_ostream &OS, const SISubtarget *ST) const { void GCNRegPressure::print(raw_ostream &OS, const SISubtarget *ST) const {
OS << "VGPRs: " << getVGPRNum(); OS << "VGPRs: " << getVGPRNum();
@ -433,7 +433,7 @@ bool GCNDownwardRPTracker::advance(MachineBasicBlock::const_iterator Begin,
return advance(End); return advance(End);
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD LLVM_DUMP_METHOD
static void reportMismatch(const GCNRPTracker::LiveRegSet &LISLR, static void reportMismatch(const GCNRPTracker::LiveRegSet &LISLR,
const GCNRPTracker::LiveRegSet &TrackedLR, const GCNRPTracker::LiveRegSet &TrackedLR,

View File

@ -320,7 +320,7 @@ void ARMConstantIslands::verify() {
#endif #endif
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
/// print block size and offset information - debugging /// print block size and offset information - debugging
LLVM_DUMP_METHOD void ARMConstantIslands::dumpBBs() { LLVM_DUMP_METHOD void ARMConstantIslands::dumpBBs() {
DEBUG({ DEBUG({

View File

@ -97,7 +97,7 @@ ARMConstantPoolValue::hasSameValue(ARMConstantPoolValue *ACPV) {
return false; return false;
} }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ARMConstantPoolValue::dump() const { LLVM_DUMP_METHOD void ARMConstantPoolValue::dump() const {
errs() << " " << *this; errs() << " " << *this;
} }

Some files were not shown because too many files have changed in this diff Show More