This is an archive of the discontinued LLVM Phabricator instance.

[DSE] Don't eagerly optimize MemorySSA uses
ClosedPublic

Authored by aeubanks on Jun 12 2023, 12:25 PM.

Diff Detail

Event Timeline

aeubanks created this revision.Jun 12 2023, 12:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 12:25 PM
aeubanks requested review of this revision.Jun 12 2023, 12:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 12:25 PM

Can you please explain in more detail what the relation to D152743 is here?

With optimized uses, here in some cases we'd see more uses of a MemoryUse and this would imprecisely return Ref instead of NoModRef. I think it's because this bypasses the logic in D152743, but I didn't double check that

example where this happened

fhahn added a comment.Jun 13 2023, 2:48 AM

Looking at the compiler-time tracker link, there are some codegen changes. Do you know where those are coming from and if we could avoid regressions?

nikic added a comment.Jun 13 2023, 4:05 AM

Looking at the compiler-time tracker link, there are some codegen changes. Do you know where those are coming from and if we could avoid regressions?

I think some codegen changes are expected, because DSE walks over uses, and this will mean that more "irrelevant" uses are visited that count towards the scan limit. The MemorySSAScanLimit is fairly generous at 150 accesses, so it's probably okay in practice, though we could also raise the limit if this causes performance regressions.

nikic accepted this revision.Jun 21 2023, 6:41 AM

LGTM, assuming you did not see any perf regression from this.

This revision is now accepted and ready to land.Jun 21 2023, 6:41 AM
This revision was landed with ongoing or failed builds.Jul 6 2023, 2:10 PM
This revision was automatically updated to reflect the committed changes.