MLIR 22.0.0git
MaskedloadToLoad.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::amdgpu::impl::AmdgpuMaskedloadToLoadPassBase< DerivedT >
struct  AmdgpuMaskedloadToLoadPass

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::amdgpu
namespace  mlir::amdgpu::impl

Macros

#define GEN_PASS_DEF_AMDGPUMASKEDLOADTOLOADPASS

Functions

std::unique_ptr<::mlir::Passmlir::amdgpu::impl::createAmdgpuMaskedloadToLoadPass ()
std::unique_ptr<::mlir::Passmlir::amdgpu::createAmdgpuMaskedloadToLoadPass ()
static LogicalResult baseInBufferAddrSpace (PatternRewriter &rewriter, vector::MaskedLoadOp maskedOp)
 This pattern supports lowering of: vector.maskedload to vector.load and arith.select if the memref is in buffer address space.
static Value createVectorLoadForMaskedLoad (OpBuilder &builder, Location loc, vector::MaskedLoadOp maskedOp, bool passthru)
static FailureOr< ValuematchFullMask (OpBuilder &b, Value val)
 Check if the given value comes from a broadcasted i1 condition.

Variables

static constexpr char kMaskedloadNeedsMask []

Macro Definition Documentation

◆ GEN_PASS_DEF_AMDGPUMASKEDLOADTOLOADPASS

#define GEN_PASS_DEF_AMDGPUMASKEDLOADTOLOADPASS

Definition at line 27 of file MaskedloadToLoad.cpp.

Function Documentation

◆ baseInBufferAddrSpace()

LogicalResult baseInBufferAddrSpace ( PatternRewriter & rewriter,
vector::MaskedLoadOp maskedOp )
static

This pattern supports lowering of: vector.maskedload to vector.load and arith.select if the memref is in buffer address space.

Definition at line 36 of file MaskedloadToLoad.cpp.

References mlir::RewriterBase::notifyMatchFailure(), and success().

◆ createVectorLoadForMaskedLoad()

Value createVectorLoadForMaskedLoad ( OpBuilder & builder,
Location loc,
vector::MaskedLoadOp maskedOp,
bool passthru )
static

Definition at line 53 of file MaskedloadToLoad.cpp.

References load.

◆ matchFullMask()

FailureOr< Value > matchFullMask ( OpBuilder & b,
Value val )
static

Check if the given value comes from a broadcasted i1 condition.

Definition at line 66 of file MaskedloadToLoad.cpp.

References b, and mlir::Value::getDefiningOp().

Variable Documentation

◆ kMaskedloadNeedsMask

char kMaskedloadNeedsMask[]
staticconstexpr
Initial value:
=
"amdgpu.buffer_maskedload_needs_mask"

Definition at line 75 of file MaskedloadToLoad.cpp.