This is an archive of the discontinued LLVM Phabricator instance.

[Polly][ForwardOpTree] Allow out-of-quota in examination part of forwardTree.
ClosedPublic

Authored by Meinersbur on Sep 18 2017, 10:57 AM.

Details

Summary

Computing the reaching definition in forwardTree() can take a long time if the coefficients are large. When the forwarding is carried-out (doIt==true), forwardTree() must execute entirely or not at all to get a consistent output, which means we cannot just allow out-of-quota errors to happen in the middle of the processing.

We introduce the class IslQuotaScope which allows to opt-in code that is conformant and has been tested with out-of-quota events. In case of ForwardOpTree, out-of-quota is allowed during the operand tree examination, but not during the transformation. The same forwardTree() recursion is used for examination and execution, meaning that the reaching definition has already been computed in the examination tree walk and cached for reuse in the transformation tree walk.

This should fix the time-out of grtestutils.ll of the asop buildbot. If the compilation still takes too long, we can reduce the max-operations allows for -polly-optree.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Sep 18 2017, 10:57 AM
grosser accepted this revision.Sep 18 2017, 11:23 PM

LGTM. Thank you!

lib/Transform/ForwardOpTree.cpp
267 ↗(On Diff #115678)

Maybe use the real type instead of auto?

450 ↗(On Diff #115678)

Maybe use the real type instead of auto?

This revision is now accepted and ready to land.Sep 18 2017, 11:23 PM
This revision was automatically updated to reflect the committed changes.