[llvm] [MCA][ResourceManager] Fix a bug in the instruction issue logic. (PR #108386)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 17:37:49 PDT 2024


================
@@ -428,9 +430,21 @@ class ResourceManager {
   uint64_t getProcResUnitMask() const { return ProcResUnitMask; }
   uint64_t getAvailableProcResUnits() const { return AvailableProcResUnits; }
 
-  void issueInstruction(
-      const InstrDesc &Desc,
-      SmallVectorImpl<std::pair<ResourceRef, ReleaseAtCycles>> &Pipes);
+  using ResourceWithCycles = std::pair<ResourceRef, ReleaseAtCycles>;
+
+  void issueInstruction(const InstrDesc &Desc,
+                        SmallVectorImpl<ResourceWithCycles> &Pipes) {
+    if (Desc.HasPartiallyOverlappingGroups)
+      return issueInstructionImpl(Desc, Pipes);
+
+    return fastIssueInstruction(Desc, Pipes);
+  }
+
+  void fastIssueInstruction(const InstrDesc &Desc,
----------------
michaelmaitland wrote:

It would be nice to document the difference between fastIssueInstruction and issueInstructionImpl

https://github.com/llvm/llvm-project/pull/108386


More information about the llvm-commits mailing list