[PATCH] D146283: [Passes] Add PassBuilderContext

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 11:07:57 PDT 2023


aeubanks added a comment.

I've thought about doing this a couple of times, thanks for bring this up

I've had the thought that perhaps PassInstrumentation plus all the analysis managers should just be in PassBuilder itself (instead of a separate wrapper around PassBuilder), WDYT?



================
Comment at: llvm/include/llvm/Passes/PassBuilder.h:712
+struct PassBuilderContext {
+  PassInstrumentationCallbacks PIC;
+  PassBuilder PB;
----------------
nikic wrote:
> Not entirely sure whether PassInstrumentationCallbacks should be part of this or not. This is mostly used in conjunction with StandardInstrumentations, so maybe it doesn't belong here.
I think it does belong here, and I'd even by default add StandardInstrumentations.

there's the issue that optnone handling is done in StandardInstrumentations, which honestly is pretty bad since users don't have to register StandardInstrumentations (that's my bad from when I just joined). maybe PassInstrumentation should by default register StandardInstrumentations


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

https://reviews.llvm.org/D146283



More information about the llvm-commits mailing list