MLIR  22.0.0git
Classes | Namespaces | Macros | Functions | Variables
MaskedloadToLoad.cpp File Reference
#include "mlir/Dialect/AMDGPU/Transforms/Passes.h"
#include "mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/MemRef/Utils/MemRefUtils.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/Support/MathExtras.h"
#include "mlir/Dialect/AMDGPU/Transforms/Passes.h.inc"

Go to the source code of this file.

Classes

struct  AmdgpuMaskedloadToLoadPass
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::amdgpu
 

Macros

#define GEN_PASS_DEF_AMDGPUMASKEDLOADTOLOADPASS
 

Functions

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. More...
 
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. More...
 

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()

static 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().

◆ createVectorLoadForMaskedLoad()

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

Definition at line 53 of file MaskedloadToLoad.cpp.

◆ matchFullMask()

static 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 mlir::Value::getDefiningOp().

Variable Documentation

◆ kMaskedloadNeedsMask

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

Definition at line 75 of file MaskedloadToLoad.cpp.