[PATCH] D93929: [NewPM][Hexagon] Fix HexagonVectorLoopCarriedReusePass position in pipeline
Ankit via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 16:55:23 PST 2021
quic_aankit added a comment.
Aah Right. I remember now
In D93929#2485807 <https://reviews.llvm.org/D93929#2485807>, @aeubanks wrote:
> In D93929#2485715 <https://reviews.llvm.org/D93929#2485715>, @quic_aankit wrote:
>
>> @asbirlea I remember that HexagonVLCR pass has a dependency on LCSSA and LoopSimplifyPass. Is there any way we can run these passes too at LoopOptimizerEndEP? If not maybe use another EP for legacy PM? I'm not sure if the below code would run these passes in the correct order as well
>>
>> PB.registerOptimizerLastEPCallback(
>> [=](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
>> LoopPassManager LPM(DebugPassManager);
>> FunctionPassManager FPM(DebugPassManager);
>> LPM.addPass(HexagonVectorLoopCarriedReusePass());
>> FPM.addPass(LoopSimplifyPass());
>> FPM.addPass(LCSSAPass());
>> FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM)));
>> MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
>> });
>>
>> @pranavb Can you comment more on this?
>
> LCSSA should be preserved by all loop passes under the new PM. LCSSA and LoopSimplify are run before any loop pass: https://github.com/llvm/llvm-project/blob/8dddcc762dd98d53b9406b36e92f62502834187c/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h#L406. Although I don't think passes are required preserve loop simplify form.
Got it. In that case, the patch looks good to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93929/new/
https://reviews.llvm.org/D93929
More information about the llvm-commits
mailing list