]> granicus.if.org Git - llvm/commit
[LSR] Generate cross iteration indexes
authorSam Parker <sam.parker@arm.com>
Thu, 7 Feb 2019 13:32:54 +0000 (13:32 +0000)
committerSam Parker <sam.parker@arm.com>
Thu, 7 Feb 2019 13:32:54 +0000 (13:32 +0000)
commitd0c143de76255379185e6741c8106355d61c4142
tree7f6dd7d52816044eaf57b727ccfae844b32c7a92
parentf118c99457ae1bf45b4b109f9e6e9ba06dfef1aa
[LSR] Generate cross iteration indexes

Modify GenerateConstantOffsetsImpl to create offsets that can be used
by indexed addressing modes. If formulae can be generated which
result in the constant offset being the same size as the recurrence,
we can generate a pre-indexed access. This allows the pointer to be
updated via the single pre-indexed access so that (hopefully) no
add/subs are required to update it for the next iteration. For small
cores, this can significantly improve performance DSP-like loops.

Differential Revision: https://reviews.llvm.org/D55373

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353403 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
lib/Analysis/TargetTransformInfo.cpp
lib/Target/ARM/ARMTargetTransformInfo.h
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/CodeGen/ARM/dsp-loop-indexing.ll [new file with mode: 0644]
test/CodeGen/ARM/loop-align-cortex-m.ll
test/CodeGen/ARM/loop-indexing.ll [new file with mode: 0644]
test/Transforms/LoopStrengthReduce/ARM/complexity.ll