[llvm] Redesign Straight-Line Strength Reduction (SLSR) (PR #162930)
Akshay Deodhar via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 17 13:37:08 PDT 2025
================
@@ -177,22 +203,154 @@ class StraightLineStrengthReduce {
// Points to the immediate basis of this candidate, or nullptr if we cannot
// find any basis for this candidate.
Candidate *Basis = nullptr;
+
+ DKind DeltaKind = InvalidDelta;
+
+ // Store SCEV of Stride to compute delta from different strides
+ const SCEV *StrideSCEV = nullptr;
+
+ // Points to (Y - X) that will be used to rewrite this candidate.
+ Value *Delta = nullptr;
+
+ /// Cost model: Evaluate the computational efficiency of the candidate.
+ ///
+ /// Efficiency levels (higher is better):
----------------
akshayrdeodhar wrote:
Maybe have an enum here instead of raw values?
https://github.com/llvm/llvm-project/pull/162930
More information about the llvm-commits
mailing list