[PATCH] D66810: [Tblgen][MCA] Add the ability to mark groups as LoadQueue and StoreQueue. NFCI

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 11:30:00 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2f51a43f8c2b: [Tblgen][MCA] Add the ability to mark groups as LoadQueue and StoreQueue. NFCI (authored by andreadb).
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

Changed prior to commit:
  https://reviews.llvm.org/D66810?vs=217431&id=217447#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66810/new/

https://reviews.llvm.org/D66810

Files:
  llvm/include/llvm/Target/TargetSchedule.td
  llvm/lib/MCA/HardwareUnits/LSUnit.cpp


Index: llvm/lib/MCA/HardwareUnits/LSUnit.cpp
===================================================================
--- llvm/lib/MCA/HardwareUnits/LSUnit.cpp
+++ llvm/lib/MCA/HardwareUnits/LSUnit.cpp
@@ -29,12 +29,12 @@
     const MCExtraProcessorInfo &EPI = SM.getExtraProcessorInfo();
     if (!LQSize && EPI.LoadQueueID) {
       const MCProcResourceDesc &LdQDesc = *SM.getProcResource(EPI.LoadQueueID);
-      LQSize = LdQDesc.BufferSize;
+      LQSize = std::max(0, LdQDesc.BufferSize);
     }
 
     if (!SQSize && EPI.StoreQueueID) {
       const MCProcResourceDesc &StQDesc = *SM.getProcResource(EPI.StoreQueueID);
-      SQSize = StQDesc.BufferSize;
+      SQSize = std::max(0, StQDesc.BufferSize);
     }
   }
 }
Index: llvm/include/llvm/Target/TargetSchedule.td
===================================================================
--- llvm/include/llvm/Target/TargetSchedule.td
+++ llvm/include/llvm/Target/TargetSchedule.td
@@ -563,10 +563,10 @@
 
 // Base class for Load/StoreQueue.  It is used to identify processor resources
 // which describe load/store queues in the LS unit.
-class MemoryQueue<ProcResource PR> {
-  ProcResource QueueDescriptor = PR;
+class MemoryQueue<ProcResourceKind PR> {
+  ProcResourceKind QueueDescriptor = PR;
   SchedMachineModel SchedModel = ?;
 }
 
-class LoadQueue<ProcResource LDQueue> : MemoryQueue<LDQueue>;
-class StoreQueue<ProcResource STQueue> : MemoryQueue<STQueue>;
+class LoadQueue<ProcResourceKind LDQueue> : MemoryQueue<LDQueue>;
+class StoreQueue<ProcResourceKind STQueue> : MemoryQueue<STQueue>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66810.217447.patch
Type: text/x-patch
Size: 1553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190827/2fe46033/attachment.bin>


More information about the llvm-commits mailing list