summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorEvandro Menezes <e.menezes@samsung.com>2016-08-16 20:34:58 +0000
committerEvandro Menezes <e.menezes@samsung.com>2016-08-16 20:34:58 +0000
commitd03aff2e11c5407a2bfdf712e8a697db013fde3f (patch)
tree09a7f26969d71cd114f62ac54dbaa5d114318076 /llvm/lib/Target
parent7f19298bfa908aa7b7862840f9acda8627133cdb (diff)
downloadbcm5719-llvm-d03aff2e11c5407a2bfdf712e8a697db013fde3f.tar.gz
bcm5719-llvm-d03aff2e11c5407a2bfdf712e8a697db013fde3f.zip
[AArch64] Adjust the scheduling model for Exynos M1.
Refine the model for the integer division unit. llvm-svn: 278845
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AArch64/AArch64SchedM1.td18
1 files changed, 11 insertions, 7 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64SchedM1.td b/llvm/lib/Target/AArch64/AArch64SchedM1.td
index 2288b8dfc22..8a8c6d14233 100644
--- a/llvm/lib/Target/AArch64/AArch64SchedM1.td
+++ b/llvm/lib/Target/AArch64/AArch64SchedM1.td
@@ -32,6 +32,7 @@ def ExynosM1Model : SchedMachineModel {
def M1UnitA : ProcResource<2>; // Simple integer
def M1UnitC : ProcResource<1>; // Simple and complex integer
+def M1UnitD : ProcResource<1>; // Integer division (inside C, serialized)
def M1UnitB : ProcResource<2>; // Branch
def M1UnitL : ProcResource<1>; // Load
def M1UnitS : ProcResource<1>; // Store
@@ -41,7 +42,7 @@ def M1PipeF1 : ProcResource<1>; // FP #1
let Super = M1PipeF0 in {
def M1UnitFMAC : ProcResource<1>; // FP multiplication
def M1UnitFCVT : ProcResource<1>; // FP conversion
- def M1UnitNAL0 : ProcResource<1>; // Simple vector.
+ def M1UnitNAL0 : ProcResource<1>; // Simple vector
def M1UnitNMISC : ProcResource<1>; // Miscellanea
def M1UnitNCRYPT : ProcResource<1>; // Cryptographic
}
@@ -50,15 +51,15 @@ let Super = M1PipeF1 in {
def M1UnitFADD : ProcResource<1>; // Simple FP
let BufferSize = 1 in
def M1UnitFVAR : ProcResource<1>; // FP division & square root (serialized)
- def M1UnitNAL1 : ProcResource<1>; // Simple vector.
+ def M1UnitNAL1 : ProcResource<1>; // Simple vector
def M1UnitFST : ProcResource<1>; // FP store
}
let SchedModel = ExynosM1Model in {
def M1UnitALU : ProcResGroup<[M1UnitA,
- M1UnitC]>; // All simple integer.
+ M1UnitC]>; // All integer
def M1UnitNALU : ProcResGroup<[M1UnitNAL0,
- M1UnitNAL1]>; // All simple vector.
+ M1UnitNAL1]>; // All simple vector
}
let SchedModel = ExynosM1Model in {
@@ -83,9 +84,12 @@ def : WriteRes<WriteIS, [M1UnitALU]> { let Latency = 1; }
def : WriteRes<WriteImm, [M1UnitALU]> { let Latency = 1; }
// Divide and multiply instructions.
-// TODO: Division blocks the divider inside C.
-def : WriteRes<WriteID32, [M1UnitC]> { let Latency = 13; }
-def : WriteRes<WriteID64, [M1UnitC]> { let Latency = 21; }
+def : WriteRes<WriteID32, [M1UnitC,
+ M1UnitD]> { let Latency = 13;
+ let ResourceCycles = [1, 13]; }
+def : WriteRes<WriteID64, [M1UnitC,
+ M1UnitD]> { let Latency = 21;
+ let ResourceCycles = [1, 21]; }
// TODO: Long multiplication take 5 cycles and also the ALU.
// TODO: Multiplication with accumulation can be advanced.
def : WriteRes<WriteIM32, [M1UnitC]> { let Latency = 3; }
OpenPOWER on IntegriCloud