Release build: guard dump functions with "ifndef NDEBUG"

No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren 2012-09-06 19:55:56 +00:00
parent c8ecb401ca
commit cc77eece74
22 changed files with 60 additions and 0 deletions

View File

@ -590,8 +590,10 @@ void AliasSetTracker::print(raw_ostream &OS) const {
OS << "\n";
}
#ifndef NDEBUG
void AliasSet::dump() const { print(dbgs()); }
void AliasSetTracker::dump() const { print(dbgs()); }
#endif
//===----------------------------------------------------------------------===//
// ASTCallbackVH Class Implementation

View File

@ -133,7 +133,9 @@ void DominanceFrontierBase::print(raw_ostream &OS, const Module* ) const {
}
}
#ifndef NDEBUG
void DominanceFrontierBase::dump() const {
print(dbgs());
}
#endif

View File

@ -198,9 +198,11 @@ void CallGraph::print(raw_ostream &OS, Module*) const {
for (CallGraph::const_iterator I = begin(), E = end(); I != E; ++I)
I->second->print(OS);
}
#ifndef NDEBUG
void CallGraph::dump() const {
print(dbgs(), 0);
}
#endif
//===----------------------------------------------------------------------===//
// Implementations of public modification methods
@ -267,7 +269,9 @@ void CallGraphNode::print(raw_ostream &OS) const {
OS << '\n';
}
#ifndef NDEBUG
void CallGraphNode::dump() const { print(dbgs()); }
#endif
/// removeCallEdgeFor - This method removes the edge in the node for the
/// specified call site. Note that this method takes linear time, so it

View File

@ -273,9 +273,11 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
}
}
#ifndef NDEBUG
void IVUsers::dump() const {
print(dbgs());
}
#endif
void IVUsers::releaseMemory() {
Processed.clear();

View File

@ -974,6 +974,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {
return AlwaysInline || Cost < Threshold;
}
#ifndef NDEBUG
/// \brief Dump stats about this call's analysis.
void CallAnalyzer::dump() {
#define DEBUG_PRINT_STAT(x) llvm::dbgs() << " " #x ": " << x << "\n"
@ -987,6 +988,7 @@ void CallAnalyzer::dump() {
DEBUG_PRINT_STAT(SROACostSavingsLost);
#undef DEBUG_PRINT_STAT
}
#endif
InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, int Threshold) {
return getInlineCost(CS, CS.getCalledFunction(), Threshold);

View File

@ -306,9 +306,11 @@ BasicBlock *Loop::getUniqueExitBlock() const {
return 0;
}
#ifndef NDEBUG
void Loop::dump() const {
print(dbgs());
}
#endif
//===----------------------------------------------------------------------===//
// UnloopUpdater implementation

View File

@ -41,6 +41,7 @@ static bool CanPHITrans(Instruction *Inst) {
return false;
}
#ifndef NDEBUG
void PHITransAddr::dump() const {
if (Addr == 0) {
dbgs() << "PHITransAddr: null\n";
@ -50,6 +51,7 @@ void PHITransAddr::dump() const {
for (unsigned i = 0, e = InstInputs.size(); i != e; ++i)
dbgs() << " Input #" << i << " is " << *InstInputs[i] << "\n";
}
#endif
static bool VerifySubExpr(Value *Expr,

View File

@ -427,9 +427,11 @@ void Region::print(raw_ostream &OS, bool print_tree, unsigned level,
OS.indent(level*2) << "} \n";
}
#ifndef NDEBUG
void Region::dump() const {
print(dbgs(), true, getDepth(), printStyle.getValue());
}
#endif
void Region::clearNodeCache() {
// Free the cached nodes.

View File

@ -122,10 +122,12 @@ char ScalarEvolution::ID = 0;
// Implementation of the SCEV class.
//
#ifndef NDEBUG
void SCEV::dump() const {
print(dbgs());
dbgs() << '\n';
}
#endif
void SCEV::print(raw_ostream &OS) const {
switch (getSCEVType()) {

View File

@ -43,9 +43,11 @@ void Trace::print(raw_ostream &O) const {
O << "; Trace parent function: \n" << *F;
}
#ifndef NDEBUG
/// dump - Debugger convenience method; writes trace to standard error
/// output stream.
///
void Trace::dump() const {
print(dbgs());
}
#endif

View File

@ -830,6 +830,7 @@ raw_ostream &operator<<(raw_ostream &OS, const MCFixup &AF) {
}
#ifndef NDEBUG
void MCFragment::dump() {
raw_ostream &OS = llvm::errs();
@ -970,6 +971,7 @@ void MCAssembler::dump() {
}
OS << "]>\n";
}
#endif
// anchors for MC*Fragment vtables
void MCDataFragment::anchor() { }

View File

@ -425,9 +425,11 @@ void MCDwarfFile::print(raw_ostream &OS) const {
OS << '"' << getName() << '"';
}
#ifndef NDEBUG
void MCDwarfFile::dump() const {
print(dbgs());
}
#endif
// Utility function to write a tuple for .debug_abbrev.
static void EmitAbbrev(MCStreamer *MCOS, uint64_t Name, uint64_t Form) {

View File

@ -136,10 +136,12 @@ void MCExpr::print(raw_ostream &OS) const {
llvm_unreachable("Invalid expression kind!");
}
#ifndef NDEBUG
void MCExpr::dump() const {
print(dbgs());
dbgs() << '\n';
}
#endif
/* *** */

View File

@ -32,10 +32,12 @@ void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
OS << ">";
}
#ifndef NDEBUG
void MCOperand::dump() const {
print(dbgs(), 0);
dbgs() << "\n";
}
#endif
void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
OS << "<MCInst " << getOpcode();
@ -62,7 +64,9 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCAsmInfo *MAI,
OS << ">";
}
#ifndef NDEBUG
void MCInst::dump() const {
print(dbgs(), 0);
dbgs() << "\n";
}
#endif

View File

@ -16,6 +16,8 @@ void MCLabel::print(raw_ostream &OS) const {
OS << '"' << getInstance() << '"';
}
#ifndef NDEBUG
void MCLabel::dump() const {
print(dbgs());
}
#endif

View File

@ -44,5 +44,7 @@ bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
}
void MCParsedAsmOperand::dump() const {
#ifndef NDEBUG
dbgs() << " " << *this;
#endif
}

View File

@ -76,6 +76,8 @@ void MCSymbol::print(raw_ostream &OS) const {
OS << '"' << getName() << '"';
}
#ifndef NDEBUG
void MCSymbol::dump() const {
print(dbgs());
}
#endif

View File

@ -31,6 +31,8 @@ void MCValue::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
OS << " + " << getConstant();
}
#ifndef NDEBUG
void MCValue::dump() const {
print(dbgs(), 0);
}
#endif

View File

@ -368,11 +368,13 @@ void SubtargetFeatures::print(raw_ostream &OS) const {
OS << "\n";
}
#ifndef NDEBUG
/// dump - Dump feature info.
///
void SubtargetFeatures::dump() const {
print(dbgs());
}
#endif
/// getDefaultSubtargetFeatures - Return a string listing the features
/// associated with the target triple.

View File

@ -632,6 +632,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfo)
INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
INITIALIZE_PASS_END(GVN, "gvn", "Global Value Numbering", false, false)
#ifndef NDEBUG
void GVN::dump(DenseMap<uint32_t, Value*>& d) {
errs() << "{\n";
for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),
@ -641,6 +642,7 @@ void GVN::dump(DenseMap<uint32_t, Value*>& d) {
}
errs() << "}\n";
}
#endif
/// IsValueFullyAvailableInBlock - Return true if we can prove that the value
/// we're analyzing is fully available in the specified block. As we go, keep

View File

@ -121,9 +121,11 @@ void RegSortData::print(raw_ostream &OS) const {
OS << "[NumUses=" << UsedByIndices.count() << ']';
}
#ifndef NDEBUG
void RegSortData::dump() const {
print(errs()); errs() << '\n';
}
#endif
namespace {
@ -414,9 +416,11 @@ void Formula::print(raw_ostream &OS) const {
}
}
#ifndef NDEBUG
void Formula::dump() const {
print(errs()); errs() << '\n';
}
#endif
/// isAddRecSExtable - Return true if the given addrec can be sign-extended
/// without changing its value.
@ -974,9 +978,11 @@ void Cost::print(raw_ostream &OS) const {
OS << ", plus " << SetupCost << " setup cost";
}
#ifndef NDEBUG
void Cost::dump() const {
print(errs()); errs() << '\n';
}
#endif
namespace {
@ -1060,9 +1066,11 @@ void LSRFixup::print(raw_ostream &OS) const {
OS << ", Offset=" << Offset;
}
#ifndef NDEBUG
void LSRFixup::dump() const {
print(errs()); errs() << '\n';
}
#endif
namespace {
@ -1252,9 +1260,11 @@ void LSRUse::print(raw_ostream &OS) const {
OS << ", widest fixup type: " << *WidestFixupType;
}
#ifndef NDEBUG
void LSRUse::dump() const {
print(errs()); errs() << '\n';
}
#endif
/// 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
@ -3436,9 +3446,11 @@ void WorkItem::print(raw_ostream &OS) const {
<< " , add offset " << Imm;
}
#ifndef NDEBUG
void WorkItem::dump() const {
print(errs()); errs() << '\n';
}
#endif
/// GenerateCrossUseConstantOffsets - Look for registers which are a constant
/// distance apart and try to form reuse opportunities between them.
@ -4731,9 +4743,11 @@ void LSRInstance::print(raw_ostream &OS) const {
print_uses(OS);
}
#ifndef NDEBUG
void LSRInstance::dump() const {
print(errs()); errs() << '\n';
}
#endif
namespace {

View File

@ -55,10 +55,12 @@ void ExtAddrMode::print(raw_ostream &OS) const {
OS << ']';
}
#ifndef NDEBUG
void ExtAddrMode::dump() const {
print(dbgs());
dbgs() << '\n';
}
#endif
/// MatchScaledValue - Try adding ScaleReg*Scale to the current addressing mode.