This matches the legacy PM's EP_ModuleOptimizerEarly. Some backends use
this extension point and adding the pass somewhere else like
PipelineStartEPCallback doesn't work.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
FWIW, could we keep naming it ModuleOptimizerEarlyEPCallback? That sounds pretty intuitive to me and reminds users of the old name. Is the renaming for using the prefix Pipeline?
ModuleOptimizerEarly is sort of a relic of the legacy PM. The legacy PassManagerBuilder has a populateFunctionPassManager() for cleaning up input IR and populateModulePassManager() for the real pipeline, but there's no equivalent of populateFunctionPassManager() in the NPM. So the ModuleOptimizer part of ModuleOptimizerEarlyEPCallback wouldn't make sense IMO.
I will agree that the name I chose could be better named, but still unsure of anything better.
I don't think "ModuleOptimizer" in the name makes sense, the association can come from the "Early" part. Either keep the naming as is, or "EarlyAfterStart" if you want to define order against the other callbacks.
ychen@ so you have a better naming suggestion?
Having a second look, yeah, I agree that "ModuleOptimizer" in the name does not make sense. Early is also vague about where it is called. How about just ModuleSimplificationEPCallback?