[PATCH] D90365: [Debugify] Port -debugify-each to NewPM

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 10:53:11 PDT 2020


aeubanks added a comment.

Thanks for looking into this!

I was previously worried that modifying the IR in pass instrumentation would be bad, but maybe it's ok? The biggest thing I was worried about was unintentionally invalidating analyses, but it looks like both debugify passes preserve all analyses, so it might be ok.

I'm not so sure of moving the flags into Debugify.cpp since they are debugging tools, but I'm not 100% against it.

DebugifyEachInstrumentation should probably be part of StandardInstrumentations so that all users of StandardInstrumentations will get it for free (tying into moving the flags to not be opt-specific). DebugifyEachInstrumentation::registerCallbacks can check if DebugifyEach is set or not to determine whether or not to actually register callbacks, which is cleaner than checking in NewPMDriver.cpp.



================
Comment at: llvm/test/DebugInfo/debugify-export.ll:1
-; RUN: opt < %s -debugify-each -debugify-quiet -debugify-export - -o /dev/null | FileCheck %s
+; RUN: opt < %s -debugify-each -debugify-quiet -debugify-export - -enable-new-pm=1 -o /dev/null | FileCheck %s
 
----------------
We should keep the legacy PM RUN line since its implementation is so different. Then use regex to check that we're running a verifier pass.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90365/new/

https://reviews.llvm.org/D90365



More information about the llvm-commits mailing list