[polly] r261216 - Add more isl object printing function

Hongbin Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 07:24:42 PST 2016


Author: ether
Date: Thu Feb 18 09:24:42 2016
New Revision: 261216

URL: http://llvm.org/viewvc/llvm-project?rev=261216&view=rev
Log:
Add more isl object printing function

Modified:
    polly/trunk/include/polly/Support/GICHelper.h
    polly/trunk/lib/Support/GICHelper.cpp

Modified: polly/trunk/include/polly/Support/GICHelper.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/Support/GICHelper.h?rev=261216&r1=261215&r2=261216&view=diff
==============================================================================
--- polly/trunk/include/polly/Support/GICHelper.h (original)
+++ polly/trunk/include/polly/Support/GICHelper.h Thu Feb 18 09:24:42 2016
@@ -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
 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<<(llv
   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,

Modified: polly/trunk/lib/Support/GICHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/GICHelper.cpp?rev=261216&r1=261215&r2=261216&view=diff
==============================================================================
--- polly/trunk/lib/Support/GICHelper.cpp (original)
+++ polly/trunk/lib/Support/GICHelper.cpp Thu Feb 18 09:24:42 2016
@@ -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(__is
                                   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;




More information about the llvm-commits mailing list