This is an archive of the discontinued LLVM Phabricator instance.

[EarlyCSE] Reuse invariant scopes for invariant load
ClosedPublic

Authored by reames on Mar 14 2018, 3:01 PM.

Details

Summary

This is a follow up to https://reviews.llvm.org/D43716 which rewrites the invariant load handling using the new infrastructure. It's slightly more powerful, but only in somewhat minor ways for the moment. It's not clear that DSE of stores to invariant locations is actually interesting since why would your IR have such a construct to start with?

Diff Detail

Repository
rL LLVM

Event Timeline

reames created this revision.Mar 14 2018, 3:01 PM
anna accepted this revision.Mar 15 2018, 6:18 AM

LGTM

lib/Transforms/Scalar/EarlyCSE.cpp
927 ↗(On Diff #138459)

conservatively.

This revision is now accepted and ready to land.Mar 15 2018, 6:18 AM
This revision was automatically updated to reflect the committed changes.

Note: The variant I committed turned out to be less powerful in one particular case than the reviewed code. I spotted that after submission and fixed it in revision 327655. The fix also improves the invariant.start case which had an analogous problem.