[AArch64] Enable partial & runtime unrolling on cortex-a57.
[oota-llvm.git] / lib / Target / AArch64 / AArch64TargetTransformInfo.cpp
index dbdf199a25cc4fb452adc95eee566f87a052530b..b1a2914236babcdfc55e6addd6dcee31938f7bdb 100644 (file)
@@ -128,6 +128,10 @@ public:
 
   unsigned getCostOfKeepingLiveOverCall(ArrayRef<Type*> Tys) const override;
 
+  void getUnrollingPreferences(const Function *F, Loop *L,
+                               UnrollingPreferences &UP) const override;
+
+
   /// @}
 };
 
@@ -544,3 +548,9 @@ unsigned AArch64TTI::getMaxInterleaveFactor() const {
     return 4;
   return 2;
 }
+
+void AArch64TTI::getUnrollingPreferences(const Function *F, Loop *L,
+                                         UnrollingPreferences &UP) const {
+  // Disable partial & runtime unrolling on -Os.
+  UP.PartialOptSizeThreshold = 0;
+}