-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[RISCV] Add Sched classes for vector crypto instructions #90068
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
219fb86
[RISCV] Add Sched classes for vector crypto instructions
michaelmaitland b583311
fixup! fix vandn and vwsll
michaelmaitland a8e3f22
fixup! fix copy paste mistake
michaelmaitland 179ea08
fixup! fix filename
michaelmaitland 0181004
fixup! indentation
michaelmaitland 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
//=== RISCVScheduleZvk.td - RISC-V Scheduling Definitions Zvk -*- tablegen ===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
/// Define scheduler resources associated with def operands. | ||
|
||
/// Zvbb extension | ||
defm "" : LMULSchedWrites<"WriteVBREVV">; | ||
defm "" : LMULSchedWrites<"WriteVCLZV">; | ||
defm "" : LMULSchedWrites<"WriteVCPOPV">; | ||
defm "" : LMULSchedWrites<"WriteVCTZV">; | ||
defm "" : LMULSchedWrites<"WriteVWSLLV">; | ||
defm "" : LMULSchedWrites<"WriteVWSLLX">; | ||
defm "" : LMULSchedWrites<"WriteVWSLLI">; | ||
|
||
/// Zvbc extension | ||
defm "" : LMULSchedWrites<"WriteVCLMULV">; | ||
defm "" : LMULSchedWrites<"WriteVCLMULX">; | ||
|
||
/// Zvkb extension | ||
// VANDN uses WriteVIALU[V|X|I] | ||
defm "" : LMULSchedWrites<"WriteVBREV8V">; | ||
defm "" : LMULSchedWrites<"WriteVREV8V">; | ||
defm "" : LMULSchedWrites<"WriteVRotV">; | ||
defm "" : LMULSchedWrites<"WriteVRotX">; | ||
defm "" : LMULSchedWrites<"WriteVRotI">; | ||
|
||
/// Zvkg extension | ||
defm "" : LMULSchedWrites<"WriteVGHSHV">; | ||
defm "" : LMULSchedWrites<"WriteVGMULV">; | ||
|
||
/// Zvknha or Zvknhb extensions | ||
defm "" : LMULSchedWrites<"WriteVSHA2CHV">; | ||
defm "" : LMULSchedWrites<"WriteVSHA2CLV">; | ||
defm "" : LMULSchedWrites<"WriteVSHA2MSV">; | ||
|
||
/// Zvkned extension | ||
defm "" : LMULSchedWrites<"WriteVAESMVV">; | ||
defm "" : LMULSchedWrites<"WriteVAESKF1V">; | ||
defm "" : LMULSchedWrites<"WriteVAESKF2V">; | ||
defm "" : LMULSchedWrites<"WriteVAESZV">; | ||
|
||
/// Zvksed extension | ||
defm "" : LMULSchedWrites<"WriteVSM4KV">; | ||
defm "" : LMULSchedWrites<"WriteVSM4RV">; | ||
|
||
/// Zvksh extension | ||
defm "" : LMULSchedWrites<"WriteVSM3CV">; | ||
defm "" : LMULSchedWrites<"WriteVSM3MEV">; | ||
|
||
/// Define scheduler resources associated with use operands. | ||
/// Zvbb extension | ||
defm "" : LMULSchedReads<"ReadVBREVV">; | ||
defm "" : LMULSchedReads<"ReadVCLZV">; | ||
defm "" : LMULSchedReads<"ReadVCPOPV">; | ||
defm "" : LMULSchedReads<"ReadVCTZV">; | ||
defm "" : LMULSchedReads<"ReadVWSLLV">; | ||
defm "" : LMULSchedReads<"ReadVWSLLX">; | ||
|
||
/// Zvbc extension | ||
defm "" : LMULSchedReads<"ReadVCLMULV">; | ||
defm "" : LMULSchedReads<"ReadVCLMULX">; | ||
|
||
/// Zvkb extension | ||
// VANDN uses ReadVIALU[V|X|I] | ||
defm "" : LMULSchedReads<"ReadVBREV8V">; | ||
defm "" : LMULSchedReads<"ReadVREV8V">; | ||
defm "" : LMULSchedReads<"ReadVRotV">; | ||
defm "" : LMULSchedReads<"ReadVRotX">; | ||
|
||
/// Zvkg extension | ||
defm "" : LMULSchedReads<"ReadVGHSHV">; | ||
defm "" : LMULSchedReads<"ReadVGMULV">; | ||
|
||
/// Zvknha or Zvknhb extensions | ||
defm "" : LMULSchedReads<"ReadVSHA2CHV">; | ||
defm "" : LMULSchedReads<"ReadVSHA2CLV">; | ||
defm "" : LMULSchedReads<"ReadVSHA2MSV">; | ||
|
||
/// Zvkned extension | ||
defm "" : LMULSchedReads<"ReadVAESMVV">; | ||
defm "" : LMULSchedReads<"ReadVAESKF1V">; | ||
defm "" : LMULSchedReads<"ReadVAESKF2V">; | ||
defm "" : LMULSchedReads<"ReadVAESZV">; | ||
|
||
/// Zvksed extension | ||
defm "" : LMULSchedReads<"ReadVSM4KV">; | ||
defm "" : LMULSchedReads<"ReadVSM4RV">; | ||
|
||
/// Zvksh extension | ||
defm "" : LMULSchedReads<"ReadVSM3CV">; | ||
defm "" : LMULSchedReads<"ReadVSM3MEV">; | ||
|
||
multiclass UnsupportedSchedZvbb { | ||
let Unsupported = true in { | ||
defm "" : LMULWriteRes<"WriteVBREVV", []>; | ||
defm "" : LMULWriteRes<"WriteVCLZV", []>; | ||
defm "" : LMULWriteRes<"WriteVCPOPV", []>; | ||
defm "" : LMULWriteRes<"WriteVCTZV", []>; | ||
defm "" : LMULWriteRes<"WriteVWSLLV", []>; | ||
defm "" : LMULWriteRes<"WriteVWSLLX", []>; | ||
defm "" : LMULWriteRes<"WriteVWSLLI", []>; | ||
|
||
defm "" : LMULReadAdvance<"ReadVBREVV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVCLZV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVCPOPV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVCTZV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVWSLLV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVWSLLX", 0>; | ||
} | ||
} | ||
|
||
multiclass UnsupportedSchedZvbc { | ||
let Unsupported = true in { | ||
defm "" : LMULWriteRes<"WriteVCLMULV", []>; | ||
defm "" : LMULWriteRes<"WriteVCLMULX", []>; | ||
|
||
defm "" : LMULReadAdvance<"ReadVCLMULV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVCLMULX", 0>; | ||
} | ||
} | ||
|
||
multiclass UnsupportedSchedZvkb { | ||
let Unsupported = true in { | ||
defm "" : LMULWriteRes<"WriteVBREV8V", []>; | ||
defm "" : LMULWriteRes<"WriteVREV8V", []>; | ||
defm "" : LMULWriteRes<"WriteVRotV", []>; | ||
defm "" : LMULWriteRes<"WriteVRotX", []>; | ||
defm "" : LMULWriteRes<"WriteVRotI", []>; | ||
|
||
defm "" : LMULReadAdvance<"ReadVBREV8V", 0>; | ||
defm "" : LMULReadAdvance<"ReadVREV8V", 0>; | ||
defm "" : LMULReadAdvance<"ReadVRotV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVRotX", 0>; | ||
} | ||
} | ||
|
||
multiclass UnsupportedSchedZvkg { | ||
let Unsupported = true in { | ||
defm "" : LMULWriteRes<"WriteVGHSHV", []>; | ||
defm "" : LMULWriteRes<"WriteVGMULV", []>; | ||
|
||
defm "" : LMULReadAdvance<"ReadVGHSHV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVGMULV", 0>; | ||
} | ||
} | ||
|
||
multiclass UnsupportedSchedZvknhaOrZvknhb { | ||
let Unsupported = true in { | ||
defm "" : LMULWriteRes<"WriteVSHA2CHV", []>; | ||
defm "" : LMULWriteRes<"WriteVSHA2CLV", []>; | ||
defm "" : LMULWriteRes<"WriteVSHA2MSV", []>; | ||
|
||
defm "" : LMULReadAdvance<"ReadVSHA2CHV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVSHA2CLV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVSHA2MSV", 0>; | ||
} | ||
} | ||
|
||
multiclass UnsupportedSchedZvkned { | ||
let Unsupported = true in { | ||
defm "" : LMULWriteRes<"WriteVAESMVV", []>; | ||
defm "" : LMULWriteRes<"WriteVAESKF1V", []>; | ||
defm "" : LMULWriteRes<"WriteVAESKF2V", []>; | ||
defm "" : LMULWriteRes<"WriteVAESZV", []>; | ||
|
||
defm "" : LMULReadAdvance<"ReadVAESMVV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVAESKF1V", 0>; | ||
defm "" : LMULReadAdvance<"ReadVAESKF2V", 0>; | ||
defm "" : LMULReadAdvance<"ReadVAESZV", 0>; | ||
} | ||
} | ||
|
||
multiclass UnsupportedSchedZvksed { | ||
let Unsupported = true in { | ||
defm "" : LMULWriteRes<"WriteVSM4KV", []>; | ||
defm "" : LMULWriteRes<"WriteVSM4RV", []>; | ||
|
||
defm "" : LMULReadAdvance<"ReadVSM4KV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVSM4RV", 0>; | ||
} | ||
} | ||
|
||
multiclass UnsupportedSchedZvksh { | ||
let Unsupported = true in { | ||
defm "" : LMULWriteRes<"WriteVSM3CV", []>; | ||
defm "" : LMULWriteRes<"WriteVSM3MEV", []>; | ||
|
||
defm "" : LMULReadAdvance<"ReadVSM3CV", 0>; | ||
defm "" : LMULReadAdvance<"ReadVSM3MEV", 0>; | ||
} | ||
} | ||
|
||
// Helper class to define all RISC-V Vector Crypto extensions as unsupported | ||
multiclass UnsupportedSchedZvk { | ||
defm "" : UnsupportedSchedZvbb; | ||
defm "" : UnsupportedSchedZvbc; | ||
defm "" : UnsupportedSchedZvkb; | ||
defm "" : UnsupportedSchedZvkg; | ||
defm "" : UnsupportedSchedZvknhaOrZvknhb; | ||
defm "" : UnsupportedSchedZvkned; | ||
defm "" : UnsupportedSchedZvksed; | ||
defm "" : UnsupportedSchedZvksh; | ||
} |
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.
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.
Remove this line?
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.
Took the line from
RISCVScheduleZb.td
. At top of file we have line for def. This is line for use. Do you want me to remove both?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.
Oh sorry, please just keep it.