summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMScheduleA9.td
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-03-26 02:01:42 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-03-26 02:01:42 +0000
commita5dbe29ff54ce5bb3aecefc7d42af6f31bd7e903 (patch)
treeae211cbdf5b6d26fd20bf5b1a71e0810ef574566 /lib/Target/ARM/ARMScheduleA9.td
parent1b618f8848c1fe672ea32009a27322e48bca46f2 (diff)
downloadllvm-a5dbe29ff54ce5bb3aecefc7d42af6f31bd7e903.tar.gz
llvm-a5dbe29ff54ce5bb3aecefc7d42af6f31bd7e903.tar.bz2
llvm-a5dbe29ff54ce5bb3aecefc7d42af6f31bd7e903.tar.xz
ARM Scheduler Model: Add resources instructions, map resources in subtargets
Move the CortexA9 resources into the CortexA9 SchedModel namespace. Define resource mappings under the CortexA9 SchedModel. Define resources and mappings for the SwiftModel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMScheduleA9.td')
-rw-r--r--lib/Target/ARM/ARMScheduleA9.td19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMScheduleA9.td b/lib/Target/ARM/ARMScheduleA9.td
index 4191931a5a..cec20b1462 100644
--- a/lib/Target/ARM/ARMScheduleA9.td
+++ b/lib/Target/ARM/ARMScheduleA9.td
@@ -1898,6 +1898,8 @@ def CortexA9Model : SchedMachineModel {
//===----------------------------------------------------------------------===//
// Define each kind of processor resource and number available.
+let SchedModel = CortexA9Model in {
+
def A9UnitALU : ProcResource<2>;
def A9UnitMul : ProcResource<1> { let Super = A9UnitALU; }
def A9UnitAGU : ProcResource<1>;
@@ -2003,13 +2005,6 @@ foreach NumCycles = 2-8 in {
def A9WriteCycle#NumCycles : WriteSequence<[A9WriteCycle1], NumCycles>;
} // foreach NumCycles
-// Define TII for use in SchedVariant Predicates.
-def : PredicateProlog<[{
- const ARMBaseInstrInfo *TII =
- static_cast<const ARMBaseInstrInfo*>(SchedModel->getInstrInfo());
- (void)TII;
-}]>;
-
// Define address generation sequences and predicates for 8 flavors of LDMs.
foreach NumAddr = 1-8 in {
@@ -2279,7 +2274,6 @@ def A9Read4 : SchedReadAdvance<3>;
// This table follows the ARM Cortex-A9 Technical Reference Manuals,
// mostly in order.
-let SchedModel = CortexA9Model in {
def :ItinRW<[A9WriteI], [IIC_iMOVi,IIC_iMOVr,IIC_iMOVsi,
IIC_iMVNi,IIC_iMVNsi,
@@ -2486,4 +2480,13 @@ def :ItinRW<[A9WriteV9, A9Read3, A9Read2], [IIC_VMACD, IIC_VFMACD]>;
def :ItinRW<[A9WriteV10, A9Read3, A9Read2], [IIC_VMACQ, IIC_VFMACQ]>;
def :ItinRW<[A9WriteV9, A9Read2, A9Read2], [IIC_VRECSD]>;
def :ItinRW<[A9WriteV10, A9Read2, A9Read2], [IIC_VRECSQ]>;
+
+// New (incomplete) model mappings that don't rely on itinerary mappings.
+def : SchedAlias<WriteALU, A9WriteA>;
+def : SchedAlias<WriteALUsi, A9WriteAsi>;
+def : SchedAlias<WriteALUsr, A9WriteAsr>;
+def : SchedAlias<WriteALUSsr, A9WriteAsr>;
+def : SchedAlias<ReadAdvanceALU, A9ReadA>;
+def : SchedAlias<ReadAdvanceALUsr, A9ReadA>;
+
} // SchedModel = CortexA9Model