[PATCH] D98976: [CodeGen] Use ProcResGroup information in SchedBoundary

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 02:38:53 PDT 2021


andreadb added a comment.

In D98976#2684092 <https://reviews.llvm.org/D98976#2684092>, @dpenry wrote:

> In D98976#2682694 <https://reviews.llvm.org/D98976#2682694>, @RKSimon wrote:
>
>> I'm not sure this avoids the criticisms from D94604 <https://reviews.llvm.org/D94604> - we have resource groups and the child resource units, and we can control the width of both of these to model usage each cycle.
>>
>> But for starters, I'd like to see tests of some kind (llvm-mca timeline or whatever you prefer) that clearly shows the issue you think you're encountering.
>
> The issue comes when using resource groups with BufferSize = 0 -- MachineScheduler just doesn't care about the group indicating a parallel use of resources, though from the discussion in D94604 <https://reviews.llvm.org/D94604>, it seems clear that this is what resource groups are intended to model.  It hasn't shown up as an issue before because resource groups with BufferSize = 0 haven't been used before D98977 <https://reviews.llvm.org/D98977> (which tries to use resource groups in the CortexM7 scheduling model instead of directly using multiple copies of a resource, as code comments indicate that using a resource twice for an in-order model is supposed to mean using it over multiple cycles.)
>
> Some sort of test showing the change in scheduling outcomes is a good idea and I'll come up with something.

This patch doesn't look right to me. I share the same concerns as Simon.

How resource cycles are contributed by individual units of a group has nothing to do with the value of BufferSize.
I don't understand why you think it should make a difference.

A BufferSize of zero simply means that the dispatch event must coincide with the issue event. In the absence of a buffer, opcodes are forced to be sent immediately for execution to the underlying resource units. Basically, there is no delayed execution, and resource consumption starts immediately. It doesn't say anything about how and which units are selected for execution.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98976



More information about the llvm-commits mailing list