[PATCH] Strip constant factors from parameters
Tobias Grosser
tobias at grosser.es
Sun Mar 29 13:23:31 PDT 2015
Hi Johannes,
this LGTM. I added some minor comments.
Tobias
================
Comment at: include/polly/Support/SCEVValidator.h:55
@@ +54,3 @@
+
+/// @brief Extract the constant factors from the multiplaction @p M.
+///
----------------
multiplication
================
Comment at: include/polly/Support/SCEVValidator.h:57
@@ +56,3 @@
+///
+/// @param M A SCEV multipilcation.
+/// @param SE The ScalarEvolution analysis to create new SCEVs.
----------------
multiplication
================
Comment at: lib/Analysis/ScopInfo.cpp:201
@@ -213,1 +200,3 @@
+ return isl_pw_aff_mul(visit(ConstantAndLeftOverPair.first),
+ visit(ConstantAndLeftOverPair.second));
}
----------------
Maybe it is worth to adding a comment that explains why we can not get an infinitive recursion here, where ConstantAndLeftOverPair.second always contains a multiplication and on which we call visitMulExpr again. (The answer seems to be that in visit(Expr) we should stop and realize that the multiplication expression is a parameter expression.)
================
Comment at: test/ScopInfo/constant_factor_in_parameter.ll:4
@@ +3,3 @@
+; Check that the constant part of the N * M * 4 expression is not part of the
+; parameter but explicit in the access function. This can avoid existenially
+; quantified variables, e.g., when computing the stride.
----------------
existentially
http://reviews.llvm.org/D8692
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list