MLIR  20.0.0git
Public Member Functions | List of all members
mlir::NVVM::PtxBuilder Class Reference

A class to build PTX assembly automatically. More...

#include "mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h"

Public Member Functions

 PtxBuilder (Operation *op, PatternRewriter &rewriter)
 Single constructor that only initializes members. More...
 
void insertValue (Value v, PTXRegisterMod itype=PTXRegisterMod::Read)
 Add an operand with the read/write input type. More...
 
LLVM::InlineAsmOp build ()
 Builds the inline assembly Op and returns it. More...
 
void buildAndReplaceOp ()
 Shortcut to build the inline assembly Op and replace or erase the original op with. More...
 

Detailed Description

A class to build PTX assembly automatically.

It is used by BasicPtxBuilderInterface.

Definition at line 48 of file BasicPtxBuilderInterface.h.

Constructor & Destructor Documentation

◆ PtxBuilder()

mlir::NVVM::PtxBuilder::PtxBuilder ( Operation op,
PatternRewriter rewriter 
)
inline

Single constructor that only initializes members.

Definition at line 62 of file BasicPtxBuilderInterface.h.

Member Function Documentation

◆ build()

LLVM::InlineAsmOp PtxBuilder::build ( )

Builds the inline assembly Op and returns it.

The insertValue needs to be called to pass operands before building the PTX.

Definition at line 110 of file BasicPtxBuilderInterface.cpp.

References mlir::OpBuilder::create(), and mlir::get().

Referenced by buildAndReplaceOp().

◆ buildAndReplaceOp()

void PtxBuilder::buildAndReplaceOp ( )

Shortcut to build the inline assembly Op and replace or erase the original op with.

Definition at line 147 of file BasicPtxBuilderInterface.cpp.

References build(), DBGS, mlir::RewriterBase::eraseOp(), and mlir::RewriterBase::replaceOp().

◆ insertValue()

void PtxBuilder::insertValue ( Value  v,
PTXRegisterMod  itype = PTXRegisterMod::Read 
)

The documentation for this class was generated from the following files: