I'm currently attempting to port the AddressSanitizer pass from the
legacy pass manager infrastructure to the new one and wanted to know
if there was an equivalent method to know if there were equivalent
doInitialization and doFinalization functions used by the new PM.
All the passes in the new PM that I can find seem to just implement
the corresponding `run` method but I can't find any examples of passes
that do some sort of initialization/cleanup before and after all
no there is no equivalent for that.
As Philip said, there is no corresponding functionality in new PM.
I would like to add that while we were porting our downstream passes for our JIT
compiler we found that every single attempt to do something nontrivial in
initialization/finalization was in fact rather misplaced.
Nothing precludes you to initialize extra stuff upon a first call to a pass
just there in 'run' method.
In one case we even refactored the code to remove the pass that was doing
nontrivial initialization since we figured that it is not a pass at all