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

cranelift: Only set VReg type once #8479

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

jameysharp
Copy link
Contributor

We know the type of each VReg at the moment when we allocate it, so we never need to set the type again. That also means we don't need to deduplicate reftyped VRegs as we go, although it's still possible to have duplicates after aliases are resolved.

This PR and #8469 remove the only two uses of FxHashSet in vcode.rs, so whichever one lands second needs to also delete the use item for that type or it'll introduce a new unused-import warning.

@jameysharp jameysharp requested a review from a team as a code owner April 25, 2024 21:29
@jameysharp jameysharp requested review from elliottt and removed request for a team April 25, 2024 21:29
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:machinst Issues related to instruction selection and the new MachInst backend. labels Apr 25, 2024
We know the type of each VReg at the moment when we allocate it, so we
never need to set the type again. That also means we don't need to
deduplicate reftyped VRegs as we go, although it's still possible to
have duplicates after aliases are resolved.
@jameysharp
Copy link
Contributor Author

Since #8469 landed I've rebased this PR.

Copy link
Member

@elliottt elliottt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@jameysharp jameysharp added this pull request to the merge queue Apr 26, 2024
Merged via the queue into bytecodealliance:main with commit b130763 Apr 26, 2024
21 checks passed
@jameysharp jameysharp deleted the set-vreg-type-once branch April 26, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:machinst Issues related to instruction selection and the new MachInst backend. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants