Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consecutive registers #77072

Closed
wants to merge 23 commits into from

Conversation

kunalspathak
Copy link
Member

Just a draft to see if things so far are smooth.

Add interval_2 class and use it throughout.
This is a zero diff change.
This change helps in consolidating various methods to take `Referenceable*` as parameter instead
of child classes `Interval*` or `RegRecord*`. With that, it will be possible to have a common
logic in those methods that will check how many registers to process based upon either the information
of `regCount` in `Interval` class or `regCount` in `RegRecord` class.

Also splitted updateAssignedInterval() in `updateAssignedInterval()` that operates when `interval != nullptr`
and `clearAssignedInterval()`.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 15, 2022
@ghost ghost assigned kunalspathak Oct 15, 2022
@ghost
Copy link

ghost commented Oct 15, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Just a draft to see if things so far are smooth.

Author: kunalspathak
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

…te in batch.

At some places, we do things at individual register level. They used to take `RegRecord*`
and we would operate on the register. They will never have type other than `TYP_INT` / `TYP_FLOAT`.
However, the `Interval` can have a `registerType` that represents the type of the variable it
represents. So we separate the methods that operate on registers in the ones that does things
on single register (and hence takes `RegRecord*`) and the ones that can operate on more than
one registers (and hence takes `Interval*`).
Also add few methods that just updates the updateNextIntervalRef(), updateSpillCost()
as well as methods to get the firstRegister() of the series.
In earlier commits, I consolidated these 2 methods taking `Referenceable*` but proper
way to do is split in overloaded method. One set takes `Interval*` and operates on the
type of `Interval*` while the other set operates at individual `register` level.
@ghost ghost closed this Nov 27, 2022
@ghost
Copy link

ghost commented Nov 27, 2022

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

1. Added template for unassignPhysReg<bool consecutiveRegisters>. Places from when consecutiveRegisters=true, that
   means unassignPhysReg() should reset the series of registers. If consecutiveRegisters=false, it will just operate
   on single register.
2. Refactored lot of methods around `clearAssignedIntervalForConflict()`, `restorePreviousInterval()`, unassignPhysReg.
@kunalspathak kunalspathak reopened this Dec 3, 2022
@ghost ghost closed this Jan 2, 2023
@ghost
Copy link

ghost commented Jan 2, 2023

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 1, 2023
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant