[PATCH] D102136: [NewPM] Add C bindings for new pass manager

Mats Larsen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 9 11:09:28 PDT 2021


supergrecko added a comment.

Not quite sure how we want to register the StandardInstrumentations here... Right now it's not registering any PassInstrumentationCallbacks at all because I'm not too sure how we wanted to handle that either.

StandardInstrumentations::registerCallbacks takes the FunctionAnalysisManager which means we'd need to have the FunctionAnalysisManager instance at the time the StandardInstrumentation is registered. Not sure how to move forward here. Let me know what you think.



================
Comment at: llvm/lib/Passes/PassBuilderBindings.cpp:63
+  MPM.run(*Mod, MAM);
+  LLVMDisposePassBuilder(PB);
+  return LLVMErrorSuccess;
----------------
I made the choice to dispose of the PassBuilder once you've run it over a module because we're setting up a whole bunch of things like AnalysisManagers (and thus changing the underlying PB) based on the Debug and VerifyEach parameters which could be different if the client was to call LLVMRunpassBuilder again. Let me know if you believe this is wrong.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102136



More information about the llvm-commits mailing list