[llvm] [llvm-mca] Account for AcquireAtCycles in llvm-mca (PR #80742)

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 03:56:48 PST 2024


================
@@ -430,7 +430,7 @@ class ResourceManager {
 
   void issueInstruction(
       const InstrDesc &Desc,
-      SmallVectorImpl<std::pair<ResourceRef, ReleaseAtCycles>> &Pipes);
+      SmallVectorImpl<std::pair<ResourceRef, NumCyclesUsed>> &Pipes);
----------------
adibiagio wrote:

As Michael wrote, this patch doesn't add support for `AcquireAtCycle`.

The difficult part will be refactoring the ResourceManager logic so to keep track of multiple `AcquireAtCycle` requests, and quickly resolve checks on whether resources are busy or not.
Changing that logic might not be too complicated. However, doing it without slowing down the process too much might be challenging.

At the moment, mca doesn't know about the `AcquireAtCycles`, so this will be a problem for future patches.

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


More information about the llvm-commits mailing list