14 #ifndef NVVM_DIALECT_NVVM_IR_BASICPTXBUILDERINTERFACE_H_
15 #define NVVM_DIALECT_NVVM_IR_BASICPTXBUILDERINTERFACE_H_
40 #include "mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h.inc"
50 BasicPtxBuilderInterface interfaceOp;
56 std::string registerConstraints;
58 bool hasResult =
false;
63 : interfaceOp(op), rewriter(rewriter) {}
70 LLVM::InlineAsmOp
build();
A class to build PTX assembly automatically.
void insertValue(Value v, PTXRegisterMod itype=PTXRegisterMod::Read)
Add an operand with the read/write input type.
PtxBuilder(Operation *op, PatternRewriter &rewriter)
Single constructor that only initializes members.
LLVM::InlineAsmOp build()
Builds the inline assembly Op and returns it.
void buildAndReplaceOp()
Shortcut to build the inline assembly Op and replace or erase the original op with.
Operation is the basic unit of execution within MLIR.
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
PTXRegisterMod
Register read/write modifier to build constraint string for PTX inline https://docs....
@ Write
Read register with '+' modifier.
@ ReadWrite
Read register with '=' modifier.
@ Read
Read register with no modifier.
Include the generated interface declarations.