-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[bolt] Support arm64 FP register spills #73021
Conversation
Hi. I would check it later. That time: is it necessary to create yaml test instead of asm? Do we need to check output after bolt? |
I have to emit ELF executable (with reloc), not just object so I need either both asm and linker or yaml that's why I've chosen the latter.
No. This is minimal code snippet to trigger crash in bolt, not a real jump table. The output of bolt is no different from input here. |
Fill free to use lld linker. Normally we're trying to avoid such yaml tests, it seems to be unnecessary here.
I see, thanks. I would try to reproduce crash later. |
4f9076e
to
1774d9b
Compare
Switched to lld and llvm-mc in test case |
Any comments on this? |
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.
Hi! Sorry for late review. Overall LGTM, please fix couple on nits in comments and I would approve it. Thanks!
From = Inst.getOperand(1).getReg(); | ||
To = Inst.getOperand(0).getReg(); | ||
return true; | ||
} |
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.
new line please after }
@@ -0,0 +1,17 @@ | |||
# REQUIRES: system-linux |
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.
Please add test scription at the beginning of the file
At the moment llvm-bolt fails when analyzing jump tables on aarch64 in case FP register spill/reload is used.
1774d9b
to
d9b00ed
Compare
Addressed comments |
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
# Check that we correctly handle arm64 fp register spills in | ||
# bolt when we are processing jump tables. |
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.
Sorry for jumping in late after the change landed. This test checks that BOLT doesn't crash, but it doesn't really check for the correct handling of the jump table. You'll need to add FileCheck
checks for --print-cfg
dumps or other checks for the output.
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.
The idea behind the test was not to check the jump table (although it would be nice), but the previous bolt assertion during analyzation. So the test is good-enough I think
At the moment llvm-bolt fails when analyzing jump tables on aarch64 in case FP register spill/reload is used.