[polly] r308748 - [ScopInfo] Don't compile dump() functions into non-assert builds. NFC.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 08:54:07 PDT 2017
Author: meinersbur
Date: Fri Jul 21 08:54:07 2017
New Revision: 308748
URL: http://llvm.org/viewvc/llvm-project?rev=308748&view=rev
Log:
[ScopInfo] Don't compile dump() functions into non-assert builds. NFC.
This follows a convention used in LLVM.
Modified:
polly/trunk/include/polly/ScopInfo.h
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=308748&r1=308747&r2=308748&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Fri Jul 21 08:54:07 2017
@@ -364,8 +364,10 @@ public:
/// of pre-existing. If false, it is allocated using alloca instead malloca.
bool isOnHeap() const { return IsOnHeap; }
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Dump a readable representation to stderr.
void dump() const;
+#endif
/// Print a readable representation to @p OS.
///
@@ -1106,8 +1108,10 @@ public:
/// @param OS The output stream the MemoryAccess is printed to.
void print(raw_ostream &OS) const;
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Print the MemoryAccess to stderr.
void dump() const;
+#endif
/// Is the memory access affine?
bool isAffine() const { return IsAffine; }
@@ -1620,8 +1624,10 @@ public:
///
void printInstructions(raw_ostream &OS) const;
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Print the ScopStmt to stderr.
void dump() const;
+#endif
};
/// Print ScopStmt S to raw_ostream O.
@@ -2814,8 +2820,10 @@ public:
/// well.
void print(raw_ostream &OS, bool PrintInstructions) const;
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Print the ScopStmt to stderr.
void dump() const;
+#endif
/// Get the isl context of this static control part.
///
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=308748&r1=308747&r2=308748&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Fri Jul 21 08:54:07 2017
@@ -407,7 +407,9 @@ __isl_give isl_id *ScopArrayInfo::getBas
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 @@ void MemoryAccess::print(raw_ostream &OS
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 @@ void ScopStmt::print(raw_ostream &OS, bo
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 @@ void Scop::print(raw_ostream &OS, bool P
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(); }
More information about the llvm-commits
mailing list