Adding function pass inside registerLoopOptimizerEndEPCallback

Hello,

I’m trying to modify a pass using the new pass manager. I’ve the following question.

The pass is a LoopPass (Transformation pass) and needs the IR to be in LCSSA form and has LCSSA and LoopSimplify pass as dependencies.

I’m using the PassBuilder to add this pass at EP_LoopOptimizerEnd using the registerLoopOptimizerEndEPCallback API. Is it possible to run LCSSA and LoopSimplify pass at EP_LoopOptimizerEnd given that these two are function passes and not loop passes? If not, can I be sure that the IR at EP_LoopOptimizerEnd will be in LCSSA form?

Regards

Ankit