Skip to content

[AsmParser] Support non-consecutive global value numbers #80013

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
Jan 31, 2024

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Jan 30, 2024

#78171 added support for non-consecutive local value numbers. This extends the support for global value numbers (for globals and functions).

This means that it is now possible to delete an unnamed global definition/declaration without breaking the IR.

This is a lot less common than unnamed local values, but it seems like something we should support for consistency. (Unnamed globals are used a lot in Rust though.)

@nikic nikic requested review from fhahn, nhaehnle and dtcxzyw January 30, 2024 14:50
@nikic nikic changed the title [AsmParser] Supprt non-consecutive global value numbers [AsmParser] Support non-consecutive global value numbers Jan 30, 2024
Copy link

github-actions bot commented Jan 30, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

llvm#78171 added support for
local value numbers to have gaps. This extends the support for
global value numbers (for globals and functions).

This means that it is now possible to delete an unnamed global
definition/declaration without breaking the IR.

This is a lot less common than unnamed local values, but it seems
like something we should support for consistency. (Unnamed globals
are also common in rustc IR).
Copy link
Collaborator

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

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

LGTM

@nikic nikic merged commit f2df4bf into llvm:main Jan 31, 2024
@nikic nikic deleted the unnamed-globals branch January 31, 2024 16:04
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