[PATCH] D144970: [llvm-c] Remove bindings for creating legacy passes
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 14:12:02 PST 2023
nikic added inline comments.
================
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 guess this is not necessary because passes call their own initialization function in their constructor (or at least that seems to be the convention), so they should get automatically initialized if created via the C++ API, rather than by name.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144970/new/
https://reviews.llvm.org/D144970
More information about the llvm-commits
mailing list