[all-commits] [llvm/llvm-project] 7fbfcc: [LV/LAA] Use PSE to identify stride multiplies whi...
Philip Reames via All-commits
all-commits at lists.llvm.org
Thu May 11 11:16:19 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7fbfcc653f372aed37f81ec0ca4bb2b0ee90a9f4
https://github.com/llvm/llvm-project/commit/7fbfcc653f372aed37f81ec0ca4bb2b0ee90a9f4
Author: Philip Reames <preames at rivosinc.com>
Date: 2023-05-11 (Thu, 11 May 2023)
Changed paths:
M llvm/include/llvm/Analysis/LoopAccessAnalysis.h
M llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
M llvm/lib/Analysis/LoopAccessAnalysis.cpp
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Log Message:
-----------
[LV/LAA] Use PSE to identify stride multiplies which simplify [mostly nfc]
LV/LAA will speculate that (some) strided access patterns have unit stride, and insert runtime checks if required.
LV cost models a multiply by such a stride as free. We did this by keeping around the StrideSet structure, just to check if one of the operands were one of the strides we speculated.
We can instead just ask PredicatedScalarEvolution if either of the operands are one (after predicates are applied). We get mostly the same result - PSE can prove it in more cases in theory - and simpler code.
More information about the All-commits
mailing list