[llvm] [llvm][loop-rotate] Allow forcing loop-rotation (PR #82828)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 20:45:25 PST 2024


hiraditya wrote:

loop rotation enables other optimizations like DCE and LICM and in many cases it reduces the code size. We could potentially have a cost model where we can disable loop rotation if the cloned-blocks are greater than certain size. 

However, modifying loop-idiom to detect unrotated loops will result in a lot of duplicated work and only benefit the loops that are recognized in llvm (which aren't that many). Also unrotated loops come in many forms (for, while, gotos, inlined recursive calls, etc.)

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


More information about the llvm-commits mailing list