[AArch64] Enable partial & runtime unrolling on cortex-a57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219401 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kevin Qin 2014-10-09 10:13:27 +00:00
parent 06f1f357e3
commit f73400a864
2 changed files with 14 additions and 0 deletions

View File

@ -26,6 +26,10 @@ def CortexA57Model : SchedMachineModel {
let MicroOpBufferSize = 128; // 128 micro-op re-order buffer
let LoadLatency = 4; // Optimistic load latency
let MispredictPenalty = 14; // Fetch + Decode/Rename/Dispatch + Branch
// Enable partial & runtime unrolling. The magic number is chosen based on
// experiments and benchmarking data.
let LoopMicroOpBufferSize = 16;
}
//===----------------------------------------------------------------------===//

View 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;
}