Skip to content

Commit

Permalink
[AArch64][Falkor] Fix some sched details.
Browse files Browse the repository at this point in the history
- Remove all uses of base sched model entries and set them all to
  Unsupported so all the opcodes are described in
  AArch64SchedFalkorDetails.td.
- Remove entries for unsupported half-float opcodes.
- Remove entries for unsupported LSE extension opcodes.
- Add entry for MOVbaseTLS (and set Sched in base td file entry to
  WriteSys) and a few other pseudo ops.
- Fix a few FP load/store with reg offset entries to use the LSLfast
  predicates.
- Add Q size BIF/BIT/BSL entries.
- Fix swapped Q/D sized CLS/CLZ/CNT/RBIT entires.
- Fix pre/post increment address register latency (this operand is
  always dest 0).
- Fix swapped FCVTHD/FCVTHS/FCVTDH/FCVTDS entries.
- Fix XYZ resource over usage on LD[1-4] opcodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304108 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
geoffberry committed May 28, 2017
1 parent 7193e15 commit d2258e4
Show file tree
Hide file tree
Showing 4 changed files with 461 additions and 294 deletions.
2 changes: 1 addition & 1 deletion lib/Target/AArch64/AArch64InstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def MSRpstateImm4 : MSRpstateImm0_15;
// TPIDR_EL0. Add pseudo op so we can mark it as not having any side effects.
let hasSideEffects = 0 in
def MOVbaseTLS : Pseudo<(outs GPR64:$dst), (ins),
[(set GPR64:$dst, AArch64threadpointer)]>, Sched<[]>;
[(set GPR64:$dst, AArch64threadpointer)]>, Sched<[WriteSys]>;

// The cycle counter PMC register is PMCCNTR_EL0.
let Predicates = [HasPerfMon] in
Expand Down
86 changes: 36 additions & 50 deletions lib/Target/AArch64/AArch64SchedFalkor.td
Original file line number Diff line number Diff line change
Expand Up @@ -61,56 +61,42 @@ let SchedModel = FalkorModel in {

let SchedModel = FalkorModel in {

def : WriteRes<WriteImm, [FalkorUnitXYZ]> { let Latency = 1; }
def : WriteRes<WriteI, [FalkorUnitXYZ]> { let Latency = 1; }
def : WriteRes<WriteISReg, [FalkorUnitVXVY, FalkorUnitVXVY]>
{ let Latency = 1; let NumMicroOps = 2; }
def : WriteRes<WriteIEReg, [FalkorUnitXYZ, FalkorUnitXYZ]>
{ let Latency = 2; let NumMicroOps = 2; }
def : WriteRes<WriteExtr, [FalkorUnitXYZ, FalkorUnitXYZ]>
{ let Latency = 2; let NumMicroOps = 2; }
def : WriteRes<WriteIS, [FalkorUnitXYZ]> { let Latency = 1; }
def : WriteRes<WriteID32, [FalkorUnitX, FalkorUnitZ]>
{ let Latency = 8; let NumMicroOps = 2; }
def : WriteRes<WriteID64, [FalkorUnitX, FalkorUnitZ]>
{ let Latency = 16; let NumMicroOps = 2; }
def : WriteRes<WriteIM32, [FalkorUnitX]> { let Latency = 4; }
def : WriteRes<WriteIM64, [FalkorUnitX]> { let Latency = 5; }
def : WriteRes<WriteBr, [FalkorUnitB]> { let Latency = 1; }
def : WriteRes<WriteBrReg, [FalkorUnitB]> { let Latency = 1; }
def : WriteRes<WriteLD, [FalkorUnitLD]> { let Latency = 3; }
def : WriteRes<WriteST, [FalkorUnitST, FalkorUnitSD]>
{ let Latency = 0; let NumMicroOps = 2; }
def : WriteRes<WriteSTP, [FalkorUnitST, FalkorUnitSD]>
{ let Latency = 0; let NumMicroOps = 2; }
def : WriteRes<WriteAdr, [FalkorUnitXYZ]> { let Latency = 1; }
def : WriteRes<WriteLDIdx, [FalkorUnitLD]> { let Latency = 5; }
def : WriteRes<WriteSTIdx, [FalkorUnitST, FalkorUnitSD]>
{ let Latency = 0; let NumMicroOps = 2; }
def : WriteRes<WriteF, [FalkorUnitVXVY, FalkorUnitVXVY]>
{ let Latency = 3; let NumMicroOps = 2; }
def : WriteRes<WriteFCmp, [FalkorUnitVXVY]> { let Latency = 2; }
def : WriteRes<WriteFCvt, [FalkorUnitVXVY]> { let Latency = 4; }
def : WriteRes<WriteFCopy, [FalkorUnitVXVY]> { let Latency = 4; }
def : WriteRes<WriteFImm, [FalkorUnitVXVY]> { let Latency = 4; }
def : WriteRes<WriteFMul, [FalkorUnitVXVY, FalkorUnitVXVY]>
{ let Latency = 6; let NumMicroOps = 2; }
def : WriteRes<WriteFDiv, [FalkorUnitVXVY, FalkorUnitVXVY]>
{ let Latency = 12; let NumMicroOps = 2; } // Fragent -1 / NoRSV +1
def : WriteRes<WriteV, [FalkorUnitVXVY]> { let Latency = 6; }
def : WriteRes<WriteVLD, [FalkorUnitLD]> { let Latency = 3; }
def : WriteRes<WriteVST, [FalkorUnitST, FalkorUnitVSD]>
{ let Latency = 0; let NumMicroOps = 2; }

def : WriteRes<WriteSys, []> { let Latency = 1; }
def : WriteRes<WriteBarrier, []> { let Latency = 1; }
def : WriteRes<WriteHint, []> { let Latency = 1; }

def : WriteRes<WriteLDHi, []> { let Latency = 3; }

def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }

// No forwarding logic is modelled yet.
// 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.
def : ReadAdvance<ReadI, 0>;
def : ReadAdvance<ReadISReg, 0>;
def : ReadAdvance<ReadIEReg, 0>;
Expand Down
Loading

0 comments on commit d2258e4

Please sign in to comment.