[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 09:39:47 PDT 2021


andreadb added a comment.

>> In MachineScheduler, BufferSize = 0 means more than just dispatch = issue. I don't know if this is what was intended originally, but it's certainly what's in the code. Only resources with BufferSize = 0 are "reserved" resources. ReservedCycles is only updated for these resources Thus, if BufferSize <> 0, the consumption is *not* tracked on a cycle-by-cycle basis. This is not anything I have changed; if it doesn't make sense, it hasn't made sense for a long time.

Thanks for clarifying this particular aspect. I was under the (wrong) impression that resource consumption was always updated regardless of whether BufferSize was 0 or not.
Since that is not the case, then your patch definitely makes more sense. Presumably, the algorithm was just trying to be very conservative, not making any sort of assumptions on the issue cycles in the presence of buffered resources. That indeed limits the ability to track resources; tracking is effectively limited to in-order dispatch/issue resources only.

Based on your last comment, my understanding is that CortexM7 is the only model really affected by this change.
I have only skimmed through the code, but it sounds reasonable overall.
@dmgreen would you be happy with this change?


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