This is an archive of the discontinued LLVM Phabricator instance.

[Polly][RTC] Bail if too many parameters are involved in an RTC access.
ClosedPublic

Authored by jdoerfert on Sep 26 2014, 4:22 AM.

Details

Reviewers
sebpop
grosser
Summary
If two many parameters are involved in accesses used to create RTCs
we might end up with enormous compile times and RTC expressions.
The reason is that the lexmin/lexmax is dependent on all these
parameters and isl might need to create a case for every "ordering"
of them (e.g., p0 <= p1 <= p2, p1 <= p0 <= p2, ...).

The exact number of parameters allowed in accesses is defined by the
command line option -polly-rtc-max-parameters=XXX and set by default
to 8.

Diff Detail

Event Timeline

jdoerfert updated this revision to Diff 14100.Sep 26 2014, 4:22 AM
jdoerfert retitled this revision from to [Polly][RTC] Bail if too many parameters are involved in an RTC access..
jdoerfert updated this object.
jdoerfert edited the test plan for this revision. (Show Details)
jdoerfert added reviewers: grosser, sebpop.
jdoerfert added subscribers: Restricted Project, Unknown Object (MLST).
grosser accepted this revision.Sep 26 2014, 3:33 PM
grosser edited edge metadata.

Hi Johannes,

thanks for the patch. The code itself looks good, it has nice test cases and it fixes the
issue we see with linpack.

I have a couple of minor comments. Otherwise it LGTM.

Thanks again,
Tobias

[Polly][RTC] Bail if too many parameters are involved in an RTC access.

in a RTC ...

If two many parameters are involved in accesses used to create RTCs

If too many

we might end up with enormous compile times and RTC expressions.
The reason is that the lexmin/lexmax is dependent on all these
parameters and isl might need to create a case for every "ordering"
of them (e.g., p0 <= p1 <= p2, p1 <= p0 <= p2, ...).

The exact number of parameters allowed in accesses is defined by the
command line option -polly-rtc-max-parameters=XXX and set by default
to 8.

lib/Analysis/ScopInfo.cpp
1146

high.

1150

involved

1158

Nice that you performed some benchmarking.

1347

Did you find a test case that causes troubles here?

In Polly we only use the compute out to guard the dependence check, so if we reset the
operations we should probably do this at the beginning of the dependence check, where
we set the max operations for the compute out as well. Outside of the dependence check,
we do not enforce a quota, so I do not really see how other passes could fail. If you have a test case that fails here, then I probably missed something. Otherwise, I would probably leave this one out.

1704

high

1707

quadratically?

test/ScopInfo/aliasing_many_parameters_not_all_involved.ll
4

possibly

Also, this line is longer than 80 columns, no?

5

This is a really nice test case.

This revision is now accepted and ready to land.Sep 26 2014, 3:33 PM
jdoerfert added inline comments.Sep 26 2014, 8:09 PM
lib/Analysis/ScopInfo.cpp
1347

Yes, I'll post it tomorrow once I concluded that even the master branch breaks when the --debug flag is set.

We can postpone this patch till then though.

1707

My measurements indicate otherwise,.. it looks at least as if it was cubic, should I change it?

test/ScopInfo/aliasing_many_parameters_not_all_involved.ll
4

All the run lines are,... 1) Since when do we care in test cases? 2) How am I supposed to change that?

jdoerfert closed this revision.Sep 27 2014, 11:12 AM

r218566.