[llvm] r216141 - [LoopVectorize] Up the maximum unroll factor to 4 for AArch64
James Molloy
james.molloy at arm.com
Wed Aug 20 17:02:51 PDT 2014
Author: jamesm
Date: Wed Aug 20 19:02:51 2014
New Revision: 216141
URL: http://llvm.org/viewvc/llvm-project?rev=216141&view=rev
Log:
[LoopVectorize] Up the maximum unroll factor to 4 for AArch64
Only for Cortex-A57 and Cyclone for now, where it has shown wins.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp?rev=216141&r1=216140&r2=216141&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp Wed Aug 20 19:02:51 2014
@@ -104,7 +104,7 @@ public:
return 64;
}
- unsigned getMaximumUnrollFactor() const override { return 2; }
+ unsigned getMaximumUnrollFactor() const override;
unsigned getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) const
override;
@@ -513,3 +513,9 @@ unsigned AArch64TTI::getCostOfKeepingLiv
}
return Cost;
}
+
+unsigned AArch64TTI::getMaximumUnrollFactor() const {
+ if (ST->isCortexA57() || ST->isCyclone())
+ return 4;
+ return 2;
+}
More information about the llvm-commits
mailing list