[llvm] [AMDGPU][TTI] Threshold bonus to loops whose unrolling makes nested loops unrollable (PR #114579)
Lucas Ramirez via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 03:02:17 PST 2024
lucas-rami wrote:
Thank you both for the fast review and comments.
> I would expect this to be in the generic unroll logic, and not in this backend hook
Should I move this to the target-independent logic then? If so it seems that the [`analyzeLoopUnrollCost` function](https://github.com/llvm/llvm-project/blob/e28d7f713471cf33908a0fe5223f480dfd9b06f0/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp#L354-L358) would be the most meaningful place to incorporate this in, but the analysis is guarded by a check that the loop under consideration is [an innermost loop](https://github.com/llvm/llvm-project/blob/e28d7f713471cf33908a0fe5223f480dfd9b06f0/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp#L368-L369), and I am guessing we don't want to change that. What do you think?
https://github.com/llvm/llvm-project/pull/114579
More information about the llvm-commits
mailing list