madhur13490 wrote:

> > What do you think is the right place in pass pipeline?
> 
> I don't know, but just a gut feeling, somewhere in 
> `buildModuleOptimizationPipeline` looks reasonable to me rather than 
> `buildFunctionSimplificationPipeline`. However, again, it should be 
> determined by what you'd like to achieve with loop fusion.
> 
> FWIW: recently I moved the loop interchange pass from the simplification 
> pipeline into the optimization pipeline in #145502. I did so more due to the 
> drawbacks of having it in the simplification pipeline than any particular 
> advantages of placing it in the optimization pipeline. I also confirmed that 
> the number of interchanged loops barely changed after the move. However, I 
> found that it triggered potential phase ordering issues after merging it (in 
> my case, some other passes like GVN/LICM can transform the IR into a form 
> that makes interchange difficult). I believe this should be handled inside 
> LoopInterchange itself, but it's worth noting that (I think) it's not an 
> uncommon situation.
> 
> (That said, if you don’t have any specific motivating examples at the moment, 
> I suppose any placement may be fine).

Yeah, I don't have enough data to support the right place in the pipeline. I 
will add `FIXME` in the code now. Right now, it is added before the other loop 
passes (like LoopInstSimplify, LoopSimplify etc.) are added in LPM. 

https://github.com/llvm/llvm-project/pull/142686
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to