aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorValery N Dmitriev <valery.n.dmitriev@intel.com>2022-04-25 12:25:33 -0700
committerValery N Dmitriev <valery.n.dmitriev@intel.com>2022-04-25 12:25:33 -0700
commit88b9e46fb54c5321742d16016be5b2920facc018 (patch)
treefb642dfc9f98df68bbb1ce018b28ea287d8fcd5d /llvm/lib/CodeGen/LiveDebugVariables.cpp
parent6035649d4c763dab83376484c5fe515c2469a1bb (diff)
downloadllvm-88b9e46fb54c5321742d16016be5b2920facc018.zip
llvm-88b9e46fb54c5321742d16016be5b2920facc018.tar.gz
llvm-88b9e46fb54c5321742d16016be5b2920facc018.tar.bz2
[SLP] Steer for the best chance in tryToVectorize() when rooting with binary ops.
tryToVectorize() method implements one of searching paths for vectorizable tree roots in SLP vectorizer, specifically for binary and comparison operations. Order of making probes for various scalar pairs was defined by its implementation: the instruction operands, then climb over one operand if the instruction is its sole user and then perform same actions for another operand if previous attempts failed. Problem with this approach is that among these options we can have more than a single vectorizable tree candidate and it is not necessarily the one that encountered first. Trying to build vectorizable tree for each possible combination for just evaluation is expensive. But we already have lookahead heuristics mechanism which we use for finding best pick among operands of commutative instructions. It calculates cumulative score for candidates in two consecutive lanes. This patch introduces use of the heuristics for choosing the best pair among several combinations. We only try one that looks as most promising for vectorization. Additional benefit is that we reduce total number of vectorization trees built for probes because we skip those looking non-profitable early. Reviewed By: Alexey Bataev (ABataev), Vasileios Porpodas (vporpo) Differential Revision: https://reviews.llvm.org/D124309
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions