diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-07-14 18:09:40 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-07-14 18:09:40 +0000 |
commit | 001bd274f569ce432562266547f84059c91cbcf5 (patch) | |
tree | 1dc7b6154d96a44d9bbff6aff93ec91444dceffe | |
parent | 122ec3a3388320187427c80e7fc177b7da9215b4 (diff) | |
download | bcm5719-llvm-001bd274f569ce432562266547f84059c91cbcf5.tar.gz bcm5719-llvm-001bd274f569ce432562266547f84059c91cbcf5.zip |
Dependences: Use ostream printer to print analysis output
llvm-svn: 186288
-rwxr-xr-x | polly/include/polly/Support/GICHelper.h | 14 | ||||
-rw-r--r-- | polly/lib/Analysis/Dependences.cpp | 12 | ||||
-rw-r--r-- | polly/lib/Support/GICHelper.cpp | 2 |
3 files changed, 17 insertions, 11 deletions
diff --git a/polly/include/polly/Support/GICHelper.h b/polly/include/polly/Support/GICHelper.h index ef4b30fc16b..0d8b22b142a 100755 --- a/polly/include/polly/Support/GICHelper.h +++ b/polly/include/polly/Support/GICHelper.h @@ -19,6 +19,8 @@ #include "isl/ctx.h" +#include "llvm/Support/raw_ostream.h" + struct isl_map; struct isl_union_map; struct isl_set; @@ -59,6 +61,18 @@ std::string stringFromIslObj(__isl_keep isl_pw_multi_aff *pma); std::string stringFromIslObj(__isl_keep isl_aff *aff); std::string stringFromIslObj(__isl_keep isl_pw_aff *pwaff); //@} + +inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, + __isl_keep isl_union_map *Map) { + OS << polly::stringFromIslObj(Map); + return OS; +} + +inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, + __isl_keep isl_map *Map) { + OS << polly::stringFromIslObj(Map); + return OS; +} } // end namespace polly #endif diff --git a/polly/lib/Analysis/Dependences.cpp b/polly/lib/Analysis/Dependences.cpp index 0950f3536e6..5a185d0cd31 100644 --- a/polly/lib/Analysis/Dependences.cpp +++ b/polly/lib/Analysis/Dependences.cpp @@ -249,15 +249,9 @@ bool Dependences::isParallelDimension(__isl_take isl_set *ScheduleSubset, } void Dependences::printScop(raw_ostream &OS) const { - std::string RAWString, WARString, WAWString; - - RAWString = polly::stringFromIslObj(RAW); - WARString = polly::stringFromIslObj(WAR); - WAWString = polly::stringFromIslObj(WAW); - - OS << "\tRAW dependences:\n\t\t" << RAWString << "\n"; - OS << "\tWAR dependences:\n\t\t" << WARString << "\n"; - OS << "\tWAW dependences:\n\t\t" << WAWString << "\n"; + OS << "\tRAW dependences:\n\t\t" << RAW << "\n"; + OS << "\tWAR dependences:\n\t\t" << WAR << "\n"; + OS << "\tWAW dependences:\n\t\t" << WAW << "\n"; } void Dependences::releaseMemory() { diff --git a/polly/lib/Support/GICHelper.cpp b/polly/lib/Support/GICHelper.cpp index 28f86d664de..cc293e8186e 100644 --- a/polly/lib/Support/GICHelper.cpp +++ b/polly/lib/Support/GICHelper.cpp @@ -19,8 +19,6 @@ #include "isl/union_set.h" #include "isl/val.h" -#include "llvm/Support/raw_ostream.h" - using namespace llvm; void polly::MPZ_from_APInt(mpz_t v, const APInt apint, bool is_signed) { |