2016-11-30 04:00:27 +08:00
|
|
|
//==- AArch64SchedFalkor.td - Falkor Scheduling Definitions -*- tablegen -*-==//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines the machine model for Qualcomm Falkor to support
|
|
|
|
// instruction scheduling and other instruction cost heuristics.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Define the SchedMachineModel and provide basic properties for coarse grained
|
|
|
|
// instruction cost model.
|
|
|
|
|
|
|
|
def FalkorModel : SchedMachineModel {
|
2017-04-08 11:30:15 +08:00
|
|
|
let IssueWidth = 8; // 8 uops are dispatched per cycle.
|
2016-11-30 04:00:27 +08:00
|
|
|
let MicroOpBufferSize = 128; // Out-of-order with temporary unified issue buffer.
|
|
|
|
let LoopMicroOpBufferSize = 16;
|
|
|
|
let LoadLatency = 3; // Optimistic load latency.
|
|
|
|
let MispredictPenalty = 11; // Minimum branch misprediction penalty.
|
2017-03-13 18:42:17 +08:00
|
|
|
let CompleteModel = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Define each kind of processor resource and number available on Falkor.
|
|
|
|
|
|
|
|
let SchedModel = FalkorModel in {
|
|
|
|
|
|
|
|
def FalkorUnitB : ProcResource<1>; // Branch
|
|
|
|
def FalkorUnitLD : ProcResource<1>; // Load pipe
|
|
|
|
def FalkorUnitSD : ProcResource<1>; // Store data
|
|
|
|
def FalkorUnitST : ProcResource<1>; // Store pipe
|
|
|
|
def FalkorUnitX : ProcResource<1>; // Complex arithmetic
|
|
|
|
def FalkorUnitY : ProcResource<1>; // Simple arithmetic
|
|
|
|
def FalkorUnitZ : ProcResource<1>; // Simple arithmetic
|
|
|
|
|
|
|
|
def FalkorUnitVSD : ProcResource<1>; // Vector store data
|
|
|
|
def FalkorUnitVX : ProcResource<1>; // Vector X-pipe
|
|
|
|
def FalkorUnitVY : ProcResource<1>; // Vector Y-pipe
|
|
|
|
|
2017-04-05 02:42:14 +08:00
|
|
|
def FalkorUnitGTOV : ProcResource<1>; // Scalar to Vector
|
|
|
|
def FalkorUnitVTOG : ProcResource<1>; // Vector to Scalar
|
|
|
|
|
2017-03-13 18:42:17 +08:00
|
|
|
// Define the resource groups.
|
2017-04-05 02:42:14 +08:00
|
|
|
def FalkorUnitXY : ProcResGroup<[FalkorUnitX, FalkorUnitY]>;
|
2017-03-13 18:42:17 +08:00
|
|
|
def FalkorUnitXYZ : ProcResGroup<[FalkorUnitX, FalkorUnitY, FalkorUnitZ]>;
|
|
|
|
def FalkorUnitXYZB : ProcResGroup<[FalkorUnitX, FalkorUnitY, FalkorUnitZ,
|
|
|
|
FalkorUnitB]>;
|
|
|
|
def FalkorUnitZB : ProcResGroup<[FalkorUnitZ, FalkorUnitB]>;
|
|
|
|
def FalkorUnitVXVY : ProcResGroup<[FalkorUnitVX, FalkorUnitVY]>;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Map the target-defined scheduler read/write resources and latency for
|
|
|
|
// Falkor.
|
|
|
|
|
|
|
|
let SchedModel = FalkorModel in {
|
|
|
|
|
2017-05-29 05:48:31 +08:00
|
|
|
// These WriteRes entries are not used in the Falkor sched model.
|
|
|
|
def : WriteRes<WriteImm, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteI, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteISReg, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteIEReg, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteExtr, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteIS, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteID32, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteID64, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteIM32, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteIM64, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteBr, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteBrReg, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteLD, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteST, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteSTP, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteAdr, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteLDIdx, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteSTIdx, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteF, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteFCmp, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteFCvt, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteFCopy, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteFImm, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteFMul, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteFDiv, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteV, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteVLD, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteVST, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteSys, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteBarrier, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteHint, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteLDHi, []> { let Unsupported = 1; }
|
|
|
|
def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }
|
|
|
|
|
|
|
|
// These ReadAdvance entries are not used in the Falkor sched model.
|
2017-03-13 18:42:17 +08:00
|
|
|
def : ReadAdvance<ReadI, 0>;
|
|
|
|
def : ReadAdvance<ReadISReg, 0>;
|
|
|
|
def : ReadAdvance<ReadIEReg, 0>;
|
|
|
|
def : ReadAdvance<ReadIM, 0>;
|
|
|
|
def : ReadAdvance<ReadIMA, 0>;
|
|
|
|
def : ReadAdvance<ReadID, 0>;
|
|
|
|
def : ReadAdvance<ReadExtrHi, 0>;
|
|
|
|
def : ReadAdvance<ReadAdrBase, 0>;
|
|
|
|
def : ReadAdvance<ReadVLD, 0>;
|
|
|
|
|
2017-03-25 12:02:39 +08:00
|
|
|
// Detailed Refinements
|
2017-03-13 18:42:17 +08:00
|
|
|
// -----------------------------------------------------------------------------
|
2017-03-25 12:02:39 +08:00
|
|
|
include "AArch64SchedFalkorDetails.td"
|
2017-03-13 18:42:17 +08:00
|
|
|
|
2016-11-30 04:00:27 +08:00
|
|
|
}
|