This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by jdoerfert on Aug 20 2014, 10:32 AM.

Diff Detail

Event Timeline

jdoerfert updated this revision to Diff 12706.Aug 20 2014, 10:32 AM
jdoerfert retitled this revision from to Extract number of elements/iterations for a isl_set/isl_ast_node.
jdoerfert added reviewers: grosser, sebpop, simbuerg.
jdoerfert added subscribers: Restricted Project, Unknown Object (MLST).
jdoerfert retitled this revision from Extract number of elements/iterations for a isl_set/isl_ast_node to [Polly] Extract number of elements/iterations for a isl_set/isl_ast_node.Sep 8 2014, 3:13 AM
jdoerfert added a reviewer: dpeixott.
jdoerfert updated this revision to Diff 14598.Oct 8 2014, 1:32 PM

Move the functions and actually use the new getNumberOfIterations interface

jdoerfert updated this revision to Diff 14599.Oct 8 2014, 1:34 PM

Restricted the diff to the actual commit (not some pending predecessor commits)

Some comments about the patch

include/polly/CodeGen/CodeGeneration.h
42

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.

include/polly/CodeGen/IslAst.h
148

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

include/polly/Support/GICHelper.h
82

We might want to put stuff like this [also createAff, createPwAff, etc] into isl to ease handling.

98

This function will also be used to determine the number of privatization locations needed.

lib/Support/GICHelper.cpp
196

This will probably be easier from within isl.

jdoerfert updated this revision to Diff 14652.Oct 9 2014, 7:23 AM

Promoted the trip count to a member of the isl_ast_node payload and used the
new functionality to emit less loop guards than with ScalarEvolution

Lnt shows that sometimes it is very costly to compute the loop bounds. So I figure we cannot compute it for every loop but only on demand.

However, we need a fast way to compute hasAtLeastOneIteration(isl_ast_node *For). Any thoughts?

simbuerg edited edge metadata.Oct 9 2014, 10:45 PM

Just a minor comment, I'm not fully awake yet. Btw, get some sleep! ;-)

include/polly/CodeGen/CodeGeneration.h
42

Deprecated*

jdoerfert abandoned this revision.Sep 27 2015, 5:59 PM

This was flawed and is not needed at the moment.