Skip to content

Conversation

@mshockwave
Copy link
Member

In both ScheduleDAGInstrs and MachineScheduler, we call BufferSize = 0 as reserved and BufferSize = 1 as unbuffered. This convention is stem from the fact that we set SUnit::hasReservedResource to true when any of the SUnit's consumed resources has BufferSize equal to zero; set SUnit::isUnbuffered to true when any of its consumed resources has BufferSize equal to one.

However, SchedBoundary::isUnbufferedGroup doesn't really follow this convention: it returns true when the resource in question is a ProcResGroup and its BufferSize equals to zero rather than one. This could be really confusing for the reader. This patch renames this function to isReservedGroup in aligned with the convention mentioned above.

NFC.

@mshockwave mshockwave added the mi-sched machine instruction scheduler label Nov 4, 2025
@mshockwave mshockwave requested a review from arsenm November 4, 2025 23:48
@mshockwave mshockwave merged commit 6d4e75c into llvm:main Nov 5, 2025
11 of 12 checks passed
@mshockwave mshockwave deleted the patch/misched-rename-unbuffered-group branch November 5, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:codegen mi-sched machine instruction scheduler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants