summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2017-05-24 13:42:56 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2017-05-24 13:42:56 +0000
commit8624b7e1cefbfc718bbe4dab10a8eac6fcd7db3b (patch)
treee97d9a9febe3a34ee549699cf9d2854e16f80f39 /llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
parent081b5a1e9d1d483f65936bedab4caf6b555ab3e2 (diff)
downloadbcm5719-llvm-8624b7e1cefbfc718bbe4dab10a8eac6fcd7db3b.tar.gz
bcm5719-llvm-8624b7e1cefbfc718bbe4dab10a8eac6fcd7db3b.zip
[LoopVectorizer] Let target prefer scalar addressing computations.
The loop vectorizer usually vectorizes any instruction it can and then extracts the elements for a scalarized use. On SystemZ, all elements containing addresses must be extracted into address registers (GRs). Since this extraction is not free, it is better to have the address in a suitable register to begin with. By forcing address arithmetic instructions and loads of addresses to be scalar after vectorization, two benefits result: * No need to extract the register * LSR optimizations trigger (LSR isn't handling vector addresses currently) Benchmarking show improvements on SystemZ with this new behaviour. Any other target could try this by returning false in the new hook prefersVectorizedAddressing(). Review: Renato Golin, Elena Demikhovsky, Ulrich Weigand https://reviews.llvm.org/D32422 llvm-svn: 303744
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h b/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
index 3766ed45b8c..ad597f5c65f 100644
--- a/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
+++ b/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
@@ -55,6 +55,7 @@ public:
unsigned getNumberOfRegisters(bool Vector);
unsigned getRegisterBitWidth(bool Vector);
+ bool prefersVectorizedAddressing() { return false; }
bool supportsEfficientVectorElementLoadStore() { return true; }
bool enableInterleavedAccessVectorization() { return true; }
OpenPOWER on IntegriCloud