This is an archive of the discontinued LLVM Phabricator instance.

[test][NewPM] Make dead-uses.ll work under NPM
ClosedPublic

Authored by aeubanks on Sep 22 2020, 3:28 PM.

Details

Summary

This one is weird...

globals-aa needs to be already computed at licm, or else a function pass
can't run a module analysis and won't have access to globals-aa.
But the globals-aa result is impacted by instcombine in a way that
affects what the test is expecting. If globals-aa is computed before
instcombine, it is cached and globals-aa used in licm won't contain the
necessary info provided by instcombine.
Another catch is that if we don't invalidate AAManager, it will use the
cached AAManager that instcombine requested, which may not contain
globals-aa. So we have to invalidate<aa> so that licm can recompute
an AAManager with the globals-aa created by the require<globals-aa>.

This is essentially the problem described in https://reviews.llvm.org/D84259.

Diff Detail

Event Timeline

aeubanks created this revision.Sep 22 2020, 3:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 22 2020, 3:28 PM
aeubanks requested review of this revision.Sep 22 2020, 3:28 PM
asbirlea accepted this revision.Oct 5 2020, 10:51 PM

This is fine if we really want to keep this test. I'm not sure we'll see this type of expected behavior in typical pipeline, but I guess this can be used as model for how to achieve something like this.

This revision is now accepted and ready to land.Oct 5 2020, 10:51 PM
This revision was automatically updated to reflect the committed changes.