Legacy passes are only supported for codegen, and I don't believe it's possible to write backends using the C API, so we should drop all of those. Reduces the number of places that need to be modified when removing legacy passes.
Details
Diff Detail
Unit Tests
Event Timeline
llvm/lib/Transforms/IPO/IPO.cpp | ||
---|---|---|
33 | all of these initialize functions should also be deleted (everything in Initialization.h) |
llvm/lib/Transforms/IPO/IPO.cpp | ||
---|---|---|
33 | Isn't it necessary to still call initialization functions for passes used in the codegen pipeline? |
llvm/lib/Transforms/IPO/IPO.cpp | ||
---|---|---|
33 | 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 |
llvm/lib/Transforms/IPO/IPO.cpp | ||
---|---|---|
33 | 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? |
llvm/lib/Transforms/IPO/IPO.cpp | ||
---|---|---|
33 | 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. |
llvm/lib/Transforms/IPO/IPO.cpp | ||
---|---|---|
33 | 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. |
at least some of these stuff is used by wasm-micro-runtime. do you have a suggestion about how to adapt it?
https://github.com/bytecodealliance/wasm-micro-runtime/blob/72fc872afe9a51228b2a32bc7b08475b176f187f/core/iwasm/compilation/aot_compiler.c#L2666-L2670
all of these initialize functions should also be deleted (everything in Initialization.h)