MLIR
21.0.0git
|
This class is a general helper class for creating context-global objects like types, attributes, and affine expressions. More...
#include "mlir/IR/Builders.h"
Public Member Functions | |
Builder (MLIRContext *context) | |
Builder (Operation *op) | |
MLIRContext * | getContext () const |
Location | getUnknownLoc () |
Location | getFusedLoc (ArrayRef< Location > locs, Attribute metadata=Attribute()) |
FloatType | getBF16Type () |
FloatType | getF16Type () |
FloatType | getTF32Type () |
FloatType | getF32Type () |
FloatType | getF64Type () |
FloatType | getF80Type () |
FloatType | getF128Type () |
IndexType | getIndexType () |
IntegerType | getI1Type () |
IntegerType | getI2Type () |
IntegerType | getI4Type () |
IntegerType | getI8Type () |
IntegerType | getI16Type () |
IntegerType | getI32Type () |
IntegerType | getI64Type () |
IntegerType | getIntegerType (unsigned width) |
IntegerType | getIntegerType (unsigned width, bool isSigned) |
FunctionType | getFunctionType (TypeRange inputs, TypeRange results) |
TupleType | getTupleType (TypeRange elementTypes) |
NoneType | getNoneType () |
template<typename Ty , typename... Args> | |
Ty | getType (Args &&...args) |
Get or construct an instance of the type Ty with provided arguments. More... | |
template<typename Attr , typename... Args> | |
Attr | getAttr (Args &&...args) |
Get or construct an instance of the attribute Attr with provided arguments. More... | |
NamedAttribute | getNamedAttr (StringRef name, Attribute val) |
UnitAttr | getUnitAttr () |
BoolAttr | getBoolAttr (bool value) |
DictionaryAttr | getDictionaryAttr (ArrayRef< NamedAttribute > value) |
IntegerAttr | getIntegerAttr (Type type, int64_t value) |
IntegerAttr | getIntegerAttr (Type type, const APInt &value) |
FloatAttr | getFloatAttr (Type type, double value) |
FloatAttr | getFloatAttr (Type type, const APFloat &value) |
StringAttr | getStringAttr (const Twine &bytes) |
ArrayAttr | getArrayAttr (ArrayRef< Attribute > value) |
TypedAttr | getZeroAttr (Type type) |
TypedAttr | getOneAttr (Type type) |
FloatAttr | getF16FloatAttr (float value) |
FloatAttr | getF32FloatAttr (float value) |
FloatAttr | getF64FloatAttr (double value) |
IntegerAttr | getI8IntegerAttr (int8_t value) |
IntegerAttr | getI16IntegerAttr (int16_t value) |
IntegerAttr | getI32IntegerAttr (int32_t value) |
IntegerAttr | getI64IntegerAttr (int64_t value) |
IntegerAttr | getIndexAttr (int64_t value) |
IntegerAttr | getSI32IntegerAttr (int32_t value) |
Signed and unsigned integer attribute getters. More... | |
IntegerAttr | getUI32IntegerAttr (uint32_t value) |
DenseIntElementsAttr | getBoolVectorAttr (ArrayRef< bool > values) |
Vector-typed DenseIntElementsAttr getters. values must not be empty. More... | |
DenseIntElementsAttr | getI32VectorAttr (ArrayRef< int32_t > values) |
DenseIntElementsAttr | getI64VectorAttr (ArrayRef< int64_t > values) |
DenseIntElementsAttr | getIndexVectorAttr (ArrayRef< int64_t > values) |
DenseFPElementsAttr | getF32VectorAttr (ArrayRef< float > values) |
DenseFPElementsAttr | getF64VectorAttr (ArrayRef< double > values) |
DenseIntElementsAttr | getI32TensorAttr (ArrayRef< int32_t > values) |
Tensor-typed DenseIntElementsAttr getters. More... | |
DenseIntElementsAttr | getI64TensorAttr (ArrayRef< int64_t > values) |
DenseIntElementsAttr | getIndexTensorAttr (ArrayRef< int64_t > values) |
DenseBoolArrayAttr | getDenseBoolArrayAttr (ArrayRef< bool > values) |
Tensor-typed DenseArrayAttr getters. More... | |
DenseI8ArrayAttr | getDenseI8ArrayAttr (ArrayRef< int8_t > values) |
DenseI16ArrayAttr | getDenseI16ArrayAttr (ArrayRef< int16_t > values) |
DenseI32ArrayAttr | getDenseI32ArrayAttr (ArrayRef< int32_t > values) |
DenseI64ArrayAttr | getDenseI64ArrayAttr (ArrayRef< int64_t > values) |
DenseF32ArrayAttr | getDenseF32ArrayAttr (ArrayRef< float > values) |
DenseF64ArrayAttr | getDenseF64ArrayAttr (ArrayRef< double > values) |
ArrayAttr | getAffineMapArrayAttr (ArrayRef< AffineMap > values) |
ArrayAttr | getBoolArrayAttr (ArrayRef< bool > values) |
ArrayAttr | getI32ArrayAttr (ArrayRef< int32_t > values) |
ArrayAttr | getI64ArrayAttr (ArrayRef< int64_t > values) |
ArrayAttr | getIndexArrayAttr (ArrayRef< int64_t > values) |
ArrayAttr | getF32ArrayAttr (ArrayRef< float > values) |
ArrayAttr | getF64ArrayAttr (ArrayRef< double > values) |
ArrayAttr | getStrArrayAttr (ArrayRef< StringRef > values) |
ArrayAttr | getTypeArrayAttr (TypeRange values) |
AffineExpr | getAffineDimExpr (unsigned position) |
AffineExpr | getAffineSymbolExpr (unsigned position) |
AffineExpr | getAffineConstantExpr (int64_t constant) |
AffineMap | getEmptyAffineMap () |
Returns a zero result affine map with no dimensions or symbols: () -> (). More... | |
AffineMap | getConstantAffineMap (int64_t val) |
Returns a single constant result affine map with 0 dimensions and 0 symbols. More... | |
AffineMap | getDimIdentityMap () |
AffineMap | getMultiDimIdentityMap (unsigned rank) |
AffineMap | getSymbolIdentityMap () |
AffineMap | getSingleDimShiftAffineMap (int64_t shift) |
Returns a map that shifts its (single) input dimension by 'shift'. More... | |
AffineMap | getShiftedAffineMap (AffineMap map, int64_t shift) |
Returns an affine map that is a translation (shift) of all result expressions in 'map' by 'shift'. More... | |
Protected Attributes | |
MLIRContext * | context |
This class is a general helper class for creating context-global objects like types, attributes, and affine expressions.
Definition at line 51 of file Builders.h.
|
inlineexplicit |
Definition at line 53 of file Builders.h.
|
inlineexplicit |
Definition at line 54 of file Builders.h.
AffineExpr Builder::getAffineConstantExpr | ( | int64_t | constant | ) |
Definition at line 368 of file Builders.cpp.
References context, and mlir::getAffineConstantExpr().
Referenced by mlir::scf::addLoopRangeConstraints(), broadcastDynamicDimension(), mlir::ValueBoundsConstraintSet::computeBound(), createInBoundsCond(), emitElementwiseComputation(), mlir::foldAttributesIntoMap(), getBroadcastingMap(), getConstantAffineMap(), mlir::ValueBoundsConstraintSet::getExpr(), mlir::memref::getLinearizedMemRefOffsetAndSize(), isTransposeMatrixLoadMap(), mlir::linalg::rewriteInIm2Col(), setInterTileBoundsParametric(), setIntraTileBoundsParametric(), mlir::affine::simplifyConstrainedMinMaxOp(), and mlir::ValueBoundsConstraintSet::Variable::Variable().
AffineExpr Builder::getAffineDimExpr | ( | unsigned | position | ) |
Definition at line 360 of file Builders.cpp.
References context, and mlir::getAffineDimExpr().
Referenced by mlir::alignAffineMapWithValues(), augmentMapAndBounds(), broadcastDynamicDimension(), mlir::tensor::buildIndependentOp(), mlir::vector::castAwayContractionLeadingOneDim(), mlir::affine::coalesceLoops(), mlir::ValueBoundsConstraintSet::computeBound(), mlir::ValueBoundsConstraintSet::computeConstantDelta(), constructTiledIndexSetHyperRect(), createDepthwiseConvCollapseMap(), createInBoundsCond(), doubleBuffer(), emitElementwiseComputation(), mlir::foldAttributesIntoMap(), forEachIJPairInAllBuffers(), mlir::affine::fullyComposeAndComputeConstantDelta(), generateCopy(), generatePointWiseCopy(), getBroadcastingMap(), getCleanupLoopLowerBound(), getDimIdentityMap(), getMultiDimIdentityMap(), mlir::ValueBoundsConstraintSet::getPosExpr(), getSingleDimShiftAffineMap(), getXferIndices(), isTransposeMatrixLoadMap(), mlir::affine::loopUnrollJamByFactor(), mlir::affine::normalizeAffineFor(), packLinalgMetadataOnce(), processParallelLoop(), reduceMatchAndRewriteHelper(), resolveSourceIndicesCollapseShape(), mlir::linalg::rewriteInIm2Col(), setIntraTileBoundsParametric(), mlir::affine::simplifyConstrainedMinMaxOp(), and mlir::linalg::splitReduction().
Definition at line 314 of file Builders.cpp.
References mlir::get(), and getArrayAttr().
Referenced by mlir::vector::castAwayContractionLeadingOneDim(), mlir::linalg::deduplicateOperandsAndRemoveDeadResults(), mlir::linalg::fuseElementwiseOps(), and translateMap().
AffineExpr Builder::getAffineSymbolExpr | ( | unsigned | position | ) |
Definition at line 364 of file Builders.cpp.
References context, and mlir::getAffineSymbolExpr().
Referenced by mlir::scf::addLoopRangeConstraints(), mlir::alignAffineMapWithValues(), mlir::ValueBoundsConstraintSet::areOverlappingSlices(), mlir::affine::coalesceLoops(), mlir::ValueBoundsConstraintSet::computeBound(), mlir::linalg::computeContinuousTileSizes(), mlir::linalg::computeMultiTileSizes(), mlir::foldAttributesIntoMap(), getCollapsedOutputDimFromInputShape(), getFlatOffsetAndStrides(), mlir::ValueBoundsConstraintSet::getPosExpr(), getSymbolIdentityMap(), processParallelLoop(), setInterTileBoundsParametric(), setIntraTileBoundsParametric(), mlir::affine::simplifyConstrainedMinMaxOp(), and mlir::ValueBoundsConstraintSet::Variable::Variable().
Definition at line 262 of file Builders.cpp.
References context, and mlir::get().
Referenced by mlir::call_interface_impl::addArgAndResultAttrs(), mlir::vector::castAwayContractionLeadingOneDim(), mlir::sparse_tensor::constantOne(), mlir::sparse_tensor::constantZero(), mlir::convertFuncOpToLLVMFuncOp(), mlir::LLVM::ModuleImport::convertModuleFlagsMetadata(), mlir::LLVM::ModuleImport::convertParameterAttributes(), deserializeCacheControlDecoration(), mlir::sparse_tensor::LoopEmitter::enterCurrentCoIterationCase(), generateLoopNestUsingForallOp(), mlir::sparse_tensor::genValFromAttr(), getAffineMapArrayAttr(), getBoolArrayAttr(), getF32ArrayAttr(), getF64ArrayAttr(), getI32ArrayAttr(), getI64ArrayAttr(), getIndexArrayAttr(), mlir::getReassociationIndicesAttribute(), getStrArrayAttr(), getTypeArrayAttr(), mlir::detail::Parser::parseAttribute(), parseAttributesOp(), parseAttributions(), parseCreateOperationOpAttributes(), parseForeachMatchSymbols(), parseOperationOpAttributes(), parseVerCapExtAttr(), and translateMap().
|
inline |
Get or construct an instance of the attribute Attr
with provided arguments.
Definition at line 96 of file Builders.h.
References context, and mlir::get().
Referenced by mlir::tosa::buildConvOpQuantizationAttr(), mlir::tosa::buildMatMulOpQuantizationAttr(), mlir::tosa::buildPadOpQuantizationAttr(), mlir::tosa::buildUnaryOpQuantizationAttr(), mlir::LLVM::ModuleImport::convertModuleFlagsMetadata(), convertVecTypeHint(), deserializeCacheControlDecoration(), lookupOrCreateSPIRVFn(), mlir::gpu::mapParallelOp(), mlir::GPUFuncOpLowering::matchAndRewrite(), mlir::LLVM::ModuleImport::matchFPExceptionBehaviorAttr(), mlir::LLVM::ModuleImport::matchRoundingModeAttr(), parseOffloadingHandler(), mlir::LLVM::detail::LoopAnnotationImporter::translateAccessGroup(), and mlir::LLVM::ModuleImport::translateDereferenceableAttr().
FloatType Builder::getBF16Type | ( | ) |
Definition at line 37 of file Builders.cpp.
References context, and mlir::get().
ArrayAttr Builder::getBoolArrayAttr | ( | ArrayRef< bool > | values | ) |
Definition at line 266 of file Builders.cpp.
References getArrayAttr(), and getBoolAttr().
Referenced by foldTransferInBoundsAttribute(), inverseTransposeInBoundsAttr(), mlir::linalg::LinalgCopyVTRForwardingPattern::matchAndRewrite(), mlir::linalg::LinalgCopyVTWForwardingPattern::matchAndRewrite(), PadOpVectorizationWithTransferReadPattern::rewriteUser(), PadOpVectorizationWithTransferWritePattern::rewriteUser(), and mlir::vector::splitFullAndPartialTransfer().
BoolAttr Builder::getBoolAttr | ( | bool | value | ) |
Definition at line 96 of file Builders.cpp.
References context, and mlir::BoolAttr::get().
Referenced by boolCst(), buildBoolValue(), mlir::bufferization::buildDeallocationLibraryFunction(), convertBoolAttr(), getBoolArrayAttr(), hoistAffineIfOp(), mlir::detail::Parser::parseAttribute(), and reduceMatchAndRewriteHelper().
DenseIntElementsAttr Builder::getBoolVectorAttr | ( | ArrayRef< bool > | values | ) |
Vector-typed DenseIntElementsAttr getters. values
must not be empty.
Definition at line 112 of file Builders.cpp.
References mlir::DenseIntElementsAttr::get(), mlir::get(), and getI1Type().
AffineMap Builder::getConstantAffineMap | ( | int64_t | val | ) |
Returns a single constant result affine map with 0 dimensions and 0 symbols.
One constant result: () -> (val).
Definition at line 374 of file Builders.cpp.
References mlir::AffineMap::get(), and getAffineConstantExpr().
Referenced by mlir::affine::normalizeAffineFor(), parseBound(), and resolveSourceIndicesCollapseShape().
|
inline |
Definition at line 56 of file Builders.h.
References context.
Referenced by addAtomicRMW(), addComdat(), adjustMap(), allocateSubviewGPUMemoryInAddressSpace(), augmentMapAndBounds(), bitAndAddrspaceCast(), broadcastDynamicDimension(), mlir::tensor::bubbleUpPadSlice(), HopperBuilder::buildAndInitBarrierInSharedMemory(), HopperBuilder::buildBarrierArriveTx(), HopperBuilder::buildGlobalMemRefDescriptor(), buildLinearId(), buildLLVMFunctionType(), HopperBuilder::buildPredicateLoadsOnThread0(), HopperBuilder::buildTmaAsyncLoad(), buildUnrealizedCast(), castAllocFuncResult(), castToElemPtrPtr(), mlir::affine::coalesceLoops(), common3DIdBuilderFn(), commonLinearIdBuilderFn(), composedAffineMultiply(), computeIteratorTypesAndIndexingMaps(), mlir::memref::computeSuffixProductIRBlockImpl(), mlir::linalg::computeTileSizes(), constructTiledIndexSetHyperRect(), mlir::convertFuncOpToLLVMFuncOp(), convertFuncOpTypes(), convertIntrinsicResult(), createAsyncDispatchFunction(), createCtlzFunc(), createElementFPowIFunc(), createElementIPowIFunc(), createFullTiles(), mlir::LLVM::createGlobalString(), createGroupReduceOpImpl(), createI32ConstantOf(), createLinalgBodyCalculationForElementwiseOp(), mlir::tensor::createPadHighOp(), mlir::LLVM::createPrintStrCall(), createSubViewIntersection(), mlir::gpu::WarpDistributionPattern::delinearizeLaneId(), denormalizeInductionVariableForIndexType(), denormalizeIndVar(), mlir::linalg::dropUnitDims(), emitElementwiseComputation(), mlir::tensor::ExtractSliceFromCollapseHelper::emitLoopNestBody(), emitNormalizedLoopBoundsForIndexType(), mlir::impl::ensureRegionTerminator(), forEachIJPairInAllBuffers(), generateCopy(), generatePointWiseCopy(), getBoundedTileSize(), getBroadcastingMap(), getCleanupLoopLowerBound(), getCompressedMaskOp(), mlir::linalg::getConvolvedIndex(), mlir::affine::getDivMod(), getIndexArrayAttr(), getIndexingMapInExpandedOp(), getIndicesForLoadOrStore(), getLaneId(), mlir::nvgpu::getLaneIdAndValueIdToOperandCoord(), mlir::nvgpu::getLaneIdToLdMatrixMatrixCoord(), getLibraryCallSymbolRef(), mlir::memref::getLinearizedMemRefOffsetAndSize(), mlir::ConvertToLLVMPattern::getMemRefDescriptorSizes(), mlir::getMixedValues(), getOffsetForBitwidth(), mlir::sparse_tensor::getOpaquePointerType(), getProductOfIndexes(), getScalarConstantAsAttr(), getSharedAddressSpaceAttribute(), mlir::ConvertToLLVMPattern::getSizeInBytes(), getTileOffsetAndSizes(), mlir::tosa::getTosaConstShape(), getUserTileSizesAndNumThreads(), invertSliceIndexing(), mlir::affine::linearizeIndex(), mlir::linalg::lowerPack(), makeBufferRsrc(), mlir::affine::makeComposedAffineApply(), mlir::affine::makeComposedFoldedAffineApply(), makeComposedFoldedMinMax(), mlir::linalg::makeMemRefCopyOp(), mlir::GPUFuncOpLowering::matchAndRewrite(), mlir::GPUPrintfOpToHIPLowering::matchAndRewrite(), mlir::GPUPrintfOpToLLVMCallLowering::matchAndRewrite(), mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite(), mlir::gpu::index_lowering::OpLowering< Op, XOp, YOp, ZOp >::matchAndRewrite(), mlir::OneToNConversionPattern::matchAndRewrite(), mlir::ComposeReassociativeReshapeOps< ReshapeOpTy, opKind >::matchAndRewrite(), DeduplicateAffineMinMaxExpressions< T >::matchAndRewrite(), MergeAffineMinMaxOp< T >::matchAndRewrite(), mlir::affine::AffineBuilder::max(), mlir::OpToFuncCallLowering< SourceOp >::maybeCast(), mlir::dataflow::maybeReplaceWithConstant(), mlir::affine::mergeOffsetsSizesAndStrides(), mlir::affine::AffineBuilder::min(), mlir::x86vector::avx2::inline_asm::mm256BlendPsAsm(), mlir::mesh::moveLastSplitAxisInResharding(), movePaddingToFillOrGenericOp(), mlir::memref::multiBuffer(), normalizeUpperBounds(), mlir::linalg::offsetIndices(), mlir::outlineSingleBlockRegion(), parseNamedValueListImpl(), parseScheduleClause(), parseValueWithVariadicity(), peelForLoop(), mlir::LLVMTypeConverter::promoteOneMemRefDescriptor(), mlir::affine::resolveIndicesIntoOpWithOffsetsAndStrides(), resolveSourceIndicesExpandShape(), CopyBuilder::rewrite(), mlir::linalg::rewriteInIm2Col(), mlir::LLVM::ModuleImport::setFastmathFlagsAttr(), setInterTileBoundsParametric(), setIntraTileBoundsParametric(), mlir::UnrankedMemRefDescriptor::setSize(), mlir::UnrankedMemRefDescriptor::setStride(), mlir::UnrankedMemRefDescriptor::size(), mlir::MemRefDescriptor::size(), mlir::UnrankedMemRefDescriptor::sizeBasePtr(), sliceTransferIndices(), mlir::mesh::splitLastAxisInResharding(), mlir::linalg::splitOp(), mlir::UnrankedMemRefDescriptor::stride(), mlir::UnrankedMemRefDescriptor::strideBasePtr(), tileLinalgOpImpl(), mlir::x86vector::avx2::transpose4x8xf32(), mlir::x86vector::avx2::transpose8x8xf32(), transposeOneLinalgOperandAndReplace(), mlir::mesh::tryUpdateHaloInResharding(), mlir::mesh::unsplitLastAxisInResharding(), mlir::linalg::updateBoundsForCyclicDistribution(), updateExpandedGenericOpRegion(), and wrapExternalFunction().
DenseBoolArrayAttr Builder::getDenseBoolArrayAttr | ( | ArrayRef< bool > | values | ) |
Tensor-typed DenseArrayAttr getters.
Definition at line 147 of file Builders.cpp.
References context, and mlir::detail::DenseArrayAttrImpl< T >::get().
Referenced by mlir::parseDynamicIndexList().
DenseF32ArrayAttr Builder::getDenseF32ArrayAttr | ( | ArrayRef< float > | values | ) |
Definition at line 167 of file Builders.cpp.
References context, and mlir::detail::DenseArrayAttrImpl< T >::get().
DenseF64ArrayAttr Builder::getDenseF64ArrayAttr | ( | ArrayRef< double > | values | ) |
Definition at line 171 of file Builders.cpp.
References context, and mlir::detail::DenseArrayAttrImpl< T >::get().
DenseI16ArrayAttr Builder::getDenseI16ArrayAttr | ( | ArrayRef< int16_t > | values | ) |
Definition at line 155 of file Builders.cpp.
References context, and mlir::detail::DenseArrayAttrImpl< T >::get().
DenseI32ArrayAttr Builder::getDenseI32ArrayAttr | ( | ArrayRef< int32_t > | values | ) |
Definition at line 159 of file Builders.cpp.
References context, and mlir::detail::DenseArrayAttrImpl< int32_t >::get().
Referenced by mlir::gpu::addAsyncDependency(), convertDenseI32Array(), mlir::ROCDL::getAMDHSAKernelsELFMetadata(), ConsolidateTransposeOptimization::matchAndRewrite(), parseCommonStructuredOpParts(), and setProfilingAttr().
DenseI64ArrayAttr Builder::getDenseI64ArrayAttr | ( | ArrayRef< int64_t > | values | ) |
Definition at line 163 of file Builders.cpp.
References context, and mlir::detail::DenseArrayAttrImpl< T >::get().
Referenced by mlir::parseDynamicIndexList(), mlir::transform::parsePackedOrDynamicIndexList(), parseSwitchCases(), and mlir::transform::parseTransformMatchDims().
DenseI8ArrayAttr Builder::getDenseI8ArrayAttr | ( | ArrayRef< int8_t > | values | ) |
Definition at line 151 of file Builders.cpp.
References context, and mlir::detail::DenseArrayAttrImpl< T >::get().
DictionaryAttr Builder::getDictionaryAttr | ( | ArrayRef< NamedAttribute > | value | ) |
Definition at line 100 of file Builders.cpp.
References context, and mlir::get().
Referenced by mlir::call_interface_impl::addArgAndResultAttrs(), mlir::LLVM::ModuleImport::convertParameterAttributes(), mlir::ROCDL::getKernelMetadata(), handleArgumentImpl(), handleResultImpl(), mlir::GPUFuncOpLowering::matchAndRewrite(), parseAttributions(), and propagateArgResAttrs().
AffineMap Builder::getDimIdentityMap | ( | ) |
Definition at line 379 of file Builders.cpp.
References mlir::AffineMap::get(), and getAffineDimExpr().
Referenced by buildAffineLoopFromValues(), constructTiledIndexSetHyperRect(), mlir::gpu::mapParallelOp(), and mlir::affine::promoteIfSingleIteration().
AffineMap Builder::getEmptyAffineMap | ( | ) |
Returns a zero result affine map with no dimensions or symbols: () -> ().
Definition at line 372 of file Builders.cpp.
References context, and mlir::AffineMap::get().
Referenced by parseAffineMapWithMinMax().
FloatType Builder::getF128Type | ( | ) |
Definition at line 49 of file Builders.cpp.
References context, and mlir::get().
FloatAttr Builder::getF16FloatAttr | ( | float | value | ) |
Definition at line 246 of file Builders.cpp.
References mlir::get(), and getF16Type().
FloatType Builder::getF16Type | ( | ) |
Definition at line 39 of file Builders.cpp.
References context, and mlir::get().
Referenced by convertIntrinsicResult(), and getF16FloatAttr().
ArrayAttr Builder::getF32ArrayAttr | ( | ArrayRef< float > | values | ) |
Definition at line 290 of file Builders.cpp.
References getArrayAttr(), and getF32FloatAttr().
FloatAttr Builder::getF32FloatAttr | ( | float | value | ) |
Definition at line 242 of file Builders.cpp.
References mlir::get(), and getF32Type().
Referenced by convertFloatAttr(), f32Cst(), genConstFloat32From(), and getF32ArrayAttr().
FloatType Builder::getF32Type | ( | ) |
Definition at line 43 of file Builders.cpp.
References context, and mlir::get().
Referenced by castToF32(), convertIntrinsicResult(), exp2I32(), f32FromBits(), frexp(), genConstFloat32From(), getF32FloatAttr(), getF32VectorAttr(), insertCasts(), and unpackOperandVector().
DenseFPElementsAttr Builder::getF32VectorAttr | ( | ArrayRef< float > | values | ) |
Definition at line 136 of file Builders.cpp.
References mlir::DenseFPElementsAttr::get(), mlir::get(), and getF32Type().
ArrayAttr Builder::getF64ArrayAttr | ( | ArrayRef< double > | values | ) |
Definition at line 296 of file Builders.cpp.
References getArrayAttr(), and getF64FloatAttr().
FloatAttr Builder::getF64FloatAttr | ( | double | value | ) |
Definition at line 238 of file Builders.cpp.
References mlir::get(), and getF64Type().
Referenced by getF64ArrayAttr().
FloatType Builder::getF64Type | ( | ) |
Definition at line 45 of file Builders.cpp.
References context, and mlir::get().
Referenced by convertIntrinsicResult(), getF64FloatAttr(), getF64VectorAttr(), mlir::GPUPrintfOpToHIPLowering::matchAndRewrite(), mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite(), mlir::detail::Parser::parseFloatAttr(), and unpackOperandVector().
DenseFPElementsAttr Builder::getF64VectorAttr | ( | ArrayRef< double > | values | ) |
Definition at line 141 of file Builders.cpp.
References mlir::DenseFPElementsAttr::get(), mlir::get(), and getF64Type().
FloatType Builder::getF80Type | ( | ) |
Definition at line 47 of file Builders.cpp.
References context, and mlir::get().
FloatAttr Builder::getFloatAttr | ( | Type | type, |
const APFloat & | value | ||
) |
Definition at line 254 of file Builders.cpp.
References mlir::get().
FloatAttr Builder::getFloatAttr | ( | Type | type, |
double | value | ||
) |
Definition at line 250 of file Builders.cpp.
References mlir::get().
Referenced by mlir::arith::ConstantFloatOp::build(), mlir::complex::convertDivToLLVMUsingRangeReduction(), mlir::complex::convertDivToStandardUsingRangeReduction(), createElementFPowIFunc(), createFloatConst(), createFPConstant(), createInitialValueForReduceOp(), createLinalgBodyCalculationForElementwiseOp(), mlir::tosa::createPadConstTensor(), mlir::createScalarOrSplatConstant(), mlir::tosa::createZeroPointTensor(), declareReduction(), floatCst(), mlir::arith::getIdentityValueAttr(), mlir::sparse_tensor::getOneAttr(), getOneAttr(), getScalarConstantAsAttr(), getZeroAttr(), ClampClampOptimization::matchAndRewrite(), and reduceMatchAndRewriteHelper().
Definition at line 76 of file Builders.cpp.
References context, and mlir::get().
Referenced by mlir::bufferization::buildDeallocationLibraryFunction(), createAsyncDispatchFunction(), getLibraryCallSymbolRef(), getParallelComputeFunctionType(), lowerAsEntryFunction(), and mlir::detail::Parser::parseFunctionType().
Definition at line 29 of file Builders.cpp.
References context, and mlir::get().
IntegerAttr Builder::getI16IntegerAttr | ( | int16_t | value | ) |
Definition at line 213 of file Builders.cpp.
References mlir::get(), and getIntegerType().
Referenced by makeBufferRsrc().
IntegerType Builder::getI16Type | ( | ) |
Definition at line 61 of file Builders.cpp.
References context, and mlir::get().
Referenced by convertMFMAVectorOperand(), makeBufferRsrc(), wmmaPushInputOperand(), and wmmaPushOutputOperand().
IntegerType Builder::getI1Type | ( | ) |
Definition at line 53 of file Builders.cpp.
References context, and mlir::get().
Referenced by mlir::bufferization::buildDeallocationLibraryFunction(), HopperBuilder::buildTryWaitParity(), mlir::linalg::createDestinationPassingStyleInitOperand(), createI1Constant(), mlir::vector::createReadOrMaskedRead(), mlir::ControlFlowToSCFTransformation::createStructuredDoWhileLoopOp(), createWriteOrMaskedWrite(), genExpand(), mlir::sparse_tensor::SparseIterator::genNotEnd(), getBoolVectorAttr(), getCompressedMaskOp(), and vectorizeAsInsertSliceOp().
IntegerType Builder::getI2Type | ( | ) |
Definition at line 55 of file Builders.cpp.
References context, and mlir::get().
ArrayAttr Builder::getI32ArrayAttr | ( | ArrayRef< int32_t > | values | ) |
Definition at line 272 of file Builders.cpp.
References getArrayAttr(), and getI32IntegerAttr().
Referenced by mlir::spirv::getDefaultResourceLimits().
IntegerAttr Builder::getI32IntegerAttr | ( | int32_t | value | ) |
Definition at line 196 of file Builders.cpp.
References mlir::get(), and getIntegerType().
Referenced by broadcast(), convertIntegerMD(), convertIntrinsicResult(), mlir::ControlFlowToSCFTransformation::getCFGSwitchValue(), getI32ArrayAttr(), mlir::spirv::getPushConstantValue(), getScalarOrVectorI32Constant(), i32Cst(), mlir::OpToFuncCallLowering< SourceOp >::matchAndRewrite(), parseInterfaceVarABIAttr(), and parseVerCapExtAttr().
DenseIntElementsAttr Builder::getI32TensorAttr | ( | ArrayRef< int32_t > | values | ) |
Tensor-typed DenseIntElementsAttr getters.
values
can be empty. These are generally preferable for representing general lists of integers as attributes.
Definition at line 175 of file Builders.cpp.
References mlir::DenseIntElementsAttr::get(), mlir::get(), and getIntegerType().
Referenced by parseAffineMapWithMinMax().
IntegerType Builder::getI32Type | ( | ) |
Definition at line 63 of file Builders.cpp.
References context, and mlir::get().
Referenced by mlir::tosa::buildConvOpResultTypeInfo(), buildMatMulOpWithQuantInfo(), convertIntrinsicResult(), convertMFMAVectorOperand(), convertRoundOp(), convertUnsignedToI32(), createI32Constant(), createI32ConstantOf(), createLinalgBodyCalculationForElementwiseOp(), getLinearIndexI32(), mlir::GPUPrintfOpToHIPLowering::matchAndRewrite(), mlir::GPUPrintfOpToLLVMCallLowering::matchAndRewrite(), mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite(), ConvertLoad::matchAndRewrite(), truncToI32(), unpackOperandVector(), and wmmaPushInputOperand().
DenseIntElementsAttr Builder::getI32VectorAttr | ( | ArrayRef< int32_t > | values | ) |
Definition at line 118 of file Builders.cpp.
References mlir::DenseIntElementsAttr::get(), mlir::get(), and getIntegerType().
Referenced by getScalarOrVectorI32Constant().
IntegerType Builder::getI4Type | ( | ) |
Definition at line 57 of file Builders.cpp.
References context, and mlir::get().
Referenced by rewriteI8ToI4Trunc().
ArrayAttr Builder::getI64ArrayAttr | ( | ArrayRef< int64_t > | values | ) |
Definition at line 277 of file Builders.cpp.
References getArrayAttr(), and getI64IntegerAttr().
Referenced by mlir::linalg::blockPackMatmul(), foldExtractStridedOpFromInsertChain(), mlir::getReassociationIndicesAttribute(), mlir::vector::getVectorSubscriptAttr(), staticallyExtractSubvector(), and staticallyInsertSubvector().
IntegerAttr Builder::getI64IntegerAttr | ( | int64_t | value | ) |
Definition at line 108 of file Builders.cpp.
References mlir::get(), and getIntegerType().
Referenced by allocBuffer(), mlir::bufferization::BufferizationOptions::createAlloc(), dropRefIfNoUses(), mlir::sparse_tensor::LoopEmitter::enterCurrentCoIterationCase(), mlir::ROCDL::getAMDHSAKernelsELFMetadata(), getI64ArrayAttr(), mlir::linalg::getMixedTilesImpl(), handleByValArgumentInit(), mlir::GPUFuncOpLowering::matchAndRewrite(), parseCmpOp(), parseCommonGlobalAndAlias(), mlir::vector::splitFullAndPartialTransfer(), and unpackOperandVector().
DenseIntElementsAttr Builder::getI64TensorAttr | ( | ArrayRef< int64_t > | values | ) |
Definition at line 182 of file Builders.cpp.
References mlir::DenseIntElementsAttr::get(), mlir::get(), and getIntegerType().
IntegerType Builder::getI64Type | ( | ) |
Definition at line 65 of file Builders.cpp.
References context, and mlir::get().
Referenced by createTruncatedFPValue(), mlir::sparse_tensor::genIndexLoad(), mlir::bufferization::getGlobalFor(), handleByValArgumentInit(), mlir::GPUPrintfOpToHIPLowering::matchAndRewrite(), mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite(), matchAndRewriteSortOp(), parseSynchronizationHint(), mlir::LLVMTypeConverter::promoteOneMemRefDescriptor(), and unpackOperandVector().
DenseIntElementsAttr Builder::getI64VectorAttr | ( | ArrayRef< int64_t > | values | ) |
Definition at line 124 of file Builders.cpp.
References mlir::DenseIntElementsAttr::get(), mlir::get(), and getIntegerType().
Referenced by mlir::linalg::DownscaleSizeOneWindowed2DConvolution< Conv2DOp, Conv1DOp >::returningMatchAndRewrite(), and mlir::linalg::DownscaleDepthwiseConv2DNhwcHwcOp::returningMatchAndRewrite().
IntegerAttr Builder::getI8IntegerAttr | ( | int8_t | value | ) |
Definition at line 217 of file Builders.cpp.
References mlir::get(), and getIntegerType().
IntegerType Builder::getI8Type | ( | ) |
Definition at line 59 of file Builders.cpp.
References context, and mlir::get().
Referenced by bitcastSubByteVectorToI8(), mlir::LLVM::createPrintStrCall(), mlir::GPUPrintfOpToHIPLowering::matchAndRewrite(), and unpackOperandVector().
ArrayAttr Builder::getIndexArrayAttr | ( | ArrayRef< int64_t > | values | ) |
Definition at line 283 of file Builders.cpp.
References mlir::get(), getArrayAttr(), getContext(), and getIntegerAttr().
IntegerAttr Builder::getIndexAttr | ( | int64_t | value | ) |
Definition at line 104 of file Builders.cpp.
References mlir::get(), and getIndexType().
Referenced by applyPad(), mlir::tensor::bubbleUpPadSlice(), mlir::arith::ConstantIndexOp::build(), mlir::bufferization::buildDeallocationLibraryFunction(), mlir::tensor::buildIndependentOp(), buildPackingLoopNestImpl(), mlir::memref::computeSuffixProductIRBlock(), computeTargetSize(), mlir::linalg::computeTileOffsets(), constifyIndexValues(), convertTransferReadOp(), convertTransferWriteOp(), convertTransferWriteToStores(), mlir::nvgpu::createAsyncGroups(), mlir::tensor::createCanonicalRankReducingExtractSliceOp(), mlir::tensor::createCanonicalRankReducingInsertSliceOp(), mlir::memref::createCanonicalRankReducingSubViewOp(), mlir::linalg::createFoldedDimOp(), createIndex(), createIndexAttrConstant(), createNonLdMatrixLoads(), mlir::tensor::createPadHighOp(), createSplitPart(), createSubViewIntersection(), mlir::affine::delinearizeIndex(), emitNormalizedLoopBoundsForIndexType(), expandValue(), foldExtractFromBroadcast(), fuse(), generateLoopNestUsingForallOp(), generateLoopNestUsingForOp(), getCollapsedOutputDimFromInputShape(), getDimValue(), getFlatOffsetAndStrides(), mlir::AllocationOpLLVMLowering::getIndexType(), mlir::memref::getLinearizedMemRefOffsetAndSize(), mlir::bufferization::DeallocationState::getMemrefsAndConditionsToDeallocate(), mlir::memref::getMixedSize(), mlir::tensor::getMixedSize(), mlir::sparse_tensor::getOneAttr(), getOneAttr(), mlir::tensor::getOrCreateDestination(), getOrFoldTensorDim(), getProductOfIndexes(), mlir::getSimplifiedOfrAndStaticSizePair(), getTileOffsetAndSizes(), getUserTileSizesAndNumThreads(), getZeroAttr(), mlir::affine::linearizeIndex(), mlir::loopUnrollJamByFactor(), mlir::linalg::lowerPack(), mlir::linalg::lowerUnPack(), mlir::linalg::makeTiledLoopRanges(), mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite(), mlir::linalg::DecomposeOuterUnitDimsPackOpPattern::matchAndRewrite(), mlir::linalg::DecomposeOuterUnitDimsUnPackOpPattern::matchAndRewrite(), mlir::linalg::DecomposePadOpPattern::matchAndRewrite(), mlir::affine::materializeComputedBound(), mlir::memref::multiBuffer(), normalizeForallLoopOp(), mlir::LLVMTypeConverter::promoteOneMemRefDescriptor(), mlir::linalg::promoteSubviewAsNewBuffer(), rankReducingSubviewDroppingUnitDims(), mlir::arith::reifyValueBound(), replaceByPackingResult(), replaceForAllWithNewSignature(), mlir::affine::resolveIndicesIntoOpWithOffsetsAndStrides(), resolveSourceIndicesExpandShape(), mlir::linalg::rewriteAsPaddedOp(), mlir::linalg::rewriteInDestinationPassingStyle(), mlir::tensor::simplifyCollapseShapeWithRankReducingExtractSlice(), mlir::scf::tileAndFuseConsumerOfSlice(), tileLinalgOpImpl(), mlir::linalg::tileReductionUsingForall(), mlir::linalg::unrollIndex(), and mlir::scf::yieldReplacementForFusedProducer().
DenseIntElementsAttr Builder::getIndexTensorAttr | ( | ArrayRef< int64_t > | values | ) |
Definition at line 189 of file Builders.cpp.
References mlir::DenseIntElementsAttr::get(), mlir::get(), and getIndexType().
Referenced by mlir::tosa::getTosaConstShape().
IndexType Builder::getIndexType | ( | ) |
Definition at line 51 of file Builders.cpp.
References context, and mlir::get().
Referenced by mlir::arith::ConstantIndexOp::build(), mlir::bufferization::buildDeallocationLibraryFunction(), buildLinearId(), common3DIdBuilderFn(), convertTransferWriteToStores(), convVals(), createAsyncDispatchFunction(), mlir::mesh::createCollectiveProcessGroupSize(), createCtlzFunc(), createFor(), createForAllDimensions(), mlir::arm_sme::createLoopOverTileSlices(), createNewDynamicSizes(), createNonLdMatrixLoads(), mlir::ControlFlowToSCFTransformation::createStructuredBranchRegionOp(), deduplicateAndResolveOperands(), mlir::sparse_tensor::SparseIterator::deref(), doSequentialDispatch(), dumpIndexMemRef(), dynamicallyExtractSubVector(), dynamicallyInsertSubVector(), mlir::sparse_tensor::LoopEmitter::enterCurrentCoIterationCase(), extractOne(), genCompressed(), genExpand(), genIf(), mlir::sparse_tensor::genIndexLoad(), genInsertionStore(), genLoad(), mlir::sparse_tensor::genReader(), genStore(), getIndexAttr(), getIndexTensorAttr(), getIndexVectorAttr(), mlir::linalg::getNewMixedTileSizes(), mlir::sparse_tensor::getOverheadType(), getParallelComputeFunctionType(), insertCopyLoops(), insertOne(), makeComposedMinMax(), mlir::affine::AffineDmaStartOp::parse(), mlir::affine::AffineDmaWaitOp::parse(), parseAffineMinMaxOp(), parseBound(), mlir::affine::parseDimAndSymbolList(), parseLevelRange(), mlir::detail::Parser::parseNonFunctionType(), scalarizeVectorOpHelper(), mlir::vector::splitFullAndPartialTransfer(), and wrapExternalFunction().
DenseIntElementsAttr Builder::getIndexVectorAttr | ( | ArrayRef< int64_t > | values | ) |
Definition at line 130 of file Builders.cpp.
References mlir::DenseIntElementsAttr::get(), mlir::get(), and getIndexType().
IntegerAttr Builder::getIntegerAttr | ( | Type | type, |
const APInt & | value | ||
) |
Definition at line 234 of file Builders.cpp.
References mlir::get().
IntegerAttr Builder::getIntegerAttr | ( | Type | type, |
int64_t | value | ||
) |
Definition at line 224 of file Builders.cpp.
References mlir::get(), mlir::Type::getIntOrFloatBitWidth(), mlir::Type::isIndex(), and mlir::Type::isSignedInteger().
Referenced by adjustAccessChainForBitwidth(), mlir::arith::ConstantIntOp::build(), ceilDivPositive(), convertIntegerAttr(), createConst(), createCtlzFunc(), createElementFPowIFunc(), createElementIPowIFunc(), createExtractAndCast(), createI32ConstantOf(), createInitialValueForReduceOp(), createInsertAndCast(), createIntConst(), createLinalgBodyCalculationForElementwiseOp(), createNewDynamicSizes(), mlir::tosa::createPadConstTensor(), mlir::createScalarOrSplatConstant(), mlir::tosa::createZeroPointTensor(), declareReduction(), extractOne(), mlir::arith::getIdentityValueAttr(), getIndexArrayAttr(), mlir::linalg::getNewMixedTileSizes(), getOffsetForBitwidth(), mlir::sparse_tensor::getOneAttr(), getOneAttr(), getScalarConstantAsAttr(), getScalarOrVectorConstInt(), getSubByteWriteMask(), mlir::getValueOrCreateConstantIntOp(), getZeroAttr(), insertOne(), mlir::loopUnrollByFactor(), CmpFIntToFPConst::matchAndRewrite(), ConvertAccessChain::matchAndRewrite(), ClampClampOptimization::matchAndRewrite(), mlir::dataflow::maybeReplaceWithConstant(), minusOneIntegerAttribute(), mlir::detail::Parser::parseDecOrHexAttr(), parseMapClause(), and wrapExternalFunction().
IntegerType Builder::getIntegerType | ( | unsigned | width | ) |
Definition at line 67 of file Builders.cpp.
References context, and mlir::get().
Referenced by allocBuffer(), broadcast(), mlir::arith::ConstantIntOp::build(), mlir::tosa::buildConvOpResultTypeInfo(), buildMatMulOpWithQuantInfo(), castToSameSizedInt(), convertMFMAVectorOperand(), convertRoundEvenOp(), createEqCompare(), createExtractAndCast(), createLessThanCompare(), createLinalgBodyCalculationForElementwiseOp(), flattenVecToBits(), frexp(), genCompressed(), genConstInt32From(), mlir::tosa::getConstTensorInt(), getI16IntegerAttr(), getI32IntegerAttr(), getI32TensorAttr(), getI32VectorAttr(), getI64IntegerAttr(), getI64TensorAttr(), getI64VectorAttr(), getI8IntegerAttr(), getOffsetForBitwidth(), mlir::sparse_tensor::getOverheadType(), getSI32IntegerAttr(), getSubByteWriteMask(), getUI32IntegerAttr(), mlir::spirv::getUnaryOpResultType(), mlir::vector::getVectorSubscriptType(), mlir::GPUPrintfOpToLLVMCallLowering::matchAndRewrite(), mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite(), mlir::OpToFuncCallLowering< SourceOp >::matchAndRewrite(), mlir::detail::Parser::parseDecOrHexAttr(), parseMapClause(), parseMembersIndex(), mlir::detail::Parser::parseSparseElementsAttr(), parseStorageType(), shiftValue(), mlir::linalg::splitReductionByScaling(), unpackOperandVector(), and wmmaPushInputOperand().
IntegerType Builder::getIntegerType | ( | unsigned | width, |
bool | isSigned | ||
) |
Definition at line 71 of file Builders.cpp.
References context, mlir::get(), and mlir::quant::QuantizationFlags::Signed.
AffineMap Builder::getMultiDimIdentityMap | ( | unsigned | rank | ) |
Definition at line 383 of file Builders.cpp.
References context, mlir::AffineMap::get(), and getAffineDimExpr().
Referenced by broadcastDynamicDimension(), mlir::affine::createAffineComputationSlice(), emitElementwiseComputation(), mlir::sparse_tensor::foreachInSparseConstant(), generateCopy(), linalgBroadcastAndMaybeExt(), movePaddingToFillOrGenericOp(), mlir::affine::replaceAllMemRefUsesWith(), mlir::linalg::rewriteInDestinationPassingStyle(), mlir::linalg::splitReduction(), mlir::linalg::splitReductionByScaling(), transformMemRefLoadWithReducedRank(), and mlir::linalg::vectorizeCopy().
NamedAttribute Builder::getNamedAttr | ( | StringRef | name, |
Attribute | val | ||
) |
Definition at line 90 of file Builders.cpp.
Referenced by mlir::convertFuncOpToLLVMFuncOp(), mlir::GPUFuncOpLowering::matchAndRewrite(), and mlir::impl::parseOptionalVisibilityKeyword().
NoneType Builder::getNoneType | ( | ) |
Definition at line 84 of file Builders.cpp.
References context, and mlir::get().
Referenced by mlir::spirv::parseEnumStrAttr(), and mlir::detail::Parser::parseNonFunctionType().
TypedAttr Builder::getOneAttr | ( | Type | type | ) |
Definition at line 338 of file Builders.cpp.
References mlir::DenseElementsAttr::get(), getFloatAttr(), getIndexAttr(), and getIntegerAttr().
Referenced by ceilDivPositive(), mlir::arith::createProduct(), mlir::emitNormalizedLoopBounds(), and getProductOfIntsOrIndexes().
Returns an affine map that is a translation (shift) of all result expressions in 'map' by 'shift'.
Eg: input: (d0, d1)[s0] -> (d0, d1 + s0), shift = 2 returns: (d0, d1)[s0] -> (d0 + 2, d1 + s0 + 2)
Definition at line 403 of file Builders.cpp.
References context, mlir::AffineMap::get(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), and mlir::AffineMap::getResults().
Referenced by mlir::affine::affineForOpBodySkew().
IntegerAttr Builder::getSI32IntegerAttr | ( | int32_t | value | ) |
Signed and unsigned integer attribute getters.
Definition at line 203 of file Builders.cpp.
References mlir::get(), and getIntegerType().
AffineMap Builder::getSingleDimShiftAffineMap | ( | int64_t | shift | ) |
Returns a map that shifts its (single) input dimension by 'shift'.
(d0) -> (d0 + shift)
Definition at line 397 of file Builders.cpp.
References mlir::AffineMap::get(), and getAffineDimExpr().
Referenced by constructTiledIndexSetHyperRect().
ArrayAttr Builder::getStrArrayAttr | ( | ArrayRef< StringRef > | values | ) |
Definition at line 302 of file Builders.cpp.
References getArrayAttr(), and getStringAttr().
Referenced by mlir::LLVM::ModuleImport::convertDependentLibrariesMetadata(), mlir::LLVM::ModuleImport::convertLinkerOptionsMetadata(), and mlir::spirv::getStrArrayAttrForEnumList().
StringAttr Builder::getStringAttr | ( | const Twine & | bytes | ) |
Definition at line 258 of file Builders.cpp.
References context, and mlir::get().
Referenced by addBodyWithPayloadOp(), mlir::linalg::computeMultiTileSizes(), mlir::LLVM::ModuleImport::convertCommandlineMetadata(), mlir::LLVM::ModuleImport::convertIdentMetadata(), mlir::LLVM::ModuleImport::convertModuleFlagsMetadata(), mlir::LLVM::ModuleImport::convertTargetTriple(), mlir::LLVM::createGlobalString(), createLinalgBodyCalculationForElementwiseOp(), mlir::sparse_tensor::SparseIterator::deref(), emitIsPositiveIndexAssertion(), mlir::sparse_tensor::SparseIterator::forward(), mlir::sparse_tensor::SparseIterator::genInit(), mlir::sparse_tensor::SparseIterator::genNotEnd(), mlir::ROCDL::getAMDHSAKernelsELFMetadata(), mlir::bufferization::getGlobalFor(), mlir::getOrCreateStringConstant(), getStrArrayAttr(), hoistAffineIfOp(), mlir::sparse_tensor::SparseIterator::locate(), ClampClampOptimization::matchAndRewrite(), mlir::LLVM::detail::oneToOneRewrite(), mlir::detail::Parser::parseAttributeDict(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalSymbolName(), mlir::impl::parseOptionalVisibilityKeyword(), parseVerCapExtAttr(), and mlir::LLVM::detail::vectorOneToOneRewrite().
AffineMap Builder::getSymbolIdentityMap | ( | ) |
Definition at line 392 of file Builders.cpp.
References mlir::AffineMap::get(), and getAffineSymbolExpr().
Referenced by parseBound().
FloatType Builder::getTF32Type | ( | ) |
Definition at line 41 of file Builders.cpp.
References context, and mlir::get().
TupleType Builder::getTupleType | ( | TypeRange | elementTypes | ) |
Definition at line 80 of file Builders.cpp.
References context, and mlir::get().
|
inline |
Get or construct an instance of the type Ty
with provided arguments.
Definition at line 89 of file Builders.h.
References context, and mlir::get().
Referenced by mlir::GPUFuncOpLowering::matchAndRewrite(), parseAsyncDependencies(), mlir::arith::parseFloatType(), mlir::detail::Parser::parseNonFunctionType(), and parseResultsValueType().
ArrayAttr Builder::getTypeArrayAttr | ( | TypeRange | values | ) |
Definition at line 308 of file Builders.cpp.
References mlir::get(), and getArrayAttr().
IntegerAttr Builder::getUI32IntegerAttr | ( | uint32_t | value | ) |
Definition at line 208 of file Builders.cpp.
References mlir::get(), and getIntegerType().
UnitAttr Builder::getUnitAttr | ( | ) |
Definition at line 94 of file Builders.cpp.
References context, and mlir::get().
Referenced by annotateConflict(), annotateNonWritableTensor(), convertTransferReadOp(), mlir::nvgpu::createAsyncGroups(), mlir::GPUFuncOpLowering::matchAndRewrite(), outlineKernelFuncImpl(), mlir::detail::Parser::parseAttribute(), mlir::detail::Parser::parseAttributeDict(), parseCommonGlobalAndAlias(), parseCreateOperationOpResults(), mlir::detail::Parser::parseDistinctAttr(), and mlir::transform::parseTransformMatchDims().
Location Builder::getUnknownLoc | ( | ) |
Definition at line 27 of file Builders.cpp.
References context, and mlir::get().
Referenced by addBodyWithPayloadOp(), mlir::detail::ConversionPatternRewriterImpl::applySignatureConversion(), mlir::tosa::buildQTypeFromMinMax(), buildUnrealizedCast(), and fillStructuredOpRegion().
TypedAttr Builder::getZeroAttr | ( | Type | type | ) |
Definition at line 320 of file Builders.cpp.
References mlir::DenseElementsAttr::get(), getFloatAttr(), getIndexAttr(), and getIntegerAttr().
Referenced by mlir::sparse_tensor::Merger::buildExp(), mlir::sparse_tensor::buildRelu(), mlir::sparse_tensor::constantOne(), mlir::sparse_tensor::constantZero(), mlir::complex::convertDivToLLVMUsingRangeReduction(), mlir::complex::convertDivToStandardUsingRangeReduction(), createLinalgBodyCalculationForElementwiseOp(), createNonLdMatrixLoads(), mlir::emitNormalizedLoopBounds(), extractSliceIntoByte(), mlir::arith::getIdentityValueAttr(), handleMultidimensionalVectors(), isSupportedElementType(), mlir::linalg::lowerPack(), CanonicalizeContractAdd< AddOpType >::matchAndRewrite(), Convert1DExtractStridedSliceIntoExtractInsertChain::matchAndRewrite(), DecomposeNDExtractStridedSlice::matchAndRewrite(), mlir::linalg::pack(), reshapeLoad(), mlir::linalg::rewriteAsPaddedOp(), vectorizeAsInsertSliceOp(), vectorizeAsTensorPackOp(), and vectorizeAsTensorUnpackOp().
|
protected |
Definition at line 200 of file Builders.h.
Referenced by getAffineConstantExpr(), getAffineDimExpr(), getAffineSymbolExpr(), getArrayAttr(), getAttr(), getBF16Type(), getBoolAttr(), getContext(), getDenseBoolArrayAttr(), getDenseF32ArrayAttr(), getDenseF64ArrayAttr(), getDenseI16ArrayAttr(), getDenseI32ArrayAttr(), getDenseI64ArrayAttr(), getDenseI8ArrayAttr(), getDictionaryAttr(), getEmptyAffineMap(), getF128Type(), getF16Type(), getF32Type(), getF64Type(), getF80Type(), getFunctionType(), getFusedLoc(), getI16Type(), getI1Type(), getI2Type(), getI32Type(), getI4Type(), getI64Type(), getI8Type(), getIndexType(), getIntegerType(), getMultiDimIdentityMap(), getNoneType(), getShiftedAffineMap(), getStringAttr(), getTF32Type(), getTupleType(), getType(), getUnitAttr(), and getUnknownLoc().