[llvm] [Analysis] Remove global state from `PluginInline{Advisor,Order}Analysis`. (PR #114615)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 11:26:20 PST 2024


aeubanks wrote:

I see some comments at https://github.com/llvm/llvm-project/blob/5005f8d2486d6eec7b2b8ae04f49e8a87ebf4bf6/llvm/include/llvm/Analysis/InlineAdvisor.h#L241 about adding a pass to register an analysis. Is there any reason we can't just register the analysis directly with [`PassBuilder::registerAnalysisRegistrationCallback`](https://github.com/llvm/llvm-project/blob/5005f8d2486d6eec7b2b8ae04f49e8a87ebf4bf6/llvm/include/llvm/Passes/PassBuilder.h#L548) in `llvmGetPassPluginInfo`? that seems like it'd solve your issue IIUC?

https://github.com/llvm/llvm-project/pull/114615


More information about the llvm-commits mailing list