[NewPM] Make some sanitizer passes parameterized in the PassRegistry
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Mon, 28 Jun 2021 09:16:40 +0000 (11:16 +0200)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Thu, 19 Aug 2021 10:43:37 +0000 (12:43 +0200)
commit36d51386195e3d606e0d40495f1135ab180bd6ae
treef32e054d5c426c281bbf8416e33f0d63e33809a2
parent23b16d245382c1a6a7423ed8a67ad620046fff63
[NewPM] Make some sanitizer passes parameterized in the PassRegistry

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>"

Differential Revision: https://reviews.llvm.org/D105007
clang/lib/CodeGen/BackendUtil.cpp
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/tools/opt/NewPMDriver.cpp