AArch64SchedFalkor.td 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. //==- AArch64SchedFalkor.td - Falkor Scheduling Definitions -*- tablegen -*-==//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file defines the machine model for Qualcomm Falkor to support
  10. // instruction scheduling and other instruction cost heuristics.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //===----------------------------------------------------------------------===//
  14. // Define the SchedMachineModel and provide basic properties for coarse grained
  15. // instruction cost model.
  16. def FalkorModel : SchedMachineModel {
  17. let IssueWidth = 8; // 8 uops are dispatched per cycle.
  18. let MicroOpBufferSize = 128; // Out-of-order with temporary unified issue buffer.
  19. let LoopMicroOpBufferSize = 16;
  20. let LoadLatency = 3; // Optimistic load latency.
  21. let MispredictPenalty = 11; // Minimum branch misprediction penalty.
  22. let CompleteModel = 1;
  23. list<Predicate> UnsupportedFeatures = !listconcat(SVEUnsupported.F,
  24. PAUnsupported.F,
  25. SMEUnsupported.F,
  26. [HasMTE]);
  27. // FIXME: Remove when all errors have been fixed.
  28. let FullInstRWOverlapCheck = 0;
  29. }
  30. //===----------------------------------------------------------------------===//
  31. // Define each kind of processor resource and number available on Falkor.
  32. let SchedModel = FalkorModel in {
  33. def FalkorUnitB : ProcResource<1>; // Branch
  34. def FalkorUnitLD : ProcResource<1>; // Load pipe
  35. def FalkorUnitSD : ProcResource<1>; // Store data
  36. def FalkorUnitST : ProcResource<1>; // Store pipe
  37. def FalkorUnitX : ProcResource<1>; // Complex arithmetic
  38. def FalkorUnitY : ProcResource<1>; // Simple arithmetic
  39. def FalkorUnitZ : ProcResource<1>; // Simple arithmetic
  40. def FalkorUnitVSD : ProcResource<1>; // Vector store data
  41. def FalkorUnitVX : ProcResource<1>; // Vector X-pipe
  42. def FalkorUnitVY : ProcResource<1>; // Vector Y-pipe
  43. def FalkorUnitGTOV : ProcResource<1>; // Scalar to Vector
  44. def FalkorUnitVTOG : ProcResource<1>; // Vector to Scalar
  45. // Define the resource groups.
  46. def FalkorUnitXY : ProcResGroup<[FalkorUnitX, FalkorUnitY]>;
  47. def FalkorUnitXYZ : ProcResGroup<[FalkorUnitX, FalkorUnitY, FalkorUnitZ]>;
  48. def FalkorUnitXYZB : ProcResGroup<[FalkorUnitX, FalkorUnitY, FalkorUnitZ,
  49. FalkorUnitB]>;
  50. def FalkorUnitZB : ProcResGroup<[FalkorUnitZ, FalkorUnitB]>;
  51. def FalkorUnitVXVY : ProcResGroup<[FalkorUnitVX, FalkorUnitVY]>;
  52. }
  53. //===----------------------------------------------------------------------===//
  54. // Map the target-defined scheduler read/write resources and latency for
  55. // Falkor.
  56. let SchedModel = FalkorModel in {
  57. // These WriteRes entries are not used in the Falkor sched model.
  58. def : WriteRes<WriteImm, []> { let Unsupported = 1; }
  59. def : WriteRes<WriteI, []> { let Unsupported = 1; }
  60. def : WriteRes<WriteISReg, []> { let Unsupported = 1; }
  61. def : WriteRes<WriteIEReg, []> { let Unsupported = 1; }
  62. def : WriteRes<WriteExtr, []> { let Unsupported = 1; }
  63. def : WriteRes<WriteIS, []> { let Unsupported = 1; }
  64. def : WriteRes<WriteID32, []> { let Unsupported = 1; }
  65. def : WriteRes<WriteID64, []> { let Unsupported = 1; }
  66. def : WriteRes<WriteIM32, []> { let Unsupported = 1; }
  67. def : WriteRes<WriteIM64, []> { let Unsupported = 1; }
  68. def : WriteRes<WriteBr, []> { let Unsupported = 1; }
  69. def : WriteRes<WriteBrReg, []> { let Unsupported = 1; }
  70. def : WriteRes<WriteLD, []> { let Unsupported = 1; }
  71. def : WriteRes<WriteST, []> { let Unsupported = 1; }
  72. def : WriteRes<WriteSTP, []> { let Unsupported = 1; }
  73. def : WriteRes<WriteAdr, []> { let Unsupported = 1; }
  74. def : WriteRes<WriteLDIdx, []> { let Unsupported = 1; }
  75. def : WriteRes<WriteSTIdx, []> { let Unsupported = 1; }
  76. def : WriteRes<WriteF, []> { let Unsupported = 1; }
  77. def : WriteRes<WriteFCmp, []> { let Unsupported = 1; }
  78. def : WriteRes<WriteFCvt, []> { let Unsupported = 1; }
  79. def : WriteRes<WriteFCopy, []> { let Unsupported = 1; }
  80. def : WriteRes<WriteFImm, []> { let Unsupported = 1; }
  81. def : WriteRes<WriteFMul, []> { let Unsupported = 1; }
  82. def : WriteRes<WriteFDiv, []> { let Unsupported = 1; }
  83. def : WriteRes<WriteVd, []> { let Unsupported = 1; }
  84. def : WriteRes<WriteVq, []> { let Unsupported = 1; }
  85. def : WriteRes<WriteVLD, []> { let Unsupported = 1; }
  86. def : WriteRes<WriteVST, []> { let Unsupported = 1; }
  87. def : WriteRes<WriteSys, []> { let Unsupported = 1; }
  88. def : WriteRes<WriteBarrier, []> { let Unsupported = 1; }
  89. def : WriteRes<WriteHint, []> { let Unsupported = 1; }
  90. def : WriteRes<WriteLDHi, []> { let Unsupported = 1; }
  91. def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }
  92. // These ReadAdvance entries are not used in the Falkor sched model.
  93. def : ReadAdvance<ReadI, 0>;
  94. def : ReadAdvance<ReadISReg, 0>;
  95. def : ReadAdvance<ReadIEReg, 0>;
  96. def : ReadAdvance<ReadIM, 0>;
  97. def : ReadAdvance<ReadIMA, 0>;
  98. def : ReadAdvance<ReadID, 0>;
  99. def : ReadAdvance<ReadExtrHi, 0>;
  100. def : ReadAdvance<ReadAdrBase, 0>;
  101. def : ReadAdvance<ReadVLD, 0>;
  102. def : ReadAdvance<ReadST, 0>;
  103. // Detailed Refinements
  104. // -----------------------------------------------------------------------------
  105. include "AArch64SchedFalkorDetails.td"
  106. }