-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[BOLT][AArch64] Add support for compact code model #112110
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9c5b340
[BOLT][AArch64] Add support for compact code model
maksfb 3cabeab
fixup! [BOLT][AArch64] Add support for compact code model
maksfb 4dc0221
fixup! fixup! [BOLT][AArch64] Add support for compact code model
maksfb 6641d9f
fixup! fixup! fixup! [BOLT][AArch64] Add support for compact code model
maksfb 96b858b
fixup! fixup! fixup! fixup! [BOLT][AArch64] Add support for compact c…
maksfb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not so sure on this, so consider it as me 'thinking out loud')
Would it make sense to add a check on whether
TargetBB
is in range?Given that this is for binaries <128MB, I assume it'll be in range.
But could there be a borderline case where
TargetBB
was initially in range but relaxations in between have shifted it right outside of range? If that's a possibility, then we would expect the relaxation loop to eventually get it right in the future? or is this part of the bits that will be 'offloaded' to the JIT linker?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
TargetBB
is in the same fragment, we can add an assertion that the fragment is <128MB. I think it's reasonable to reject functions over such size as I'm not sure we'll ever see those in practice. Otherwise, it wouldn't be possible to check the condition here sinceTargetBB
is expected to be output into a different section (with unassigned address).As of now, if the target is out of range, we'll get an error from the emitter when the destination is in the same section or from the JITLink if in a different section. In the future, I expect JITLink to handle latter cases with thunks/veneers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation.
Re the same section case:
I guess it's done with an assertion like this. Maybe in the future it makes sense to run follow-up checks to deal with this, as I guess it's too late by the time it reaches the emitter?
I stumbled upon such assertions by the emitter (pre compact-mode) and plan to follow-up on them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd expect an error from here during the code emission.