This is an archive of the discontinued LLVM Phabricator instance.

[LICM] Hoist an invariant_start out of loops if there are no stores executed before it
ClosedPublic

Authored by reames on Aug 23 2018, 1:54 PM.

Details

Summary

Once the invariant_start is reached, we know that no instruction *after* it can modify the memory. So, if we can prove the location isn't read *between entry into the loop and the execution of the invariant_start*, we can execute the invariant_start before entering the loop.

Diff Detail

Event Timeline

reames created this revision.Aug 23 2018, 1:54 PM
anna accepted this revision.Aug 23 2018, 2:02 PM

LGTM

This revision is now accepted and ready to land.Aug 23 2018, 2:02 PM
This revision was automatically updated to reflect the committed changes.