|
MLIR 22.0.0git
|
Helper class to produce LLVM dialect operations extracting or inserting values to a struct. More...
#include "mlir/Conversion/LLVMCommon/StructBuilder.h"
Public Member Functions | |
| StructBuilder (Value v) | |
| Construct a helper for the given value. | |
| operator Value () | |
Static Public Member Functions | |
| static StructBuilder | poison (OpBuilder &builder, Location loc, Type descriptorType) |
| Builds IR creating a poison value of the descriptor type. | |
Protected Member Functions | |
| Value | extractPtr (OpBuilder &builder, Location loc, unsigned pos) const |
| Builds IR to extract a value from the struct at position pos. | |
| void | setPtr (OpBuilder &builder, Location loc, unsigned pos, Value ptr) |
| Builds IR to set a value in the struct at position pos. | |
Protected Attributes | |
| Value | value |
| Type | structType |
Helper class to produce LLVM dialect operations extracting or inserting values to a struct.
Definition at line 26 of file StructBuilder.h.
|
explicit |
Construct a helper for the given value.
Definition at line 20 of file StructBuilder.cpp.
References mlir::getType(), mlir::LLVM::isCompatibleType(), structType, and value.
Referenced by mlir::MemRefDescriptor::MemRefDescriptor(), poison(), and mlir::UnrankedMemRefDescriptor::UnrankedMemRefDescriptor().
Builds IR to extract a value from the struct at position pos.
Definition at line 25 of file StructBuilder.cpp.
References value.
Referenced by mlir::MemRefDescriptor::alignedPtr(), mlir::MemRefDescriptor::allocatedPtr(), mlir::ComplexStructBuilder::imaginary(), mlir::UnrankedMemRefDescriptor::memRefDescPtr(), mlir::UnrankedMemRefDescriptor::rank(), and mlir::ComplexStructBuilder::real().
|
inline |
Definition at line 34 of file StructBuilder.h.
References value.
|
static |
Builds IR creating a poison value of the descriptor type.
References StructBuilder().
Builds IR to set a value in the struct at position pos.
Definition at line 30 of file StructBuilder.cpp.
References value.
Referenced by mlir::MemRefDescriptor::setAlignedPtr(), mlir::MemRefDescriptor::setAllocatedPtr(), mlir::ComplexStructBuilder::setImaginary(), mlir::UnrankedMemRefDescriptor::setMemRefDescPtr(), mlir::UnrankedMemRefDescriptor::setRank(), and mlir::ComplexStructBuilder::setReal().
|
protected |
Definition at line 40 of file StructBuilder.h.
Referenced by StructBuilder().
|
protected |
Definition at line 38 of file StructBuilder.h.
Referenced by extractPtr(), mlir::MemRefDescriptor::getElementPtrType(), mlir::MemRefDescriptor::MemRefDescriptor(), mlir::MemRefDescriptor::offset(), operator Value(), mlir::MemRefDescriptor::setOffset(), setPtr(), mlir::MemRefDescriptor::setSize(), mlir::MemRefDescriptor::setStride(), mlir::MemRefDescriptor::size(), mlir::MemRefDescriptor::size(), mlir::MemRefDescriptor::stride(), and StructBuilder().