-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[SPIRV] FIX print the symbolic operand for opcode for the operation OpSpecConstantOp #135756
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 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,6 +172,7 @@ def KernelProfilingInfoOperand : OperandCategory; | |
| def OpcodeOperand : OperandCategory; | ||
| def CooperativeMatrixLayoutOperand : OperandCategory; | ||
| def CooperativeMatrixOperandsOperand : OperandCategory; | ||
| def SpecConstantOpOperandsOperand : OperandCategory; | ||
|
|
||
| //===----------------------------------------------------------------------===// | ||
| // Multiclass used to define Extesions enum values and at the same time | ||
|
|
@@ -1743,3 +1744,93 @@ defm MatrixAAndBTF32ComponentsINTEL : CooperativeMatrixOperandsOperand<0x20, [SP | |
| defm MatrixAAndBBFloat16ComponentsINTEL : CooperativeMatrixOperandsOperand<0x40, [SPV_INTEL_joint_matrix], [CooperativeMatrixBFloat16ComponentTypeINTEL]>; | ||
| defm MatrixCBFloat16ComponentsINTEL : CooperativeMatrixOperandsOperand<0x80, [SPV_INTEL_joint_matrix], [CooperativeMatrixBFloat16ComponentTypeINTEL]>; | ||
| defm MatrixResultBFloat16ComponentsINTEL : CooperativeMatrixOperandsOperand<0x100, [SPV_INTEL_joint_matrix], [CooperativeMatrixBFloat16ComponentTypeINTEL]>; | ||
|
|
||
| //===----------------------------------------------------------------------===// | ||
| // Multiclass used to define SpecConstant Operands enum values and at the | ||
| // same time SymbolicOperand entries with string mnemonics, extensions and | ||
| // capabilities. | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| def SpecConstantOpOperands : GenericEnum, Operand<i32> { | ||
| let FilterClass = "SpecConstantOpOperands"; | ||
| let NameField = "Name"; | ||
| let ValueField = "Value"; | ||
| let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); | ||
| } | ||
|
|
||
| class SpecConstantOpOperands<string name, bits<32> value> { | ||
| string Name = name; | ||
| bits<32> Value = value; | ||
| } | ||
|
|
||
| multiclass SpecConstantOpOperandsOperand<bits<32> value, list<Extension> reqExtensions, list<Capability> reqCapabilities> { | ||
| def : SpecConstantOpOperands<NAME, value>; | ||
| defm : SymbolicOperandWithRequirements<SpecConstantOpOperandsOperand, value, NAME, 0, 0, reqExtensions, reqCapabilities>; | ||
| } | ||
|
|
||
| // Conversion | ||
| defm SConvert : SpecConstantOpOperandsOperand<114, [], []>; | ||
| defm FConvert : SpecConstantOpOperandsOperand<115, [], []>; | ||
| defm ConvertFToS : SpecConstantOpOperandsOperand<110, [], [Kernel]>; | ||
| defm ConvertSToF : SpecConstantOpOperandsOperand<111, [], [Kernel]>; | ||
| defm ConvertFToU : SpecConstantOpOperandsOperand<109, [], [Kernel]>; | ||
| defm ConvertUToF : SpecConstantOpOperandsOperand<112, [], [Kernel]>; | ||
| defm UConvert : SpecConstantOpOperandsOperand<113, [], [Kernel]>; | ||
| defm ConvertPtrToU : SpecConstantOpOperandsOperand<117, [], [Kernel]>; | ||
| defm ConvertUToPtr : SpecConstantOpOperandsOperand<120, [], [Kernel]>; | ||
| defm GenericCastToPtr : SpecConstantOpOperandsOperand<122, [], [Kernel]>; | ||
| defm PtrCastToGeneric : SpecConstantOpOperandsOperand<121, [], [Kernel]>; | ||
| defm Bitcast : SpecConstantOpOperandsOperand<124, [], []>; | ||
| defm QuantizeToF16 : SpecConstantOpOperandsOperand<116, [], [Shader]>; | ||
| // Arithmetic | ||
| defm SNegate : SpecConstantOpOperandsOperand<126, [], []>; | ||
| defm Not : SpecConstantOpOperandsOperand<200, [], []>; | ||
| defm IAdd : SpecConstantOpOperandsOperand<128, [], []>; | ||
| defm ISub : SpecConstantOpOperandsOperand<130, [], []>; | ||
| defm IMul : SpecConstantOpOperandsOperand<132, [], []>; | ||
| defm UDiv : SpecConstantOpOperandsOperand<134, [], []>; | ||
| defm SDiv : SpecConstantOpOperandsOperand<135, [], []>; | ||
| defm UMod : SpecConstantOpOperandsOperand<137, [], []>; | ||
| defm SRem : SpecConstantOpOperandsOperand<138, [], []>; | ||
| defm SMod : SpecConstantOpOperandsOperand<139, [], []>; | ||
| defm ShiftRightLogical : SpecConstantOpOperandsOperand<194, [], []>; | ||
| defm ShiftRightArithmetic : SpecConstantOpOperandsOperand<195, [], []>; | ||
| defm ShiftLeftLogical : SpecConstantOpOperandsOperand<196, [], []>; | ||
| defm BitwiseOr : SpecConstantOpOperandsOperand<197, [], []>; | ||
| defm BitwiseAnd : SpecConstantOpOperandsOperand<199, [], []>; | ||
| defm BitwiseXor : SpecConstantOpOperandsOperand<198, [], []>; | ||
| defm FNegate : SpecConstantOpOperandsOperand<127, [], [Kernel]>; | ||
| defm FAdd : SpecConstantOpOperandsOperand<129, [], [Kernel]>; | ||
| defm FSub : SpecConstantOpOperandsOperand<131, [], [Kernel]>; | ||
| defm FMul : SpecConstantOpOperandsOperand<133, [], [Kernel]>; | ||
| defm FDiv : SpecConstantOpOperandsOperand<136, [], [Kernel]>; | ||
| defm FRem : SpecConstantOpOperandsOperand<140, [], [Kernel]>; | ||
| defm FMod : SpecConstantOpOperandsOperand<141, [], [Kernel]>; | ||
| // Composite; | ||
| defm VectorShuffle : SpecConstantOpOperandsOperand<79, [], []>; | ||
| defm CompositeExtract : SpecConstantOpOperandsOperand<81, [], []>; | ||
| defm CompositeInsert : SpecConstantOpOperandsOperand<82, [], []>; | ||
| // Logical; | ||
| defm LogicalOr : SpecConstantOpOperandsOperand<166, [], []>; | ||
| defm LogicalAnd : SpecConstantOpOperandsOperand<167, [], []>; | ||
| defm LogicalNot : SpecConstantOpOperandsOperand<168, [], []>; | ||
| defm LogicalEqual : SpecConstantOpOperandsOperand<164, [], []>; | ||
| defm LogicalNotEqual : SpecConstantOpOperandsOperand<165, [], []>; | ||
| defm Select : SpecConstantOpOperandsOperand<169, [], []>; | ||
| // Comparison; | ||
| defm IEqual : SpecConstantOpOperandsOperand<170, [], []>; | ||
| defm INotEqual : SpecConstantOpOperandsOperand<171, [], []>; | ||
| defm ULessThan : SpecConstantOpOperandsOperand<176, [], []>; | ||
| defm SLessThan : SpecConstantOpOperandsOperand<177, [], []>; | ||
| defm UGreaterThan : SpecConstantOpOperandsOperand<172, [], []>; | ||
| defm SGreaterThan : SpecConstantOpOperandsOperand<173, [], []>; | ||
| defm ULessThanEqual : SpecConstantOpOperandsOperand<176, [], []>; | ||
| defm SLessThanEqual : SpecConstantOpOperandsOperand<178, [], []>; | ||
|
||
| defm UGreaterThanEqual : SpecConstantOpOperandsOperand<174, [], []>; | ||
| defm SGreaterThanEqual : SpecConstantOpOperandsOperand<175, [], []>; | ||
| // Memory | ||
| defm AccessChain : SpecConstantOpOperandsOperand<65, [], [Kernel]>; | ||
| defm InBoundsAccessChain : SpecConstantOpOperandsOperand<66, [], [Kernel]>; | ||
| defm PtrAccessChain : SpecConstantOpOperandsOperand<67, [], [Kernel]>; | ||
| defm InBoundsPtrAccessChain : SpecConstantOpOperandsOperand<70, [], [Kernel]>; | ||
| defm CooperativeMatrixLengthKHR : SpecConstantOpOperandsOperand<4460, [], []>; | ||
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
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.