[all-commits] [llvm/llvm-project] 7abe34: [LSR] Improve filtered uses in NarrowSearchSpaceBy...
David Green via All-commits
all-commits at lists.llvm.org
Thu Feb 16 07:48:25 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7abe3497e72af3ddee789dfc62c63a981a25dbf6
https://github.com/llvm/llvm-project/commit/7abe3497e72af3ddee789dfc62c63a981a25dbf6
Author: David Green <david.green at arm.com>
Date: 2023-02-16 (Thu, 16 Feb 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
M llvm/test/CodeGen/Thumb/arm_q15_to_q31.ll
Log Message:
-----------
[LSR] Improve filtered uses in NarrowSearchSpaceByPickingWinnerRegs
NarrowSearchSpaceByPickingWinnerRegs has an aggressive filtering method to
reduce the complexity of the search space down by picking a best formula with
the highest number of reuses and assuming it will yield profitable reuse. In
certain cases we can find a best formula like {X+30,+,1} and later check a
formula like {X,+,1} with the same number of Uses. On some architectures it
can be better to pick {X,+,1}, especially if an offset of 30 can be used as a
legal addressing mode, but -30 cannot. That happens under Thumb1 code, which
has fairly limited addressing modes. This patch adds a check to see if it can
pick the simpler formula, if it looks more profitable.
Differential Revision: https://reviews.llvm.org/D144014
More information about the All-commits
mailing list