[PATCH] D136736: [LSR][TTI][RISCV] Add isAllowDropLSRSolution into TTI and enable it for RISC-V
Yueh-Ting (eop) Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 13:27:26 PDT 2022
eopXD added a comment.
@dmgreen Thank you for giving this a look. My understanding to LSR matches yours. The filtering happens after all interesting variations were generated, and the filtering does not necessarily preserves the original ones, which motivates this patch of considering the LSR derived solution to the original existing one. My main motivation was from `RISCV/lsr-drop-solution.ll`, which the original LSR suggestion does make a worse transformation than the original unchanged IR. This patch is an amendment that comes from the fallacy in filtering.
On the other hand (since it looks like you also have given a decent trace to the code), the current LLVM LSR implementation is not documented anywhere, nor cited from an existing paper. As mentioned, incorrect pruning (filtering) will have us fall into some local minimum. Has anyone every questioned the validity of the current implemented filtering heuristics and considers a different approach?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136736/new/
https://reviews.llvm.org/D136736
More information about the llvm-commits
mailing list