This is an archive of the discontinued LLVM Phabricator instance.

Strip constant factors from parameters
ClosedPublic

Authored by jdoerfert on Mar 29 2015, 1:06 PM.

Details

Summary
We will strip the constant factor of a parameter befor we add it to
the SCoP. As a result the access functions are simplified, e.g., for
the attached test case.

Diff Detail

Event Timeline

jdoerfert updated this revision to Diff 22857.Mar 29 2015, 1:06 PM
jdoerfert retitled this revision from to Strip constant factors from parameters.
jdoerfert updated this object.
jdoerfert added subscribers: Restricted Project, Unknown Object (MLST).
grosser accepted this revision.Mar 29 2015, 1:23 PM
grosser edited edge metadata.

Hi Johannes,

this LGTM. I added some minor comments.

Tobias

include/polly/Support/SCEVValidator.h
55

multiplication

57

multiplication

lib/Analysis/ScopInfo.cpp
201

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.)

test/ScopInfo/constant_factor_in_parameter.ll
4

existentially

This revision is now accepted and ready to land.Mar 29 2015, 1:23 PM

Thanks, commited in r233501.

jdoerfert closed this revision.Mar 29 2015, 1:49 PM

commited in r233501.