This is an archive of the discontinued LLVM Phabricator instance.

[Polly] [ScheduleOptimizer] Prevent incorrect tile size computation
ClosedPublic

Authored by bollu on Apr 5 2017, 7:13 AM.

Details

Summary

Because Polly exposes parameters that directly influence tile size
calculations, one can setup situations like divide-by-zero.

Check against a possible divide-by-zero in getMacroKernelParams
and return early.

Also assert at the end of getMacroKernelParams that the block sizes
computed for matrices are positive (>= 1).

Diff Detail

Repository
rL LLVM

Event Timeline

bollu created this revision.Apr 5 2017, 7:13 AM
bollu updated this revision to Diff 94234.Apr 5 2017, 8:14 AM

style fixes

grosser accepted this revision.Apr 5 2017, 8:16 AM
grosser added inline comments.
test/ScheduleOptimizer/ensure-correct-tile-sizes.ll
11 ↗(On Diff #94234)

No need to comment with /*. The ';' at the beginning of the line is already a comment marker.

This revision is now accepted and ready to land.Apr 5 2017, 8:16 AM
This revision was automatically updated to reflect the committed changes.