-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[llvm][lld][RISCV] Support x3_reg_usage #84598
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
Open
ilovepi
wants to merge
35
commits into
main
Choose a base branch
from
users/ilovepi/spr/llvmlldriscv-support-x3_reg_usage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
0c9418d
[𝘀𝗽𝗿] changes to main this commit is based on
ilovepi 005d6d1
[𝘀𝗽𝗿] initial version
ilovepi 6d9b867
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi 2c5698e
Fix formatting
ilovepi 32a79d4
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi d001457
Add missing code for merge
ilovepi 7695e2b
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi 8ab8c4e
rebase
ilovepi 46f6c9c
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi 4c031c7
Add missing code back
ilovepi ae519b8
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi fcb9f58
Pass iterator instead of repeating lookup and initilize enum values
ilovepi 7c9298e
Update callsite parameter
ilovepi 6c3ac85
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi 46271d4
Fix whitespace
ilovepi 0113fcd
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi 0448ab9
Address comments and support code generation
ilovepi 94cf105
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi 445170e
Rebase
ilovepi c39aca0
Fix typos
ilovepi 86bb4a8
Fix windows test failure
ilovepi dd7c482
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi ce8bc2b
Rebase
ilovepi 094bacc
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi 1cf0cff
rebase
ilovepi fb056ca
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi d46f343
rebase
ilovepi d557ce7
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi 4bea71a
rebase
ilovepi e983ddd
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi db28070
clang-format
ilovepi 0722154
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi b1b24ab
Rebase
ilovepi 973748b
[𝘀𝗽𝗿] changes introduced through rebase
ilovepi b832e36
Rebase
ilovepi 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
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
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
23 changes: 23 additions & 0 deletions
23
llvm/test/CodeGen/RISCV/shadowcallstack-missing-x3-attr.ll
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; RUN: not --crash llc -mtriple=riscv32 < %s 2>&1 \ | ||
; RUN: | FileCheck --check-prefix=X3ERR %s | ||
; RUN: not --crash llc -mtriple=riscv64 < %s 2>&1 \ | ||
; RUN: | FileCheck --check-prefix=X3ERR %s | ||
|
||
;; Its safe for Zicfiss not to set x3-scs. | ||
; RUN: llc -mtriple=riscv64 < %s -mattr=+experimental-zicfiss \ | ||
; RUN: | FileCheck --check-prefix=NOX3ERR %s | ||
|
||
;; It isn't safe w/ forced-sw-shadow-stack, though | ||
; RUN: not --crash llc -mtriple=riscv64 <%s -mattr=+experimental-zicfiss,forced-sw-shadow-stack 2>&1 \ | ||
; RUN: | FileCheck --check-prefix=X3ERR %s | ||
|
||
; X3ERR: LLVM ERROR: Cannot use the software based RISCV shadow call stack without setting the ABI tag `+x3-scs`. | ||
; NOX3ERR-NOT: LLVM ERROR | ||
|
||
declare i32 @bar() | ||
|
||
define i32 @f1() shadowcallstack { | ||
%res = call i32 @bar() | ||
%res1 = add i32 %res, 1 | ||
ret i32 %res | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,6 @@ | |
|
||
.attribute atomic_abi, 0 | ||
# CHECK: attribute 14, 0 | ||
|
||
.attribute x3_reg_usage, 0 | ||
# CHECK: attribute 16, 0 |
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
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.
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.
This blank should be added in Atomic ABI PR I think.
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.
Thank you. There is a good chance that is the case.