[all-commits] [llvm/llvm-project] 10da98: [LSR] Drop LSR solution if it is less profitable t...
Yueh-Ting (eop) Chen via All-commits
all-commits at lists.llvm.org
Thu Oct 27 10:14:11 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 10da9844d072df41d3eeeb6f104e2160fc7a2193
https://github.com/llvm/llvm-project/commit/10da9844d072df41d3eeeb6f104e2160fc7a2193
Author: eopXD <yueh.ting.chen at gmail.com>
Date: 2022-10-27 (Thu, 27 Oct 2022)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
A llvm/test/Transforms/LoopStrengthReduce/RISCV/lsr-drop-solution-dbg-msg.ll
M llvm/test/Transforms/LoopStrengthReduce/RISCV/lsr-drop-solution.ll
Log Message:
-----------
[LSR] Drop LSR solution if it is less profitable than baseline
The LSR may suggest less profitable transformation to the loop. This
patch adds check to prevent LSR from generating worse code than what
we already have.
Since LSR affects nearly all targets, the patch is guarded by the
option 'lsr-drop-solution' and default as disable for now.
The next step should be extending an TTI interface to allow target(s)
to enable this enhancememnt.
Debug log is added to remind user of such choice to skip the LSR
solution.
Reviewed By: Meinersbur, #loopoptwg
Differential Revision: https://reviews.llvm.org/D126043
More information about the All-commits
mailing list