[llvm] [Pass] Support start/stop in instrumentation (PR #70912)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 21:48:32 PST 2024
================
@@ -28,6 +28,14 @@ PassInstrumentationCallbacks::getPassNameForClassName(StringRef ClassName) {
return ClassToPassName[ClassName];
}
+StringRef
+PassInstrumentationCallbacks::getClassNameForPassName(StringRef PassName) {
----------------
aeubanks wrote:
rather than adding this reverse map, let's be consistent with existing instrumentation like [here](https://github.com/llvm/llvm-project/blob/b53628a52d1947c51e250d6fa4ff5dd12b737aa0/llvm/lib/Passes/StandardInstrumentations.cpp#L920) where we check the pass name against `PIC->getPassNameForClassName(PassID)` in the callbacks. even if this is slower it doesn't really matter since this is just used for testing iiuc
https://github.com/llvm/llvm-project/pull/70912
More information about the llvm-commits
mailing list