Page MenuHomePhabricator

[LoopRotate] Don't perform loop rotation if the loop header calls a convergent function.
ClosedPublic

Authored by jlebar on Feb 10 2016, 8:58 PM.

Details

Summary

Calls to convergent functions can be duplicated, but only if the
duplicates are not control-flow dependent on any additional values.
Loop rotation doesn't meet the bar.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 47595.Feb 10 2016, 8:58 PM
jlebar retitled this revision from to [LoopRotate] Don't perform loop rotation if the loop header calls a convergent function..
jlebar updated this object.
jlebar added a reviewer: jingyue.
jlebar added subscribers: broune, hfinkel, tra and 4 others.
jingyue accepted this revision.Feb 11 2016, 5:39 PM
jingyue edited edge metadata.
jingyue added inline comments.
test/Transforms/LoopRotate/convergent.ll
16 ↗(On Diff #47595)

Nit: Can we simplify the test by passing %end as a parameter? That gets rid of @e and the load instruction.

This revision is now accepted and ready to land.Feb 11 2016, 5:39 PM
This revision was automatically updated to reflect the committed changes.
jlebar marked an inline comment as done.