[PATCH] D144970: [llvm-c] Remove bindings for creating legacy passes

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 09:19:44 PST 2023


aeubanks accepted this revision.
aeubanks added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Transforms/IPO/IPO.cpp:33
 
 void LLVMInitializeIPO(LLVMPassRegistryRef R) {
   initializeIPO(*unwrap(R));
----------------
nikic wrote:
> aeubanks wrote:
> > nikic wrote:
> > > aeubanks wrote:
> > > > all of these initialize functions should also be deleted (everything in Initialization.h)
> > > Isn't it necessary to still call initialization functions for passes used in the codegen pipeline?
> > `LLVMInitializeIPO` (and others) are part of the C API, which as mentioned in the description can't be used for the codegen pipeline. We'll still keep around `llvm::initializeIPO` above. Actually we should just delete `LLVMPassRegistryRef` altogether
> I'm referring to users of the codegen pipeline here. Is it not necessary to initialize codegen passes before using the codegen pipeline? Or is it only necessary if you want to refer to passes by name?
Ah I missed that there are C APIs to run the codegen pipeline.

I believe initialization is only necessary for functionality around names (e.g. for debugging), but yeah pass constructors typically initialize themselves.


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

https://reviews.llvm.org/D144970



More information about the llvm-commits mailing list