Release build: guard dump functions with "ifndef NDEBUG"
authorManman Ren <mren@apple.com>
Thu, 6 Sep 2012 19:55:56 +0000 (19:55 +0000)
committerManman Ren <mren@apple.com>
Thu, 6 Sep 2012 19:55:56 +0000 (19:55 +0000)
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163344 91177308-0d34-0410-b5e6-96231b3b80d8

22 files changed:
lib/Analysis/AliasSetTracker.cpp
lib/Analysis/DominanceFrontier.cpp
lib/Analysis/IPA/CallGraph.cpp
lib/Analysis/IVUsers.cpp
lib/Analysis/InlineCost.cpp
lib/Analysis/LoopInfo.cpp
lib/Analysis/PHITransAddr.cpp
lib/Analysis/RegionInfo.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Analysis/Trace.cpp
lib/MC/MCAssembler.cpp
lib/MC/MCDwarf.cpp
lib/MC/MCExpr.cpp
lib/MC/MCInst.cpp
lib/MC/MCLabel.cpp
lib/MC/MCParser/MCAsmParser.cpp
lib/MC/MCSymbol.cpp
lib/MC/MCValue.cpp
lib/MC/SubtargetFeature.cpp
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/Transforms/Utils/AddrModeMatcher.cpp

index e29c2bc22b3e22bbdbfa69378f08212f20abd6d1..e9dcb37903c4f58754d088e101c17792f51c15b7 100644 (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
index 1604576ec4ae43dce70a9d48d1d43d09034f5829..5536a9b705eed5d0377eb37e11f6d15b853acb48 100644 (file)
@@ -133,7 +133,9 @@ void DominanceFrontierBase::print(raw_ostream &OS, const Module* ) const {
   }
 }
 
+#ifndef NDEBUG
 void DominanceFrontierBase::dump() const {
   print(dbgs());
 }
+#endif
 
index 0df3e8a38218e3f11af85973ed379b324156d040..947ad519c6bd765894774f68b3645ec5a20e2e83 100644 (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
index 0a6682a254f50497c752cd2c14448b904a7f7a73..f70518165acacc030a6fe905d10de8cb09e7107f 100644 (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();
index bc1ecd2ea4308e27a98af43d94f083f4576d88a7..12be7fdc14adffb5bbd14be55fb5fef36d36f3e6 100644 (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);
index 49767d69b26c03f8243773d59387b64a007a2868..4a1810477653a34ca87f3b6aa16ad471a5649d39 100644 (file)
@@ -306,9 +306,11 @@ BasicBlock *Loop::getUniqueExitBlock() const {
   return 0;
 }
 
+#ifndef NDEBUG
 void Loop::dump() const {
   print(dbgs());
 }
+#endif
 
 //===----------------------------------------------------------------------===//
 // UnloopUpdater implementation
index 38cb1c91f8f830701951d5d628cfb26d7697554f..d6a17ca725cd91cc92ced53dda28e7bf59ebf90a 100644 (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,
index ea5bf02870d84d8ebc876501186fcf11ab0f6974..0f9a8b3ac487ee2283ec93e0fad87d4073bbd0ab 100644 (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.
index a654648578bc7a918beb7e7ed1636e6a2b6b53fd..84e147bf8e939c0f45856755cee5b3e82ed3c1dc 100644 (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()) {
index ff5010bad7bbc5ca051bcd80e78c26bf02a49525..dbb953572884b5148ad6cb3c19a883642a7ac514 100644 (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
index c872bd62c9abe9e7d8e75ee9a78a1b35f2d96366..e38bc45c9b5c683b78ebf7da15f97bb05d786559 100644 (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() { }
index 4c63e434d23fa7dbf5d41497ffa3c5d92f1470ce..96938f7626158d1274f2456e21cb1fb923c641fd 100644 (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) {
index 2d1cadd87f6ed39a5dc0f4ee938d465e5615f218..b19665949dbde66761dd2d88908354ebee2d5524 100644 (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
 
 /* *** */
 
index 7bbfd2efa136676c668873245b87ca971975d1f5..e96010bd5c860dc898d453436318242be244ce3c 100644 (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
index 9c0fc92e6c055af40987efcf4a50eb392ee3f718..95d7d16a19ab3d179380a8d40a1faf62364b484e 100644 (file)
@@ -16,6 +16,8 @@ void MCLabel::print(raw_ostream &OS) const {
   OS << '"' << getInstance() << '"';
 }
 
+#ifndef NDEBUG
 void MCLabel::dump() const {
   print(dbgs());
 }
+#endif
index 3a825f03b776704108c2078ed498d7063f637521..93ee2dd0c016f124d118c2610174a7c9b79ad874 100644 (file)
@@ -44,5 +44,7 @@ bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
 }
 
 void MCParsedAsmOperand::dump() const {
+#ifndef NDEBUG
   dbgs() << "  " << *this;
+#endif
 }
index f7f9184f03d0a45bd55473ed53b7b76f638ba2bc..f60126b8fa2d435292d2149d1d8bedeca9963349 100644 (file)
@@ -76,6 +76,8 @@ void MCSymbol::print(raw_ostream &OS) const {
   OS << '"' << getName() << '"';
 }
 
+#ifndef NDEBUG
 void MCSymbol::dump() const {
   print(dbgs());
 }
+#endif
index c6ea16ce7b4da3e0b35f4037ac3250bf66d54497..a37149d78893f6f15b81c80dda2bf4cc734c7f06 100644 (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
index f43197b5c28e23a6c8469742b864b41f0aac857e..317a48ec2de21bd44f05a9e458ad2ea069892ee5 100644 (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.
index 558bd359335ef930d43ed2322157943077d2eb21..bce43bbdae7ac421c3cfa076f46a325473bb56d3 100644 (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
index 0ae7a5151e7004f99061d5facaa8b6639f6b20c8..d7495da5ef08b1990db6cf740888876473cc11d0 100644 (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 {
 
index d83145289ce2c0b390b887299c3b80f6946d3565..1e6586bf0d46f13021f2a219ef973b25c693b327 100644 (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.