[PATCH] [Polly] Extract number of elements/iterations for a isl_set/isl_ast_node

Johannes Doerfert doerfert at cs.uni-saarland.de
Wed Oct 8 13:43:03 PDT 2014


Some comments about the patch

================
Comment at: include/polly/CodeGen/CodeGeneration.h:42
@@ -41,2 +41,3 @@
 
+/// FIXME: Depraced and needs to be removed with the cloog backend.
 static inline int getNumberOfIterations(__isl_take isl_set *Domain) {
----------------
This is a full fledged function marked static and put into a header file which is other than that pretty much useless.

I really want to get rid of it.

================
Comment at: include/polly/CodeGen/IslAst.h:144
@@ +143,3 @@
+  static __isl_give isl_pw_aff *
+  getNumberOfIterations(__isl_keep isl_ast_node *For);
+
----------------
We might consider to move to this interface and do some actual computation on the parametric loop trip counts instead of limiting ourselfs to integer loop trip counts... often the LLVM vectorizer does not vectorize loops even if they are annotated parallel and have a few simple load-binop-store chains (e.g., bicg when it's parallelized in the outer most dimension and therefore doesn't have a reduction in the innermost loop any more [due to privatization to be exact]).

================
Comment at: include/polly/Support/GICHelper.h:82
@@ +81,3 @@
+/// @brief Return the only affine piece of @p PA.
+__isl_give isl_aff *isl_aff_from_pw_aff(__isl_take isl_pw_aff *PA);
+
----------------
We might want to put stuff like this [also createAff, createPwAff, etc] into isl to ease handling.

================
Comment at: include/polly/Support/GICHelper.h:98
@@ +97,3 @@
+                 __isl_give isl_map **LexMinPtr = nullptr,
+                 __isl_give isl_map **LexMaxPtr = nullptr);
+
----------------
This function will also be used to determine the number of privatization locations needed.

================
Comment at: lib/Support/GICHelper.cpp:196
@@ +195,3 @@
+
+static int extractAffineFromPiecewiseAffine(__isl_keep isl_set *Dom,
+                                            __isl_keep isl_aff *Aff,
----------------
This will probably be easier from within isl.

http://reviews.llvm.org/D4988






More information about the llvm-commits mailing list