[ScopInfo] Don't compile dump() functions into non-assert builds. NFC.
This follows a convention used in LLVM.
llvm-svn: 308748
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 2c1445b..f79c086 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -407,7 +407,9 @@
return isl_id_copy(Id);
}
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void ScopArrayInfo::dump() const { print(errs()); }
+#endif
void ScopArrayInfo::print(raw_ostream &OS, bool SizeAsPwAff) const {
OS.indent(8) << *getElementType() << " " << getName();
@@ -1099,7 +1101,9 @@
OS.indent(11) << "new: " << getNewAccessRelationStr() << ";\n";
}
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MemoryAccess::dump() const { print(errs()); }
+#endif
__isl_give isl_pw_aff *MemoryAccess::getPwAff(const SCEV *E) {
auto *Stmt = getStatement();
@@ -1997,7 +2001,9 @@
printInstructions(OS.indent(12));
}
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void ScopStmt::dump() const { print(dbgs(), true); }
+#endif
void ScopStmt::removeAccessData(MemoryAccess *MA) {
if (MA->isRead() && MA->isOriginalValueKind()) {
@@ -4659,7 +4665,9 @@
printStatements(OS.indent(4), PrintInstructions);
}
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void Scop::dump() const { print(dbgs(), true); }
+#endif
isl_ctx *Scop::getIslCtx() const { return IslCtx.get(); }