[llvm] [llvm-mca] Account for AcquireAtCycles in llvm-mca (PR #80742)
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 29 07:54:00 PST 2024
================
@@ -89,11 +89,11 @@ static void initializeUsedResources(InstrDesc &ID,
AllInOrderResources &= (PR.BufferSize <= 1);
}
- CycleSegment RCy(0, PRE->ReleaseAtCycle, false);
+ CycleSegment RCy(PRE->AcquireAtCycle, PRE->ReleaseAtCycle, false);
----------------
adibiagio wrote:
> I missed your comment above. I think your point is that we need to be able to do this without slowing things down too much. I have a rough idea on how me might do this in my head, but I am not sure when I will have time to pick this task back up again, since it is much less straightforward than I had for the original patch.
No problem. It is something that I always wanted to do in my spare time but never ended up doing.
Redesigning the ResourceManager is definitely not straightforward; the simulation time is heavily dependent on how quickly it replies to individual dispatch/issue requests.
It won't be easy to find a design which doesn't hurt performance too much. In the end we will inevitably have to compromise a bit between simulation speed and simulation accuracy. That is expected.
The complexity of the new design also depends on how many pending CycleSegments can be "issued" for every resource. I am mainly thinking about out-of-order processors where multiple delayed resource consumptions can be pending at the same time. Not sure if that makes sense...
https://github.com/llvm/llvm-project/pull/80742
More information about the llvm-commits
mailing list