forked from OSchip/llvm-project
Release build: guard dump functions with "ifndef NDEBUG"
No functional change. llvm-svn: 163344
This commit is contained in:
parent
84ecc3481b
commit
c3366ccecb
|
@ -590,8 +590,10 @@ void AliasSetTracker::print(raw_ostream &OS) const {
|
||||||
OS << "\n";
|
OS << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void AliasSet::dump() const { print(dbgs()); }
|
void AliasSet::dump() const { print(dbgs()); }
|
||||||
void AliasSetTracker::dump() const { print(dbgs()); }
|
void AliasSetTracker::dump() const { print(dbgs()); }
|
||||||
|
#endif
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// ASTCallbackVH Class Implementation
|
// ASTCallbackVH Class Implementation
|
||||||
|
|
|
@ -133,7 +133,9 @@ void DominanceFrontierBase::print(raw_ostream &OS, const Module* ) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void DominanceFrontierBase::dump() const {
|
void DominanceFrontierBase::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -198,9 +198,11 @@ void CallGraph::print(raw_ostream &OS, Module*) const {
|
||||||
for (CallGraph::const_iterator I = begin(), E = end(); I != E; ++I)
|
for (CallGraph::const_iterator I = begin(), E = end(); I != E; ++I)
|
||||||
I->second->print(OS);
|
I->second->print(OS);
|
||||||
}
|
}
|
||||||
|
#ifndef NDEBUG
|
||||||
void CallGraph::dump() const {
|
void CallGraph::dump() const {
|
||||||
print(dbgs(), 0);
|
print(dbgs(), 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Implementations of public modification methods
|
// Implementations of public modification methods
|
||||||
|
@ -267,7 +269,9 @@ void CallGraphNode::print(raw_ostream &OS) const {
|
||||||
OS << '\n';
|
OS << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void CallGraphNode::dump() const { print(dbgs()); }
|
void CallGraphNode::dump() const { print(dbgs()); }
|
||||||
|
#endif
|
||||||
|
|
||||||
/// removeCallEdgeFor - This method removes the edge in the node for the
|
/// removeCallEdgeFor - This method removes the edge in the node for the
|
||||||
/// specified call site. Note that this method takes linear time, so it
|
/// specified call site. Note that this method takes linear time, so it
|
||||||
|
|
|
@ -273,9 +273,11 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void IVUsers::dump() const {
|
void IVUsers::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void IVUsers::releaseMemory() {
|
void IVUsers::releaseMemory() {
|
||||||
Processed.clear();
|
Processed.clear();
|
||||||
|
|
|
@ -974,6 +974,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {
|
||||||
return AlwaysInline || Cost < Threshold;
|
return AlwaysInline || Cost < Threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
/// \brief Dump stats about this call's analysis.
|
/// \brief Dump stats about this call's analysis.
|
||||||
void CallAnalyzer::dump() {
|
void CallAnalyzer::dump() {
|
||||||
#define DEBUG_PRINT_STAT(x) llvm::dbgs() << " " #x ": " << x << "\n"
|
#define DEBUG_PRINT_STAT(x) llvm::dbgs() << " " #x ": " << x << "\n"
|
||||||
|
@ -987,6 +988,7 @@ void CallAnalyzer::dump() {
|
||||||
DEBUG_PRINT_STAT(SROACostSavingsLost);
|
DEBUG_PRINT_STAT(SROACostSavingsLost);
|
||||||
#undef DEBUG_PRINT_STAT
|
#undef DEBUG_PRINT_STAT
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, int Threshold) {
|
InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, int Threshold) {
|
||||||
return getInlineCost(CS, CS.getCalledFunction(), Threshold);
|
return getInlineCost(CS, CS.getCalledFunction(), Threshold);
|
||||||
|
|
|
@ -306,9 +306,11 @@ BasicBlock *Loop::getUniqueExitBlock() const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void Loop::dump() const {
|
void Loop::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// UnloopUpdater implementation
|
// UnloopUpdater implementation
|
||||||
|
|
|
@ -41,6 +41,7 @@ static bool CanPHITrans(Instruction *Inst) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void PHITransAddr::dump() const {
|
void PHITransAddr::dump() const {
|
||||||
if (Addr == 0) {
|
if (Addr == 0) {
|
||||||
dbgs() << "PHITransAddr: null\n";
|
dbgs() << "PHITransAddr: null\n";
|
||||||
|
@ -50,6 +51,7 @@ void PHITransAddr::dump() const {
|
||||||
for (unsigned i = 0, e = InstInputs.size(); i != e; ++i)
|
for (unsigned i = 0, e = InstInputs.size(); i != e; ++i)
|
||||||
dbgs() << " Input #" << i << " is " << *InstInputs[i] << "\n";
|
dbgs() << " Input #" << i << " is " << *InstInputs[i] << "\n";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static bool VerifySubExpr(Value *Expr,
|
static bool VerifySubExpr(Value *Expr,
|
||||||
|
|
|
@ -427,9 +427,11 @@ void Region::print(raw_ostream &OS, bool print_tree, unsigned level,
|
||||||
OS.indent(level*2) << "} \n";
|
OS.indent(level*2) << "} \n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void Region::dump() const {
|
void Region::dump() const {
|
||||||
print(dbgs(), true, getDepth(), printStyle.getValue());
|
print(dbgs(), true, getDepth(), printStyle.getValue());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void Region::clearNodeCache() {
|
void Region::clearNodeCache() {
|
||||||
// Free the cached nodes.
|
// Free the cached nodes.
|
||||||
|
|
|
@ -122,10 +122,12 @@ char ScalarEvolution::ID = 0;
|
||||||
// Implementation of the SCEV class.
|
// Implementation of the SCEV class.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void SCEV::dump() const {
|
void SCEV::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
dbgs() << '\n';
|
dbgs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void SCEV::print(raw_ostream &OS) const {
|
void SCEV::print(raw_ostream &OS) const {
|
||||||
switch (getSCEVType()) {
|
switch (getSCEVType()) {
|
||||||
|
|
|
@ -43,9 +43,11 @@ void Trace::print(raw_ostream &O) const {
|
||||||
O << "; Trace parent function: \n" << *F;
|
O << "; Trace parent function: \n" << *F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
/// dump - Debugger convenience method; writes trace to standard error
|
/// dump - Debugger convenience method; writes trace to standard error
|
||||||
/// output stream.
|
/// output stream.
|
||||||
///
|
///
|
||||||
void Trace::dump() const {
|
void Trace::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -830,6 +830,7 @@ raw_ostream &operator<<(raw_ostream &OS, const MCFixup &AF) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void MCFragment::dump() {
|
void MCFragment::dump() {
|
||||||
raw_ostream &OS = llvm::errs();
|
raw_ostream &OS = llvm::errs();
|
||||||
|
|
||||||
|
@ -970,6 +971,7 @@ void MCAssembler::dump() {
|
||||||
}
|
}
|
||||||
OS << "]>\n";
|
OS << "]>\n";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// anchors for MC*Fragment vtables
|
// anchors for MC*Fragment vtables
|
||||||
void MCDataFragment::anchor() { }
|
void MCDataFragment::anchor() { }
|
||||||
|
|
|
@ -425,9 +425,11 @@ void MCDwarfFile::print(raw_ostream &OS) const {
|
||||||
OS << '"' << getName() << '"';
|
OS << '"' << getName() << '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void MCDwarfFile::dump() const {
|
void MCDwarfFile::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Utility function to write a tuple for .debug_abbrev.
|
// Utility function to write a tuple for .debug_abbrev.
|
||||||
static void EmitAbbrev(MCStreamer *MCOS, uint64_t Name, uint64_t Form) {
|
static void EmitAbbrev(MCStreamer *MCOS, uint64_t Name, uint64_t Form) {
|
||||||
|
|
|
@ -136,10 +136,12 @@ void MCExpr::print(raw_ostream &OS) const {
|
||||||
llvm_unreachable("Invalid expression kind!");
|
llvm_unreachable("Invalid expression kind!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void MCExpr::dump() const {
|
void MCExpr::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
dbgs() << '\n';
|
dbgs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* *** */
|
/* *** */
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,12 @@ void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
|
||||||
OS << ">";
|
OS << ">";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void MCOperand::dump() const {
|
void MCOperand::dump() const {
|
||||||
print(dbgs(), 0);
|
print(dbgs(), 0);
|
||||||
dbgs() << "\n";
|
dbgs() << "\n";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
|
void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
|
||||||
OS << "<MCInst " << getOpcode();
|
OS << "<MCInst " << getOpcode();
|
||||||
|
@ -62,7 +64,9 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCAsmInfo *MAI,
|
||||||
OS << ">";
|
OS << ">";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void MCInst::dump() const {
|
void MCInst::dump() const {
|
||||||
print(dbgs(), 0);
|
print(dbgs(), 0);
|
||||||
dbgs() << "\n";
|
dbgs() << "\n";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -16,6 +16,8 @@ void MCLabel::print(raw_ostream &OS) const {
|
||||||
OS << '"' << getInstance() << '"';
|
OS << '"' << getInstance() << '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void MCLabel::dump() const {
|
void MCLabel::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -44,5 +44,7 @@ bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCParsedAsmOperand::dump() const {
|
void MCParsedAsmOperand::dump() const {
|
||||||
|
#ifndef NDEBUG
|
||||||
dbgs() << " " << *this;
|
dbgs() << " " << *this;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,8 @@ void MCSymbol::print(raw_ostream &OS) const {
|
||||||
OS << '"' << getName() << '"';
|
OS << '"' << getName() << '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void MCSymbol::dump() const {
|
void MCSymbol::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -31,6 +31,8 @@ void MCValue::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
|
||||||
OS << " + " << getConstant();
|
OS << " + " << getConstant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void MCValue::dump() const {
|
void MCValue::dump() const {
|
||||||
print(dbgs(), 0);
|
print(dbgs(), 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -368,11 +368,13 @@ void SubtargetFeatures::print(raw_ostream &OS) const {
|
||||||
OS << "\n";
|
OS << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
/// dump - Dump feature info.
|
/// dump - Dump feature info.
|
||||||
///
|
///
|
||||||
void SubtargetFeatures::dump() const {
|
void SubtargetFeatures::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/// getDefaultSubtargetFeatures - Return a string listing the features
|
/// getDefaultSubtargetFeatures - Return a string listing the features
|
||||||
/// associated with the target triple.
|
/// associated with the target triple.
|
||||||
|
|
|
@ -632,6 +632,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfo)
|
||||||
INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
|
INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
|
||||||
INITIALIZE_PASS_END(GVN, "gvn", "Global Value Numbering", false, false)
|
INITIALIZE_PASS_END(GVN, "gvn", "Global Value Numbering", false, false)
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void GVN::dump(DenseMap<uint32_t, Value*>& d) {
|
void GVN::dump(DenseMap<uint32_t, Value*>& d) {
|
||||||
errs() << "{\n";
|
errs() << "{\n";
|
||||||
for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),
|
for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),
|
||||||
|
@ -641,6 +642,7 @@ void GVN::dump(DenseMap<uint32_t, Value*>& d) {
|
||||||
}
|
}
|
||||||
errs() << "}\n";
|
errs() << "}\n";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/// IsValueFullyAvailableInBlock - Return true if we can prove that the value
|
/// IsValueFullyAvailableInBlock - Return true if we can prove that the value
|
||||||
/// we're analyzing is fully available in the specified block. As we go, keep
|
/// we're analyzing is fully available in the specified block. As we go, keep
|
||||||
|
|
|
@ -121,9 +121,11 @@ void RegSortData::print(raw_ostream &OS) const {
|
||||||
OS << "[NumUses=" << UsedByIndices.count() << ']';
|
OS << "[NumUses=" << UsedByIndices.count() << ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void RegSortData::dump() const {
|
void RegSortData::dump() const {
|
||||||
print(errs()); errs() << '\n';
|
print(errs()); errs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -414,9 +416,11 @@ void Formula::print(raw_ostream &OS) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void Formula::dump() const {
|
void Formula::dump() const {
|
||||||
print(errs()); errs() << '\n';
|
print(errs()); errs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/// isAddRecSExtable - Return true if the given addrec can be sign-extended
|
/// isAddRecSExtable - Return true if the given addrec can be sign-extended
|
||||||
/// without changing its value.
|
/// without changing its value.
|
||||||
|
@ -974,9 +978,11 @@ void Cost::print(raw_ostream &OS) const {
|
||||||
OS << ", plus " << SetupCost << " setup cost";
|
OS << ", plus " << SetupCost << " setup cost";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void Cost::dump() const {
|
void Cost::dump() const {
|
||||||
print(errs()); errs() << '\n';
|
print(errs()); errs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -1060,9 +1066,11 @@ void LSRFixup::print(raw_ostream &OS) const {
|
||||||
OS << ", Offset=" << Offset;
|
OS << ", Offset=" << Offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void LSRFixup::dump() const {
|
void LSRFixup::dump() const {
|
||||||
print(errs()); errs() << '\n';
|
print(errs()); errs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -1252,9 +1260,11 @@ void LSRUse::print(raw_ostream &OS) const {
|
||||||
OS << ", widest fixup type: " << *WidestFixupType;
|
OS << ", widest fixup type: " << *WidestFixupType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void LSRUse::dump() const {
|
void LSRUse::dump() const {
|
||||||
print(errs()); errs() << '\n';
|
print(errs()); errs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/// isLegalUse - Test whether the use described by AM is "legal", meaning it can
|
/// isLegalUse - Test whether the use described by AM is "legal", meaning it can
|
||||||
/// be completely folded into the user instruction at isel time. This includes
|
/// be completely folded into the user instruction at isel time. This includes
|
||||||
|
@ -3436,9 +3446,11 @@ void WorkItem::print(raw_ostream &OS) const {
|
||||||
<< " , add offset " << Imm;
|
<< " , add offset " << Imm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void WorkItem::dump() const {
|
void WorkItem::dump() const {
|
||||||
print(errs()); errs() << '\n';
|
print(errs()); errs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/// GenerateCrossUseConstantOffsets - Look for registers which are a constant
|
/// GenerateCrossUseConstantOffsets - Look for registers which are a constant
|
||||||
/// distance apart and try to form reuse opportunities between them.
|
/// distance apart and try to form reuse opportunities between them.
|
||||||
|
@ -4731,9 +4743,11 @@ void LSRInstance::print(raw_ostream &OS) const {
|
||||||
print_uses(OS);
|
print_uses(OS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void LSRInstance::dump() const {
|
void LSRInstance::dump() const {
|
||||||
print(errs()); errs() << '\n';
|
print(errs()); errs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -55,10 +55,12 @@ void ExtAddrMode::print(raw_ostream &OS) const {
|
||||||
OS << ']';
|
OS << ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
void ExtAddrMode::dump() const {
|
void ExtAddrMode::dump() const {
|
||||||
print(dbgs());
|
print(dbgs());
|
||||||
dbgs() << '\n';
|
dbgs() << '\n';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/// MatchScaledValue - Try adding ScaleReg*Scale to the current addressing mode.
|
/// MatchScaledValue - Try adding ScaleReg*Scale to the current addressing mode.
|
||||||
|
|
Loading…
Reference in New Issue