summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/include/polly/Support/GICHelper.h20
-rw-r--r--polly/lib/Support/GICHelper.cpp6
2 files changed, 26 insertions, 0 deletions
diff --git a/polly/include/polly/Support/GICHelper.h b/polly/include/polly/Support/GICHelper.h
index f442a609a3b..4471a74aa40 100644
--- a/polly/include/polly/Support/GICHelper.h
+++ b/polly/include/polly/Support/GICHelper.h
@@ -29,6 +29,7 @@ struct isl_pw_multi_aff;
struct isl_aff;
struct isl_pw_aff;
struct isl_val;
+struct isl_space;
namespace llvm {
class Value;
@@ -50,6 +51,7 @@ std::string stringFromIslObj(__isl_keep isl_multi_aff *maff);
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);
+std::string stringFromIslObj(__isl_keep isl_space *space);
//@}
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
@@ -82,6 +84,24 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
return OS;
}
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+ __isl_keep isl_multi_aff *MA) {
+ OS << polly::stringFromIslObj(MA);
+ return OS;
+}
+
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+ __isl_keep isl_schedule *Schedule) {
+ OS << polly::stringFromIslObj(Schedule);
+ return OS;
+}
+
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+ __isl_keep isl_space *Space) {
+ OS << polly::stringFromIslObj(Space);
+ return OS;
+}
+
/// @brief Return @p Prefix + @p Val->getName() + @p Suffix but Isl compatible.
std::string getIslCompatibleName(const std::string &Prefix,
const llvm::Value *Val,
diff --git a/polly/lib/Support/GICHelper.cpp b/polly/lib/Support/GICHelper.cpp
index ac23e4c9a18..e92ea39d45e 100644
--- a/polly/lib/Support/GICHelper.cpp
+++ b/polly/lib/Support/GICHelper.cpp
@@ -16,6 +16,7 @@
#include "isl/map.h"
#include "isl/schedule.h"
#include "isl/set.h"
+#include "isl/space.h"
#include "isl/union_map.h"
#include "isl/union_set.h"
#include "isl/val.h"
@@ -128,6 +129,11 @@ std::string polly::stringFromIslObj(__isl_keep isl_pw_aff *pwaff) {
isl_printer_print_pw_aff);
}
+std::string polly::stringFromIslObj(__isl_keep isl_space *space) {
+ return stringFromIslObjInternal(space, isl_space_get_ctx,
+ isl_printer_print_space);
+}
+
static void replace(std::string &str, const std::string &find,
const std::string &replace) {
size_t pos = 0;
OpenPOWER on IntegriCloud