Skip to content

[Codegen] Change getSpillSize/getReloadSize to LocationSize. NFC #82636

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

Merged
merged 1 commit into from
Feb 25, 2024

Conversation

davemgreen
Copy link
Collaborator

This is a small part of #70452, attempting to take a small simpler part of it in isolation to simplify what remains. It changes the getSpillSize, getFoldedSpillSize, getRestoreSize and getFoldedRestoreSize methods to return optional instead of unsigned. The code is intended to be the same, keeping the optional to specify when there was no size found, with some minor adjustments to make sure that unknown (~UINT64_C(0)) sizes are handled sensibly. Hopefully as more unsigned's are converted to LocationSize's the use of ~UINT64_C(0) can be cleaned up too.

This is a small part of llvm#70452, attempting to take a small simpler part of it
in isolation to simplify what remains.  It changes the getSpillSize,
getFoldedSpillSize, getRestoreSize and getFoldedRestoreSize methods to return
optional<LocationSize> instead of unsigned. The code is intended to be the
same, with some minor adjustments to make sure that unknown (~UINT64_C(0))
sizes are handled correctly. Hopefully as more unsigned's are converted to
LocationSize's the use of ~UINT64_C(0) can be cleaned up too.
@harviniriawan
Copy link
Contributor

LGTM

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

Looks fine to me, but I'm not really familiar with this code.

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

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

LGTM

@davemgreen davemgreen merged commit d6ded91 into llvm:main Feb 25, 2024
@davemgreen davemgreen deleted the gh-locsize-spillsize branch February 25, 2024 16:23
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.

4 participants