llvm-project/llvm/tools/opt
Craig Topper d85e347a28 [RISCV] Add a pass to recognize VLS strided loads/store from gather/scatter.
For strided accesses the loop vectorizer seems to prefer creating a
vector induction variable with a start value of the form
<i32 0, i32 1, i32 2, ...>. This value will be incremented each
loop iteration by a splat constant equal to the length of the vector.
Within the loop, arithmetic using splat values will be done on this
vector induction variable to produce indices for a vector GEP.

This pass attempts to dig through the arithmetic back to the phi
to create a new scalar induction variable and a stride. We push
all of the arithmetic out of the loop by folding it into the start,
step, and stride values. Then we create a scalar GEP to use as the
base pointer for a strided load or store using the computed stride.
Loop strength reduce will run after this pass and can do some
cleanups to the scalar GEP and induction variable.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D107790
2021-09-20 09:39:44 -07:00
..
AnalysisWrappers.cpp [llvm][NFC][CallSite] Removed CallSite from some implementation details. 2020-04-15 22:27:05 -07:00
BreakpointPrinter.cpp
BreakpointPrinter.h
CMakeLists.txt Speculative fix for build breakage from D78403 2020-05-14 23:57:22 -04:00
GraphPrinters.cpp
NewPMDriver.cpp [NPM] Added opt option -print-pipeline-passes. 2021-09-02 08:23:33 +02:00
NewPMDriver.h [Coroutines] Run coroutine passes by default 2021-07-15 14:33:40 +08:00
PassPrinters.cpp [opt] Remove obsolete --quiet option 2020-07-08 13:21:20 -07:00
PassPrinters.h [opt] Remove obsolete --quiet option 2020-07-08 13:21:20 -07:00
PrintSCC.cpp [PrintSCC] Fix printing a basic-block without a name 2020-05-29 20:14:19 +03:00
opt.cpp [RISCV] Add a pass to recognize VLS strided loads/store from gather/scatter. 2021-09-20 09:39:44 -07:00