[llvm] [RISCV] Add software pipeliner support (PR #117546)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 23:06:04 PST 2024


kasuga-fj wrote:

Hi. I am working on `MachinePipeliner` for AArch64 with the author of #79598. I would like to comment on our thoughts regarding MachinePipeliner.

First, we don't think it's worthwhile for all loops. As @mshockwave mentioned, OoO is sufficient in many cases. However, there are cases where it is not enough due to HW resource limitations, for example, a loop with long a dependence chain. Our ultimate goal is to apply software pipelining only to such loops and we are now considering introducing a pragma directive to enable software pipelining to specific loops. Therefore, I don't know much about RISCV, but I agree that it should be disabled by default. 

Also, there are some correctness issues in `MachinePipeliner`. The dependence analysis inside the pass is one of them, and we are now working on fixing it now (ref: #109918). Any comments or suggestions would be appreciated!

Finally, in our experience, Modulo Variable Expansion (#65609) tends to generate efficient code, especially when we cannot ignore the cost of register-to-register instructions, which are generated by default module scheduler. We have to implement some virtual functions for `RISCVPipelinerLoopInfo`, but I think it's worth a try.

https://github.com/llvm/llvm-project/pull/117546


More information about the llvm-commits mailing list