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

Remove the OperandConstraint::Stack variant #185

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

elliottt
Copy link
Member

Following on from the removal of safepoints, remove the OperandConstraint::Stack and Requirement::Stack enum variants, as there's no longer any way to construct them.

Co-authored-by: Nick Fitzgerald [email protected]

@elliottt elliottt requested a review from cfallin August 30, 2024 17:54
Also remove the Requirement::Stack case, as there is no longer a
constraint that can produce it.

Co-authored-by: Nick Fitzgerald <[email protected]>
@elliottt elliottt force-pushed the trevor/remove-stack-constraints branch from ef52ef4 to aa994ad Compare August 30, 2024 18:31
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

) {
debug_assert!(spill_weight <= BUNDLE_MAX_SPILL_WEIGHT);
self.spill_weight_and_props = spill_weight
| (if minimal { 1 << 31 } else { 0 })
| (if fixed { 1 << 30 } else { 0 })
| (if fixed_def { 1 << 29 } else { 0 })
| (if stack { 1 << 28 } else { 0 });
| (if fixed_def { 1 << 29 } else { 0 });
Copy link
Member

Choose a reason for hiding this comment

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

Since we get bit 28 back here can we update BUNDLE_MAX_SPILL_WEIGHT as well (so the saturation point moves a little further out, leading to maybe slightly better alloc in deeply nested loops)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Great idea!

@elliottt elliottt merged commit abdc3d6 into main Aug 30, 2024
6 checks passed
@fitzgen fitzgen deleted the trevor/remove-stack-constraints branch August 30, 2024 22:06
elliottt added a commit that referenced this pull request Sep 11, 2024
Fix a fuzzbug introduced in #185 where we missed updating a mask after
also updating a constant indicating that the bit was no longer used.
This PR fixes the bug by using the appropriate constant when masking,
and also removing some additional functions that were missed in #185.

co-authored-by: Chris Fallin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants