This is an archive of the discontinued LLVM Phabricator instance.

[NFC] [HWASan] Remove indirection for getting analyses.
ClosedPublic

Authored by fmayer on Jun 15 2022, 3:57 PM.

Details

Summary

This was necessary for code reuse between the old and new passmanager.
With the old pass-manager gone, this is no longer necessary.

Diff Detail

Event Timeline

fmayer created this revision.Jun 15 2022, 3:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 3:57 PM
fmayer requested review of this revision.Jun 15 2022, 3:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 3:57 PM

Gentle ping.

myhsu added a subscriber: myhsu.Jun 21 2022, 1:52 PM

Mostly LG. Just curious if the analysis results would be invalidated between GetDT/GetPDT calls (in the original code)?

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
262

Could you use FunctionAnalysisManager instead and drop the "llvm::" prefix.

1344–1345

ditto

myhsu added a reviewer: myhsu.Jun 21 2022, 1:52 PM
fmayer updated this revision to Diff 438832.Jun 21 2022, 2:13 PM
fmayer marked 2 inline comments as done.

address comments.

Mostly LG. Just curious if the analysis results would be invalidated between GetDT/GetPDT calls (in the original code)?

No, we only invalidate all analyses at the end of the pass if we did any changes, by returning PreservedAnalyses::none(). Nothing within the pass manually invalidates analyses.

myhsu accepted this revision.Jun 22 2022, 9:18 AM

Nice! LGTM

This revision is now accepted and ready to land.Jun 22 2022, 9:18 AM
This revision was landed with ongoing or failed builds.Jun 22 2022, 10:53 AM
This revision was automatically updated to reflect the committed changes.