Skip to content

[BOLT][NFC] Refactor relocation arch selection #87829

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
Apr 8, 2024

Conversation

urnathan
Copy link
Contributor

@urnathan urnathan commented Apr 5, 2024

Having these routines default to x86_64 and just process reloc numbers as if they are for that arch is fragile when porting BOLT. This converts these routines to use switches with an explicitly marked unreachable default case.

I considered the alternative of having x86_64 being the default, with an assert on Arch there, but thought this way is clearer.

@urnathan urnathan marked this pull request as ready for review April 5, 2024 21:12
@maksfb maksfb added the BOLT label Apr 5, 2024
Copy link
Contributor

@maksfb maksfb left a comment

Choose a reason for hiding this comment

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

Thanks! Could you please add "[BOLT][NFC]" to the title?

@urnathan urnathan changed the title [bolt] Refactor relocation arch selection [BOLT][NFC] Refactor relocation arch selection Apr 8, 2024
@urnathan urnathan merged commit 4308c74 into llvm:main Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants