[llvm] [DXIL] Add constraint specification and backend implementation of DXIL Ops (PR #97593)
S. Bharadwaj Yadavalli via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 09:35:02 PDT 2024
================
@@ -30,13 +31,21 @@ class DXILOpBuilder {
public:
DXILOpBuilder(Module &M, IRBuilderBase &B) : M(M), B(B) {}
/// Create an instruction that calls DXIL Op with return type, specified
- /// opcode, and call arguments. \param OpCode Opcode of the DXIL Op call
- /// constructed \param ReturnTy Return type of the DXIL Op call constructed
+ /// opcode, and call arguments.
+ ///
+ /// \param OpCode Opcode of the DXIL Op call constructed
+ /// \param SMVer Shader Model Version of DXIL Module being constructed.
+ /// \param StageKind Shader Stage for DXIL Module being constructed.
+ /// \param ReturnTy Return type of the DXIL Op call constructed
/// \param OverloadTy Overload type of the DXIL Op call constructed
+ /// \param Args Arguments for the DXIL Op call constructed
/// \return DXIL Op call constructed
- CallInst *createDXILOpCall(dxil::OpCode OpCode, Type *ReturnTy,
+ CallInst *createDXILOpCall(dxil::OpCode OpCode, VersionTuple SMVer,
+ StringRef StageKind, Type *ReturnTy,
----------------
bharadwajy wrote:
> Why StageKind is a StringRef instead of enum for shader stages?
Do you think it is safer and/or more beneficial to pass the enum obtained by calling `getShaderkKindEnum(...)` at the call site `DXILOpLowering.cpp::lowerIntrinsic(...)`, instead of doing so this function?
https://github.com/llvm/llvm-project/pull/97593
More information about the llvm-commits
mailing list