This is an archive of the discontinued LLVM Phabricator instance.

[LoopInterchange] Preserve ScalarEvolution, by forgetting about interchanged loops.
ClosedPublic

Authored by fhahn on Sep 13 2018, 5:25 AM.

Details

Summary

As preparation for LoopInterchange becoming a loop pass, it needs to
preserve ScalarEvolution. Even though interchanging should not change
the trip count of the loop, it modifies loop entry, latch and exit
blocks.

I added -verify-scev to some loop interchange tests, but the verification does
not catch problems caused by missing invalidation of SE in loop interchange, as
the trip counts themselves do not change. So there might be potential to
make the SE verification covering more stuff in the future.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Sep 13 2018, 5:25 AM
This revision is now accepted and ready to land.Sep 13 2018, 11:07 AM
This revision was automatically updated to reflect the committed changes.