This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Make some sanitizer passes parameterized in the PassRegistry
ClosedPublic

Authored by bjope on Jun 28 2021, 2:26 AM.

Details

Summary

Refactored implementation of AddressSanitizerPass and
HWAddressSanitizerPass to use pass options similar to passes like
MemorySanitizerPass. This makes sure that there is a single mapping
from class name to pass name (needed by D108298), and options like
-debug-only and -print-after makes a bit more sense when (despite
that it is the unparameterized pass name that should be used in those
options).

A result of the above is that some pass names are removed in favor
of the parameterized versions:

  • "khwasan" is now "hwasan<kernel;recover>"
  • "kasan" is now "asan<kernel>"
  • "kmsan" is now "msan<kernel>"

Diff Detail

Event Timeline

bjope created this revision.Jun 28 2021, 2:26 AM
bjope requested review of this revision.Jun 28 2021, 2:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2021, 2:26 AM
phosek added inline comments.Jun 28 2021, 11:45 AM
llvm/lib/Passes/PassRegistry.def
64

Should this be kernel?

bjope updated this revision to Diff 354999.Jun 28 2021, 12:54 PM

Corrected spelling of "kernel".

bjope edited the summary of this revision. (Show Details)Jun 28 2021, 12:54 PM
bjope added inline comments.
llvm/lib/Passes/PassRegistry.def
64

Yes, thanks!

this seems like a halfway solution, we should go the full distance and make these all *_PASS_WITH_PARAMS

or if these aren't even being used in tests, just delete them

bjope updated this revision to Diff 357204.Jul 8 2021, 6:22 AM

Rebased.

bjope updated this revision to Diff 367263.Aug 18 2021, 11:10 AM

Updated to use _PASS_WITH_PARAMS and option parsing.

Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2021, 11:10 AM
bjope retitled this revision from [NewPM] Update some sanitizer pass names in the PassRegistry to [NewPM] Make some sanitizer passes parameterized in the PassRegistry.Aug 18 2021, 11:13 AM
bjope edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Aug 18 2021, 11:14 AM
This revision was landed with ongoing or failed builds.Aug 19 2021, 3:44 AM
This revision was automatically updated to reflect the committed changes.