Release build: guard dump functions with
authorManman Ren <mren@apple.com>
Wed, 12 Sep 2012 05:06:18 +0000 (05:06 +0000)
committerManman Ren <mren@apple.com>
Wed, 12 Sep 2012 05:06:18 +0000 (05:06 +0000)
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"

No functional change. Update r163344.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163679 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 e9dcb37903c4f58754d088e101c17792f51c15b7..3199a118eb10f7796e25f4c7fb9764b4eb955b1b 100644 (file)
@@ -590,7 +590,7 @@ void AliasSetTracker::print(raw_ostream &OS) const {
   OS << "\n";
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void AliasSet::dump() const { print(dbgs()); }
 void AliasSetTracker::dump() const { print(dbgs()); }
 #endif
index 5536a9b705eed5d0377eb37e11f6d15b853acb48..3e537e9f1a36afbe3369dd8c22c5b9e51e0ddf93 100644 (file)
@@ -133,7 +133,7 @@ void DominanceFrontierBase::print(raw_ostream &OS, const Module* ) const {
   }
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void DominanceFrontierBase::dump() const {
   print(dbgs());
 }
index 947ad519c6bd765894774f68b3645ec5a20e2e83..17631ddb305616d268c06bcf0ad5006bf163d07f 100644 (file)
@@ -198,7 +198,7 @@ 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
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void CallGraph::dump() const {
   print(dbgs(), 0);
 }
@@ -269,7 +269,7 @@ void CallGraphNode::print(raw_ostream &OS) const {
   OS << '\n';
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void CallGraphNode::dump() const { print(dbgs()); }
 #endif
 
index f70518165acacc030a6fe905d10de8cb09e7107f..3807ccdbf8d5ff2e0931c6701ca4646a59aa1632 100644 (file)
@@ -273,7 +273,7 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
   }
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void IVUsers::dump() const {
   print(dbgs());
 }
index 12be7fdc14adffb5bbd14be55fb5fef36d36f3e6..82f53f7b0f6bb019efd4b99d19bf41ca4297c225 100644 (file)
@@ -974,7 +974,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {
   return AlwaysInline || Cost < Threshold;
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 /// \brief Dump stats about this call's analysis.
 void CallAnalyzer::dump() {
 #define DEBUG_PRINT_STAT(x) llvm::dbgs() << "      " #x ": " << x << "\n"
index 4a1810477653a34ca87f3b6aa16ad471a5649d39..8341f9d830558a46db0bdb6a3ca6a485d4e5db31 100644 (file)
@@ -306,7 +306,7 @@ BasicBlock *Loop::getUniqueExitBlock() const {
   return 0;
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void Loop::dump() const {
   print(dbgs());
 }
index d6a17ca725cd91cc92ced53dda28e7bf59ebf90a..c35737e4724c84a884e8818f0278548486c5bf24 100644 (file)
@@ -41,7 +41,7 @@ static bool CanPHITrans(Instruction *Inst) {
   return false;
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void PHITransAddr::dump() const {
   if (Addr == 0) {
     dbgs() << "PHITransAddr: null\n";
index 0f9a8b3ac487ee2283ec93e0fad87d4073bbd0ab..30f0d2f10d862e2d1b0b7bdcf7fc030a5927bafb 100644 (file)
@@ -427,7 +427,7 @@ void Region::print(raw_ostream &OS, bool print_tree, unsigned level,
     OS.indent(level*2) << "} \n";
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void Region::dump() const {
   print(dbgs(), true, getDepth(), printStyle.getValue());
 }
index 84e147bf8e939c0f45856755cee5b3e82ed3c1dc..9b9c889496a8a0caf818f4b9e1195b35b098ad30 100644 (file)
@@ -122,7 +122,7 @@ char ScalarEvolution::ID = 0;
 // Implementation of the SCEV class.
 //
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void SCEV::dump() const {
   print(dbgs());
   dbgs() << '\n';
index dbb953572884b5148ad6cb3c19a883642a7ac514..22da8576203471d0d982e8885c7a3293dcda26cd 100644 (file)
@@ -43,7 +43,7 @@ void Trace::print(raw_ostream &O) const {
   O << "; Trace parent function: \n" << *F;
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 /// dump - Debugger convenience method; writes trace to standard error
 /// output stream.
 ///
index e38bc45c9b5c683b78ebf7da15f97bb05d786559..d47b346f6b22adaea950d0c53293667d3526f97f 100644 (file)
@@ -830,7 +830,7 @@ raw_ostream &operator<<(raw_ostream &OS, const MCFixup &AF) {
 
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCFragment::dump() {
   raw_ostream &OS = llvm::errs();
 
index 96938f7626158d1274f2456e21cb1fb923c641fd..f71b266ad632baeed2d7d74ce312d1ae21bf0a3c 100644 (file)
@@ -425,7 +425,7 @@ void MCDwarfFile::print(raw_ostream &OS) const {
   OS << '"' << getName() << '"';
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCDwarfFile::dump() const {
   print(dbgs());
 }
index b19665949dbde66761dd2d88908354ebee2d5524..8fed48cef2e5c21912541422e10a68e47fe2e2ad 100644 (file)
@@ -136,7 +136,7 @@ void MCExpr::print(raw_ostream &OS) const {
   llvm_unreachable("Invalid expression kind!");
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCExpr::dump() const {
   print(dbgs());
   dbgs() << '\n';
index e96010bd5c860dc898d453436318242be244ce3c..124cc149beb63b856e46efac195e399242223a47 100644 (file)
@@ -32,7 +32,7 @@ void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
   OS << ">";
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCOperand::dump() const {
   print(dbgs(), 0);
   dbgs() << "\n";
@@ -64,7 +64,7 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCAsmInfo *MAI,
   OS << ">";
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCInst::dump() const {
   print(dbgs(), 0);
   dbgs() << "\n";
index 95d7d16a19ab3d179380a8d40a1faf62364b484e..1d3022a93e8642f162150b99688720d69b863ae8 100644 (file)
@@ -16,7 +16,7 @@ void MCLabel::print(raw_ostream &OS) const {
   OS << '"' << getInstance() << '"';
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCLabel::dump() const {
   print(dbgs());
 }
index 93ee2dd0c016f124d118c2610174a7c9b79ad874..6967feef2440ff15cf1192965d3c89c3f4330cbd 100644 (file)
@@ -44,7 +44,7 @@ bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
 }
 
 void MCParsedAsmOperand::dump() const {
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   dbgs() << "  " << *this;
 #endif
 }
index f60126b8fa2d435292d2149d1d8bedeca9963349..050cd38bfece94f67a3bc264a303478dc52b8dc7 100644 (file)
@@ -76,7 +76,7 @@ void MCSymbol::print(raw_ostream &OS) const {
   OS << '"' << getName() << '"';
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCSymbol::dump() const {
   print(dbgs());
 }
index a37149d78893f6f15b81c80dda2bf4cc734c7f06..4393777211e80555e4bee1aec2fa16e6c7f1add1 100644 (file)
@@ -31,7 +31,7 @@ void MCValue::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
     OS << " + " << getConstant();
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCValue::dump() const {
   print(dbgs(), 0);
 }
index 317a48ec2de21bd44f05a9e458ad2ea069892ee5..153757994fe5a835f84c6f33b861d4e034639516 100644 (file)
@@ -368,7 +368,7 @@ void SubtargetFeatures::print(raw_ostream &OS) const {
   OS << "\n";
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 /// dump - Dump feature info.
 ///
 void SubtargetFeatures::dump() const {
index 16ae6add863cc22485863688cc3712decedd1bcf..e67d8af46ce1f3dc8edc97555b85f37b9399995a 100644 (file)
@@ -632,7 +632,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfo)
 INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
 INITIALIZE_PASS_END(GVN, "gvn", "Global Value Numbering", false, false)
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void GVN::dump(DenseMap<uint32_t, Value*>& d) {
   errs() << "{\n";
   for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),
index d7495da5ef08b1990db6cf740888876473cc11d0..bcd27b132f6ce6cb181b9a0db87aad19f98290ce 100644 (file)
@@ -121,7 +121,7 @@ void RegSortData::print(raw_ostream &OS) const {
   OS << "[NumUses=" << UsedByIndices.count() << ']';
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void RegSortData::dump() const {
   print(errs()); errs() << '\n';
 }
@@ -416,7 +416,7 @@ void Formula::print(raw_ostream &OS) const {
   }
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void Formula::dump() const {
   print(errs()); errs() << '\n';
 }
@@ -978,7 +978,7 @@ void Cost::print(raw_ostream &OS) const {
     OS << ", plus " << SetupCost << " setup cost";
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void Cost::dump() const {
   print(errs()); errs() << '\n';
 }
@@ -1066,7 +1066,7 @@ void LSRFixup::print(raw_ostream &OS) const {
     OS << ", Offset=" << Offset;
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void LSRFixup::dump() const {
   print(errs()); errs() << '\n';
 }
@@ -1260,7 +1260,7 @@ void LSRUse::print(raw_ostream &OS) const {
     OS << ", widest fixup type: " << *WidestFixupType;
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void LSRUse::dump() const {
   print(errs()); errs() << '\n';
 }
@@ -3446,7 +3446,7 @@ void WorkItem::print(raw_ostream &OS) const {
      << " , add offset " << Imm;
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void WorkItem::dump() const {
   print(errs()); errs() << '\n';
 }
@@ -4743,7 +4743,7 @@ void LSRInstance::print(raw_ostream &OS) const {
   print_uses(OS);
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void LSRInstance::dump() const {
   print(errs()); errs() << '\n';
 }
index 1e6586bf0d46f13021f2a219ef973b25c693b327..0f9dfddf574f045f2c57459d1306b314758e8397 100644 (file)
@@ -55,7 +55,7 @@ void ExtAddrMode::print(raw_ostream &OS) const {
   OS << ']';
 }
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void ExtAddrMode::dump() const {
   print(dbgs());
   dbgs() << '\n';