MLIR
15.0.0git
|
Namespaces | |
analysis_impl | |
pass_options | |
pdl_function_builder | |
storage_user_base_impl | |
Classes | |
class | AbstractLatticeElement |
This class represents an abstract lattice. More... | |
struct | AffineBinaryOpExprStorage |
A binary operation appearing in an affine expression. More... | |
struct | AffineConstantExprStorage |
An integer constant appearing in affine expression. More... | |
struct | AffineDimExprStorage |
A dimensional or symbolic identifier appearing in an affine expression. More... | |
struct | AffineExprStorage |
Base storage class appearing in an affine expression. More... | |
struct | AffineMapAccessInterfaceInterfaceTraits |
struct | AffineMapAccessInterfaceTrait |
struct | AffineMapStorage |
struct | AffineReadOpInterfaceInterfaceTraits |
struct | AffineReadOpInterfaceTrait |
struct | AffineWriteOpInterfaceInterfaceTraits |
struct | AffineWriteOpInterfaceTrait |
struct | AliasAnalysisTraits |
This class contains various internal trait classes used by the main AliasAnalysis class below. More... | |
struct | AnalysisConcept |
The abstract polymorphic base class representing an analysis. More... | |
class | AnalysisMap |
This class represents a cache of analyses for a single operation. More... | |
struct | AnalysisModel |
A derived analysis model used to hold a specific analysis object. More... | |
struct | AnyCapturedValueMatcher |
Terminal matcher, always returns true. More... | |
struct | AnyValueMatcher |
Terminal matcher, always returns true. More... | |
class | AsmParserImpl |
This class provides the implementation of the generic parser methods within AsmParser. More... | |
class | AsmStateImpl |
struct | attr_value_binder |
The matcher that matches a certain kind of Attribute and binds the value inside the Attribute. More... | |
class | AttributeUniquer |
class | BlockArgumentImpl |
The internal implementation of a BlockArgument. More... | |
class | CallbackOstream |
A simple raw ostream subclass that forwards write_impl calls to the user-supplied callback together with opaque user-supplied data. More... | |
struct | constant_float_op_binder |
The matcher that matches a constant scalar / vector splat / tensor splat float operation and binds the constant float value. More... | |
struct | constant_float_predicate_matcher |
The matcher that matches a given target constant scalar / vector splat / tensor splat float value that fulfills a predicate. More... | |
struct | constant_int_op_binder |
The matcher that matches a constant scalar / vector splat / tensor splat integer operation and binds the constant integer value. More... | |
struct | constant_int_predicate_matcher |
The matcher that matches a given target constant scalar / vector splat / tensor splat integer value that fulfills a predicate. More... | |
struct | constant_op_binder |
The matcher that matches operations that have the ConstantLike trait, and binds the folded attribute value. More... | |
struct | constant_op_matcher |
The matcher that matches operations that have the ConstantLike trait. More... | |
struct | ConversionPatternRewriterImpl |
struct | count_if_t_impl |
Template utility that computes the number of elements within T that satisfy the given predicate. More... | |
struct | count_if_t_impl< Pred, N, T, Us... > |
class | DefaultTimingManagerImpl |
Implementation details of the DefaultTimingManager . More... | |
class | DenseElementIndexedIteratorImpl |
Impl iterator for indexed DenseElementsAttr iterators that records a data pointer and data index that is adjusted for the case of a splat attribute. More... | |
struct | DenseElementsAttributeStorage |
An attribute representing a reference to a dense vector or tensor object. More... | |
struct | DenseIntOrFPElementsAttrStorage |
An attribute representing a reference to a dense vector or tensor object. More... | |
struct | DenseStringElementsAttrStorage |
An attribute representing a reference to a dense vector or tensor object containing strings. More... | |
struct | DiagnosticEngineImpl |
class | DialectInterfaceBase |
The base class used for all derived interface types. More... | |
class | DialectInterfaceCollectionBase |
This class is the base class for a collection of instances for a specific interface kind. More... | |
class | DominanceInfoBase |
struct | DynamicAttrStorage |
Storage of DynamicAttr. More... | |
struct | DynamicTypeStorage |
Storage of DynamicType. More... | |
struct | ElementsAttrIndexer |
This class provides support for indexing into the element range of an ElementsAttr. More... | |
class | ElementsAttrIterator |
This class implements a generic iterator for ElementsAttr. More... | |
class | ElementsAttrRange |
This class provides iterator utilities for an ElementsAttr range. More... | |
struct | ExpectedDiag |
class | FallbackTypeIDResolver |
This class provides a fallback for resolving TypeIDs. More... | |
class | ForwardDataFlowAnalysisBase |
This class is the non-templated virtual base class for the ForwardDataFlowAnalysis. More... | |
struct | FunctionTypeStorage |
Function Type Storage and Uniquing. More... | |
struct | InlineOpResult |
This class provides the implementation for an operation result whose index can be represented "inline" in the underlying ValueImpl. More... | |
struct | InlineTypeIDResolver |
This class provides utilities for resolving the TypeID of a class that provides a static TypeID resolveTypeID() method. More... | |
struct | IntegerSetStorage |
struct | IntegerTypeStorage |
Integer Type Storage and Uniquing. More... | |
class | Interface |
This class represents an abstract interface. More... | |
class | InterfaceMap |
This class provides an efficient mapping between a given Interface type, and a particular implementation of its concept. More... | |
class | IROperandBase |
This class is the base for IROperand, and provides all of the non-templated facilities for operand use management. More... | |
struct | is_complex_t |
Type trait detector that checks if a given type T is a complex type. More... | |
struct | is_complex_t< std::complex< T > > |
struct | NestedAnalysisMap |
An analysis map that contains a map for the current operation, and a set of maps for any child operations. More... | |
class | op_filter_iterator |
A utility iterator that filters out operations that are not 'OpT'. More... | |
class | op_iterator |
This class provides iteration over the held operations of a block for a specific operation type. More... | |
struct | op_matcher |
The matcher that matches a certain kind of op. More... | |
class | OperandStorage |
This class handles the management of operation operands. More... | |
struct | OpOrInterfaceRewritePatternBase |
OpOrInterfaceRewritePatternBase is a wrapper around RewritePattern that allows for matching and rewriting against an instance of a derived operation class or Interface. More... | |
struct | OpPassManagerImpl |
class | OpResultImpl |
This class provides the implementation for an operation result. More... | |
class | OpToOpPassAdaptor |
An adaptor pass used to run operation passes over nested operations. More... | |
class | OutOfLineOpResult |
This class provides the implementation for an operation result whose index cannot be represented "inline", and thus requires an additional index field. More... | |
struct | ParallelDiagnosticHandlerImpl |
class | Parser |
This class implement support for parsing global entities like attributes and types. More... | |
struct | ParserState |
This class refers to all of the state maintained globally by the parser, such as the current lexer position etc. More... | |
class | PassCrashReproducerGenerator |
struct | PassExecutionState |
The state for a single execution of a pass. More... | |
struct | PassInstrumentorImpl |
class | PassOptions |
Base container class and manager for all pass options. More... | |
struct | PassPipelineCLParserImpl |
struct | PatternMatcherValue |
Binds to a specific value and matches it. More... | |
class | PDLByteCode |
The bytecode class is also the interpreter. More... | |
class | PDLByteCodeMutableState |
This class contains the mutable state of a bytecode instance. More... | |
class | PDLByteCodePattern |
All of the data pertaining to a specific pattern within the bytecode. More... | |
class | PreservedAnalyses |
A utility class to represent the analyses that are known to be preserved. More... | |
struct | RecoveryReproducerContext |
This class contains all of the context for generating a recovery reproducer. More... | |
struct | RecursivePatternMatcher |
RecursivePatternMatcher that composes. More... | |
struct | SourceMgrDiagnosticHandlerImpl |
struct | SourceMgrDiagnosticVerifierHandlerImpl |
struct | StorageUniquerImpl |
This is the implementation of the StorageUniquer class. More... | |
class | StorageUserBase |
Utility class for implementing users of storage classes uniqued by a StorageUniquer. More... | |
class | StorageUserTraitBase |
Helper class for implementing traits for storage classes. More... | |
struct | StringAttrStorage |
struct | SymbolState |
This class contains record of any parsed top-level symbols. More... | |
class | TimingManagerImpl |
Private implementation details of the TimingManager . More... | |
struct | TupleTypeStorage |
A type representing a collection of other types. More... | |
class | TypeIDResolver |
This class provides a resolver for getting the ID for a given class T. More... | |
class | TypeIDResolver< T, std::enable_if_t< InlineTypeIDResolver::has_resolve_typeid< T >::value > > |
This class provides a resolver for getting the ID for a given class T, when the class provides a static TypeID resolveTypeID() method. More... | |
struct | TypeUniquer |
A utility class to get, or create, unique instances of types within an MLIRContext. More... | |
class | ValueImpl |
The base class for all derived Value classes. More... | |
struct | Vector1D |
struct | Vector1D< T, Dim, false > |
struct | Vector1D< T, Dim, true > |
Typedefs | |
using | DenseIterPtrAndSplat = std::pair< const char *, bool > |
Pair of raw pointer and a boolean flag of whether the pointer holds a splat,. More... | |
template<typename T , typename OperationOrValue > | |
using | has_operation_or_value_matcher_t = decltype(std::declval< T >().match(std::declval< OperationOrValue >())) |
Trait to check whether T provides a 'match' method with type OperationOrValue . More... | |
template<typename T > | |
using | first_argument = decltype(first_argument_type(std::declval< T >())) |
Type definition of the first argument to the given callable 'T'. More... | |
template<typename FnT > | |
using | walkResultType = decltype(walk(nullptr, std::declval< FnT >())) |
Utility to provide the return type of a templated walk method. More... | |
template<template< class > class Pred, typename... Ts> | |
using | count_if_t = count_if_t_impl< Pred, 0, Ts... > |
template<typename ImplTy , typename... Args> | |
using | has_impltype_getkey_t = decltype(ImplTy::getKey(std::declval< Args >()...)) |
Trait to check if ImplTy provides a 'getKey' method with types 'Args'. More... | |
template<typename ImplTy , typename T > | |
using | has_impltype_hash_t = decltype(ImplTy::hashKey(std::declval< T >())) |
Trait to check if ImplTy provides a 'hashKey' method for 'T'. More... | |
using | ByteCodeField = uint16_t |
Use generic bytecode types. More... | |
using | ByteCodeAddr = uint32_t |
using | OwningOpRange = llvm::OwningArrayRef< Operation * > |
Functions | |
constexpr bool | isPowerOf2 (int n) |
constexpr unsigned | nextPowerOf2 (int n) |
template<size_t N> | |
std::array< int64_t, N > | makeStrides (ArrayRef< int64_t > shape) |
Given a shape with sizes greater than 0 along all dimensions, returns the distance, in number of elements, between a slice in a dimension and the next slice in the same dimension. More... | |
template<int N, typename T > | |
std::enable_if<(N >=1), StridedMemRefType< T, N > >::type | makeStridedMemRefDescriptor (T *ptr, T *alignedPtr, ArrayRef< int64_t > shape, ArrayRef< int64_t > shapeAlloc) |
Build a StridedMemRefDescriptor<T, N> that matches the MLIR ABI. More... | |
template<int N, typename T > | |
std::enable_if<(N==0), StridedMemRefType< T, 0 > >::type | makeStridedMemRefDescriptor (T *ptr, T *alignedPtr, ArrayRef< int64_t > shape={}, ArrayRef< int64_t > shapeAlloc={}) |
Build a StridedMemRefDescriptor<T, 0> that matches the MLIR ABI. More... | |
template<typename T > | |
std::pair< T *, T * > | allocAligned (size_t nElements, AllocFunType allocFun=&::malloc, llvm::Optional< uint64_t > alignment=llvm::Optional< uint64_t >()) |
Align nElements of type T with an optional alignment . More... | |
Optional< BlockArgument > | getBranchSuccessorArgument (const SuccessorOperands &operands, unsigned operandIndex, Block *successor) |
Return the BlockArgument corresponding to operand operandIndex in some successor if operandIndex is within the range of operands , or None if operandIndex isn't a successor operand index. More... | |
LogicalResult | verifyBranchSuccessorOperands (Operation *op, unsigned succNo, const SuccessorOperands &operands) |
Verify that the given operands match those of the given successor block. More... | |
LogicalResult | verifyTypesAlongControlFlowEdges (Operation *op) |
Verify that types match along control flow edges described the given op. More... | |
unsigned | getDefaultTypeSize (Type type, const DataLayout &dataLayout, DataLayoutEntryListRef params) |
Default handler for the type size request. More... | |
unsigned | getDefaultTypeSizeInBits (Type type, const DataLayout &dataLayout, DataLayoutEntryListRef params) |
Default handler for the type size in bits request. More... | |
unsigned | getDefaultABIAlignment (Type type, const DataLayout &dataLayout, ArrayRef< DataLayoutEntryInterface > params) |
Default handler for the required alignemnt request. More... | |
unsigned | getDefaultPreferredAlignment (Type type, const DataLayout &dataLayout, ArrayRef< DataLayoutEntryInterface > params) |
Default handler for the preferred alignemnt request. More... | |
DataLayoutEntryList | filterEntriesForType (DataLayoutEntryListRef entries, TypeID typeID) |
Given a list of data layout entries, returns a new list containing the entries with keys having the given type ID, i.e. More... | |
DataLayoutEntryInterface | filterEntryForIdentifier (DataLayoutEntryListRef entries, StringAttr id) |
Given a list of data layout entries, returns the entry that has the given identifier as key, if such an entry exists in the list. More... | |
LogicalResult | verifyDataLayoutOp (Operation *op) |
Verifies that the operation implementing the data layout interface, or a module operation, is valid. More... | |
LogicalResult | verifyDataLayoutSpec (DataLayoutSpecInterface spec, Location loc) |
Verifies that a data layout spec is valid. More... | |
LogicalResult | inferReturnTensorTypes (function_ref< LogicalResult(MLIRContext *, Optional< Location > location, ValueShapeRange operands, DictionaryAttr attributes, RegionRange regions, SmallVectorImpl< ShapedTypeComponents > &retComponents)> componentTypeFn, MLIRContext *context, Optional< Location > location, ValueRange operands, DictionaryAttr attributes, RegionRange regions, SmallVectorImpl< Type > &inferredReturnTypes) |
LogicalResult | verifyInferredResultTypes (Operation *op) |
Verifies that the inferred result types match the actual result types for the op. More... | |
LogicalResult | verifyOffsetSizeAndStrideOp (OffsetSizeAndStrideOpInterface op) |
bool | sameOffsetsSizesAndStrides (OffsetSizeAndStrideOpInterface a, OffsetSizeAndStrideOpInterface b, llvm::function_ref< bool(OpFoldResult, OpFoldResult)> cmp) |
template<int N> | |
void | bindDims (MLIRContext *ctx) |
template<int N, typename AffineExprTy , typename... AffineExprTy2> | |
void | bindDims (MLIRContext *ctx, AffineExprTy &e, AffineExprTy2 &...exprs) |
template<int N> | |
void | bindSymbols (MLIRContext *ctx) |
template<int N, typename AffineExprTy , typename... AffineExprTy2> | |
void | bindSymbols (MLIRContext *ctx, AffineExprTy &e, AffineExprTy2 &...exprs) |
LogicalResult | verifyAffineMapAsLayout (AffineMap m, ArrayRef< int64_t > shape, function_ref< InFlightDiagnostic()> emitError) |
static bool | isConstantLike (Operation *op) |
Check to see if the specified operation is ConstantLike. More... | |
template<typename MatcherClass > | |
std::enable_if_t< llvm::is_detected< detail::has_operation_or_value_matcher_t, MatcherClass, Value >::value, bool > | matchOperandOrValueAtIndex (Operation *op, unsigned idx, MatcherClass &matcher) |
Statically switch to a Value matcher. More... | |
template<typename MatcherClass > | |
std::enable_if_t< llvm::is_detected< detail::has_operation_or_value_matcher_t, MatcherClass, Operation * >::value, bool > | matchOperandOrValueAtIndex (Operation *op, unsigned idx, MatcherClass &matcher) |
Statically switch to an Operation matcher. More... | |
template<typename TupleT , class CallbackT , std::size_t... Is> | |
constexpr void | enumerateImpl (TupleT &&tuple, CallbackT &&callback, std::index_sequence< Is... >) |
template<typename... Tys, typename CallbackT > | |
constexpr void | enumerate (std::tuple< Tys... > &tuple, CallbackT &&callback) |
llvm::unique_function< InFlightDiagnostic()> | getDefaultDiagnosticEmitFn (MLIRContext *ctx) |
Utility method to generate a callback that can be used to generate a diagnostic when checking the construction invariants of a storage object. More... | |
llvm::unique_function< InFlightDiagnostic()> | getDefaultDiagnosticEmitFn (const Location &loc) |
LogicalResult | verifySymbolTable (Operation *op) |
LogicalResult | verifySymbol (Operation *op) |
template<typename Ret , typename Arg , typename... Rest> | |
Arg | first_argument_type (Ret(*)(Arg, Rest...)) |
Helper templates to deduce the first argument of a callback parameter. More... | |
template<typename Ret , typename F , typename Arg , typename... Rest> | |
Arg | first_argument_type (Ret(F::*)(Arg, Rest...)) |
void | walk (Operation *op, function_ref< void(Region *)> callback, WalkOrder order) |
Walk all of the regions, blocks, or operations nested under (and including) the given operation. More... | |
void | walk (Operation *op, function_ref< void(Block *)> callback, WalkOrder order) |
void | walk (Operation *op, function_ref< void(Operation *)> callback, WalkOrder order) |
WalkResult | walk (Operation *op, function_ref< WalkResult(Region *)> callback, WalkOrder order) |
Walk all of the regions, blocks, or operations nested under (and including) the given operation. More... | |
WalkResult | walk (Operation *op, function_ref< WalkResult(Block *)> callback, WalkOrder order) |
WalkResult | walk (Operation *op, function_ref< WalkResult(Operation *)> callback, WalkOrder order) |
template<WalkOrder Order = WalkOrder::PostOrder, typename FuncTy , typename ArgT = detail::first_argument<FuncTy>, typename RetT = decltype(std::declval<FuncTy>()(std::declval<ArgT>()))> | |
std::enable_if< llvm::is_one_of< ArgT, Operation *, Region *, Block * >::value, RetT >::type | walk (Operation *op, FuncTy &&callback) |
Walk all of the regions, blocks, or operations nested under (and including) the given operation. More... | |
template<WalkOrder Order = WalkOrder::PostOrder, typename FuncTy , typename ArgT = detail::first_argument<FuncTy>, typename RetT = decltype(std::declval<FuncTy>()(std::declval<ArgT>()))> | |
std::enable_if< !llvm::is_one_of< ArgT, Operation *, Region *, Block * >::value &&std::is_same< RetT, void >::value, RetT >::type | walk (Operation *op, FuncTy &&callback) |
Walk all of the operations of type 'ArgT' nested under and including the given operation. More... | |
template<WalkOrder Order = WalkOrder::PostOrder, typename FuncTy , typename ArgT = detail::first_argument<FuncTy>, typename RetT = decltype(std::declval<FuncTy>()(std::declval<ArgT>()))> | |
std::enable_if< !llvm::is_one_of< ArgT, Operation *, Region *, Block * >::value &&std::is_same< RetT, WalkResult >::value, RetT >::type | walk (Operation *op, FuncTy &&callback) |
Walk all of the operations of type 'ArgT' nested under and including the given operation. More... | |
void | walk (Operation *op, function_ref< void(Operation *, const WalkStage &stage)> callback) |
Generic walkers with stage aware callbacks. More... | |
WalkResult | walk (Operation *op, function_ref< WalkResult(Operation *, const WalkStage &stage)> callback) |
Walk all the operations nested under (and including) the given operation, with the callback being invoked on each operation N+1 times, where N is the number of regions attached to the operation. More... | |
template<typename FuncTy , typename ArgT = detail::first_argument<FuncTy>, typename RetT = decltype(std::declval<FuncTy>()( std::declval<ArgT>(), std::declval<const WalkStage &>()))> | |
std::enable_if< std::is_same< ArgT, Operation * >::value, RetT >::type | walk (Operation *op, FuncTy &&callback) |
Walk all of the operations nested under and including the given operation. More... | |
template<typename FuncTy , typename ArgT = detail::first_argument<FuncTy>, typename RetT = decltype(std::declval<FuncTy>()( std::declval<ArgT>(), std::declval<const WalkStage &>()))> | |
std::enable_if<!std::is_same< ArgT, Operation * >::value &&std::is_same< RetT, void >::value, RetT >::type | walk (Operation *op, FuncTy &&callback) |
Walk all of the operations of type 'ArgT' nested under and including the given operation. More... | |
template<typename FuncTy , typename ArgT = detail::first_argument<FuncTy>, typename RetT = decltype(std::declval<FuncTy>()( std::declval<ArgT>(), std::declval<const WalkStage &>()))> | |
std::enable_if<!std::is_same< ArgT, Operation * >::value &&std::is_same< RetT, WalkResult >::value, RetT >::type | walk (Operation *op, FuncTy &&callback) |
Walk all of the operations of type 'ArgT' nested under and including the given operation. More... | |
template<typename ContainerOpT > | |
OwningOpRef< ContainerOpT > | constructContainerOpForParserIfNecessary (Block *parsedBlock, MLIRContext *context, Location sourceFileLoc) |
Given a block containing operations that have just been parsed, if the block contains a single operation of ContainerOpT type then remove it from the block and return it. More... | |
size_t | getDenseElementBitWidth (Type eltType) |
Return the bit width which DenseElementsAttr should use for this type. More... | |
bool | isSupportedMemorySpace (Attribute memorySpace) |
Checks if the memorySpace has supported Attribute type. More... | |
Attribute | wrapIntegerMemorySpace (unsigned memorySpace, MLIRContext *ctx) |
Wraps deprecated integer memory space to the new Attribute form. More... | |
Attribute | skipDefaultMemorySpace (Attribute memorySpace) |
Replaces default memorySpace (integer == 0 ) with empty Attribute. More... | |
unsigned | getMemorySpaceAsInt (Attribute memorySpace) |
[deprecated] Returns the memory space in old raw integer representation. More... | |
Variables | |
template<typename F > | |
decltype(first_argument_type(&F::operator())) | first_argument_type (F) |
using mlir::detail::ByteCodeAddr = typedef uint32_t |
Definition at line 30 of file ByteCode.h.
using mlir::detail::ByteCodeField = typedef uint16_t |
Use generic bytecode types.
ByteCodeField refers to the actual bytecode entries. ByteCodeAddr refers to size of indices into the bytecode.
Definition at line 29 of file ByteCode.h.
using mlir::detail::count_if_t = typedef count_if_t_impl<Pred, 0, Ts...> |
Definition at line 138 of file InterfaceSupport.h.
using mlir::detail::DenseIterPtrAndSplat = typedef std::pair<const char *, bool> |
Pair of raw pointer and a boolean flag of whether the pointer holds a splat,.
Definition at line 36 of file BuiltinAttributes.h.
using mlir::detail::first_argument = typedef decltype(first_argument_type(std::declval<T>())) |
Type definition of the first argument to the given callable 'T'.
Definition at line 112 of file Visitors.h.
using mlir::detail::has_impltype_getkey_t = typedef decltype(ImplTy::getKey(std::declval<Args>()...)) |
Trait to check if ImplTy provides a 'getKey' method with types 'Args'.
Definition at line 26 of file StorageUniquer.h.
using mlir::detail::has_impltype_hash_t = typedef decltype(ImplTy::hashKey(std::declval<T>())) |
Trait to check if ImplTy provides a 'hashKey' method for 'T'.
Definition at line 30 of file StorageUniquer.h.
using mlir::detail::has_operation_or_value_matcher_t = typedef decltype(std::declval<T>().match(std::declval<OperationOrValue>())) |
Trait to check whether T provides a 'match' method with type OperationOrValue
.
Definition at line 178 of file Matchers.h.
using mlir::detail::OwningOpRange = typedef llvm::OwningArrayRef<Operation *> |
Definition at line 31 of file ByteCode.h.
using mlir::detail::walkResultType = typedef decltype(walk(nullptr, std::declval<FnT>())) |
Utility to provide the return type of a templated walk method.
Definition at line 319 of file Visitors.h.
std::pair<T *, T *> mlir::detail::allocAligned | ( | size_t | nElements, |
AllocFunType | allocFun = &::malloc , |
||
llvm::Optional< uint64_t > | alignment = llvm::Optional<uint64_t>() |
||
) |
Align nElements
of type T with an optional alignment
.
This replaces a portable posix_memalign
. alignment
must be a power of 2 and greater than the size of T. By default the alignment is sizeof(T).
Definition at line 102 of file MemRefUtils.h.
References nextPowerOf2().
void mlir::detail::bindDims | ( | MLIRContext * | ctx | ) |
Definition at line 307 of file AffineExpr.h.
Referenced by bindDims().
void mlir::detail::bindDims | ( | MLIRContext * | ctx, |
AffineExprTy & | e, | ||
AffineExprTy2 &... | exprs | ||
) |
Definition at line 310 of file AffineExpr.h.
References bindDims(), and mlir::getAffineDimExpr().
void mlir::detail::bindSymbols | ( | MLIRContext * | ctx | ) |
Definition at line 316 of file AffineExpr.h.
Referenced by bindSymbols().
void mlir::detail::bindSymbols | ( | MLIRContext * | ctx, |
AffineExprTy & | e, | ||
AffineExprTy2 &... | exprs | ||
) |
Definition at line 319 of file AffineExpr.h.
References bindSymbols(), and mlir::getAffineSymbolExpr().
|
inline |
Given a block containing operations that have just been parsed, if the block contains a single operation of ContainerOpT
type then remove it from the block and return it.
If the block does not contain just that operation, create a new operation instance of ContainerOpT
and move all of the operations within parsedBlock
into the first block of the first region. ContainerOpT
is required to have a single region containing a single block, and must implement the SingleBlockImplicitTerminator
trait.
Definition at line 39 of file Parser.h.
References mlir::Block::begin(), mlir::OpBuilder::create(), mlir::failed(), mlir::Block::front(), mlir::Block::getOperations(), mlir::parseSourceFile(), mlir::parseSourceString(), and value.
constexpr void mlir::detail::enumerate | ( | std::tuple< Tys... > & | tuple, |
CallbackT && | callback | ||
) |
Definition at line 234 of file Matchers.h.
References enumerateImpl().
Referenced by ableToUpdatePredOperands(), adjustIter(), mlir::alignAffineMapWithValues(), mlir::PatternApplicator::applyCostModel(), applyPatterns(), mlir::applyPermutationToVector(), mlir::transform::TransformState::applyTransform(), mlir::bufferization::func_ext::CallOpInterface::bufferize(), mlir::bufferization::func_ext::FuncOpInterface::bufferize(), buildCostGraph(), mlir::python::PyOpView::buildGeneric(), buildPredicateList(), collapseGenericOpIterationDims(), composeAffineMapAndOperands(), computeMemRefRankReductionMask(), mlir::LLVM::detail::connectPHINodes(), convertForOp(), mlir::LLVMTypeConverter::convertFunctionSignature(), convertIntrinsicResult(), convertOperationImpl(), convertYieldOp(), createFullTiles(), createI32Constant(), mlir::ConvertToLLVMPattern::createMemRefDescriptor(), mlir::tensor::createPadHighOp(), createReassociationMapsForCollapse(), mlir::ValueDecomposer::decomposeValue(), defaultAllocBufferCallBack(), diagnoseInvalidOperandDominance(), mlir::linalg::GenerateLoopNest< LoopTy >::doit(), doubleBuffer(), dropSwitchCasesThatMatchDefault(), mlir::ComputationSliceState::dump(), elementwiseMatchAndRewriteHelper(), encodeKernelName(), foldSwitch(), foldTransferInBoundsAttribute(), fuse(), fuseOperations(), generateCollapsedIndexingRegion(), getAllocationTypeAndShape(), getBackwardSliceImpl(), getBlockIt(), getCanonicalSliceResultType(), getCanonicalSubViewResultType(), getCollapsableIterationSpaceDims(), getDimMap(), mlir::linalg::getDynOperands(), getExpandedDimToCollapsedDimMap(), getExpandedOutputDimFromInputShape(), getGenericEffectsImpl(), getLspDiagnoticFromDiag(), mlir::scf::getParallelForInductionVarOwner(), getPHISourceValue(), getReassociationMapForFoldingUnitDims(), getSemiAffineExprFromFlatForm(), getShapeDefiningLoopRange(), mlir::getSinglyExecutedRegionsToSink(), getTiledSliceDims(), getTreePredicates(), getTypeNumBytes(), mlir::LLVM::detail::handleMultidimensionalVectors(), handleMultidimensionalVectors(), hasSameBitwidthScalarType(), mlir::linalg::hoistRedundantVectorTransfersOnTensor(), inferTransposeResultType(), injectGpuIndexOperations(), inlineRegionImpl(), insertCopyLoops(), mlir::scf::insideMutuallyExclusiveBranches(), mlir::inversePermutation(), mlir::vector::isBroadcastableTo(), isConstantOne(), isDefinedByCallTo(), isDimSequencePreserved(), isFusableWithReshapeByDimExpansion(), isMemRefNormalizable(), mlir::AffineMap::isMinorIdentityWithBroadcasting(), mlir::isOpwiseShiftValid(), mlir::AffineMap::isPermutationOfMinorIdentityWithBroadcasting(), mlir::isReassociationValid(), isTrivialSubViewOp(), mlir::linalg::LinalgDependenceGraph::LinalgDependenceGraph(), mlir::spirv::linearizeIndex(), logFailure(), lowerAsEntryFunction(), lowerEntryPointABIAttr(), mlir::linalg::makeComposedExtractSliceOp(), mlir::makeStridedLinearLayoutMap(), mlir::GPUFuncOpLowering::matchAndRewrite(), TransferReadPermutationLowering::matchAndRewrite(), ReduceMultiDimReductionRank::matchAndRewrite(), TransposeOpLowering::matchAndRewrite(), AllocaScopeHoister::matchAndRewrite(), mlir::linalg::LinalgBaseTileAndFusePattern::matchAndRewrite(), CanonicalizeContractAdd< AddOpType >::matchAndRewrite(), outlineKernelFuncImpl(), packFunctionArguments(), padOperandToSmallestStaticBoundingBox(), parseGlobalMemrefOpTypeAndInitialValue(), parseInferType(), parseOptionalKeywordAlternative(), mlir::permuteLoops(), poolingInferReturnTypes(), mlir::AsmPrinter::Impl::printIntegerSet(), printResultsAsList(), printSwitchOpCases(), mlir::linalg::promoteSubviewAsNewBuffer(), pruneReductionDimsFromMap(), mlir::detail::ConversionPatternRewriterImpl::remapValues(), mlir::replaceAllMemRefUsesWith(), replaceUnitDimIndexOps(), mlir::reshapeLikeShapesAreCompatible(), mlir::linalg::LinalgPaddingPattern::returningMatchAndRewrite(), mlir::linalg::rewriteAsPaddedOp(), rewriteWarpOpToScfFor(), simplifySwitchFromDefaultSwitchOnSameCondition(), sliceTransferIndices(), mlir::SPIRVTypeConverter::SPIRVTypeConverter(), splatZero(), mlir::linalg::splitReduction(), tileLinalgOpImpl(), mlir::scf::tileParallelLoop(), mlir::linalg::TileLoopNest::tileRootOp(), mlir::linalg::transformIndexOps(), updateFuncOp(), vectorizeLinalgYield(), verifyAttributions(), verifyCollapsedShape(), mlir::verifyReshapeLikeTypes(), verifyResultTypesAreInferrable(), verifyTypesAlongAllEdges(), walkReferenceCountedValues(), wrapExternalFunction(), and wrapForExternalCallers().
constexpr void mlir::detail::enumerateImpl | ( | TupleT && | tuple, |
CallbackT && | callback, | ||
std::index_sequence< Is... > | |||
) |
Definition at line 225 of file Matchers.h.
Referenced by enumerate().
DataLayoutEntryList mlir::detail::filterEntriesForType | ( | DataLayoutEntryListRef | entries, |
TypeID | typeID | ||
) |
Given a list of data layout entries, returns a new list containing the entries with keys having the given type ID, i.e.
belonging to the same type class.
Definition at line 217 of file DataLayoutInterfaces.cpp.
References mlir::Type::getTypeID().
DataLayoutEntryInterface mlir::detail::filterEntryForIdentifier | ( | DataLayoutEntryListRef | entries, |
StringAttr | id | ||
) |
Given a list of data layout entries, returns the entry that has the given identifier as key, if such an entry exists in the list.
Definition at line 227 of file DataLayoutInterfaces.cpp.
Arg mlir::detail::first_argument_type | ( | Ret(*)(Arg, Rest...) | ) |
Helper templates to deduce the first argument of a callback parameter.
Arg mlir::detail::first_argument_type | ( | Ret(F::*)(Arg, Rest...) | ) |
Referenced by mlir::WalkStage::getNextRegion().
Optional< BlockArgument > mlir::detail::getBranchSuccessorArgument | ( | const SuccessorOperands & | operands, |
unsigned | operandIndex, | ||
Block * | successor | ||
) |
Return the BlockArgument
corresponding to operand operandIndex
in some successor if operandIndex
is within the range of operands
, or None if operandIndex
isn't a successor operand index.
Returns the BlockArgument
corresponding to operand operandIndex
in some successor if 'operandIndex' is within the range of 'operands', or None if operandIndex
isn't a successor operand index.
Definition at line 40 of file ControlFlowInterfaces.cpp.
References mlir::Block::getArgument(), mlir::OperandRange::getBeginOperandIndex(), mlir::SuccessorOperands::getForwardedOperands(), and mlir::SuccessorOperands::getProducedOperandCount().
Referenced by mlir::SuccessorOperands::getOperandIndex().
unsigned mlir::detail::getDefaultABIAlignment | ( | Type | type, |
const DataLayout & | dataLayout, | ||
ArrayRef< DataLayoutEntryInterface > | params | ||
) |
Default handler for the required alignemnt request.
Computes results for built-in types and dispatches to the DataLayoutTypeInterface for other types.
Definition at line 133 of file DataLayoutInterfaces.cpp.
References mlir::Type::dyn_cast(), mlir::Type::getContext(), getFloatTypeABIAlignment(), getIndexBitwidth(), getIntegerTypeABIAlignment(), mlir::DataLayout::getTypeABIAlignment(), mlir::DataLayout::getTypeSize(), mlir::Type::isa(), and reportMissingDataLayout().
Referenced by mlir::DataLayout::getTypeABIAlignment().
llvm::unique_function< InFlightDiagnostic()> mlir::detail::getDefaultDiagnosticEmitFn | ( | MLIRContext * | ctx | ) |
Utility method to generate a callback that can be used to generate a diagnostic when checking the construction invariants of a storage object.
This is defined out-of-line to avoid the need to include Location.h.
Definition at line 1027 of file MLIRContext.cpp.
References mlir::emitError().
Referenced by mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT, Traits >::get(), mlir::DynamicType::get(), and mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT, Traits >::getChecked().
llvm::unique_function< InFlightDiagnostic()> mlir::detail::getDefaultDiagnosticEmitFn | ( | const Location & | loc | ) |
Definition at line 1031 of file MLIRContext.cpp.
References mlir::emitError().
unsigned mlir::detail::getDefaultPreferredAlignment | ( | Type | type, |
const DataLayout & | dataLayout, | ||
ArrayRef< DataLayoutEntryInterface > | params | ||
) |
Default handler for the preferred alignemnt request.
Computes results for built-in types and dispatches to the DataLayoutTypeInterface for other types.
Definition at line 186 of file DataLayoutInterfaces.cpp.
References mlir::Type::dyn_cast(), mlir::Type::getContext(), getFloatTypePreferredAlignment(), getIndexBitwidth(), getIntegerTypePreferredAlignment(), mlir::DataLayout::getTypeABIAlignment(), mlir::DataLayout::getTypePreferredAlignment(), mlir::Type::isa(), and reportMissingDataLayout().
Referenced by getDefaultTypeSizeInBits(), and mlir::DataLayout::getTypePreferredAlignment().
unsigned mlir::detail::getDefaultTypeSize | ( | Type | type, |
const DataLayout & | dataLayout, | ||
DataLayoutEntryListRef | params | ||
) |
Default handler for the type size request.
Computes results for built-in types and dispatches to the DataLayoutTypeInterface for other types.
Definition at line 45 of file DataLayoutInterfaces.cpp.
References getDefaultTypeSizeInBits().
Referenced by mlir::DataLayout::getTypeSize().
unsigned mlir::detail::getDefaultTypeSizeInBits | ( | Type | type, |
const DataLayout & | dataLayout, | ||
DataLayoutEntryListRef | params | ||
) |
Default handler for the type size in bits request.
Computes results for built-in types and dispatches to the DataLayoutTypeInterface for other types.
Definition at line 51 of file DataLayoutInterfaces.cpp.
References mlir::Type::dyn_cast(), mlir::Type::getContext(), getDefaultPreferredAlignment(), getIndexBitwidth(), mlir::Type::getIntOrFloatBitWidth(), mlir::DataLayout::getTypeSize(), mlir::DataLayout::getTypeSizeInBits(), mlir::Type::isa(), and reportMissingDataLayout().
Referenced by getDefaultTypeSize(), and mlir::DataLayout::getTypeSizeInBits().
|
inline |
Return the bit width which DenseElementsAttr should use for this type.
Definition at line 34 of file AttributeDetail.h.
References mlir::Type::dyn_cast(), mlir::Type::getIntOrFloatBitWidth(), and mlir::Type::isIndex().
Referenced by mlir::DenseElementsAttr::bitcast(), mlir::DenseElementsAttr::get(), getDenseElementStorageWidth(), mlir::detail::DenseIntOrFPElementsAttrStorage::getKey(), isValidIntOrFloat(), mappingHelper(), mlir::DenseElementsAttr::BoolElementIterator::operator*(), and mlir::DenseElementsAttr::IntElementIterator::operator*().
[deprecated] Returns the memory space in old raw integer representation.
New Attribute getMemorySpace()
method should be used instead.
Definition at line 505 of file BuiltinTypes.cpp.
References mlir::Attribute::cast(), and mlir::Attribute::isa().
Referenced by convertTransferReadToLoads(), mlir::AffineDmaStartOp::getDstMemorySpace(), mlir::BaseMemRefType::getMemorySpaceAsInt(), mlir::AffineDmaStartOp::getSrcMemorySpace(), and mlir::MemRefType::Builder::setMemorySpace().
LogicalResult mlir::detail::inferReturnTensorTypes | ( | function_ref< LogicalResult(MLIRContext *, Optional< Location > location, ValueShapeRange operands, DictionaryAttr attributes, RegionRange regions, SmallVectorImpl< ShapedTypeComponents > &retComponents)> | componentTypeFn, |
MLIRContext * | context, | ||
Optional< Location > | location, | ||
ValueRange | operands, | ||
DictionaryAttr | attributes, | ||
RegionRange | regions, | ||
SmallVectorImpl< Type > & | inferredReturnTypes | ||
) |
Definition at line 179 of file InferTypeOpInterface.cpp.
References mlir::failed(), mlir::failure(), and mlir::success().
Referenced by mlir::ValueShapeRange::getValues(), and mlir::OpTrait::InferTensorType< ConcreteType >::inferReturnTypes().
|
static |
Check to see if the specified operation is ConstantLike.
This includes some quick filters to avoid a semi-expensive test in the common case.
Definition at line 53 of file Matchers.h.
References mlir::Operation::getNumOperands(), mlir::Operation::getNumResults(), and mlir::Operation::hasTrait().
Referenced by mlir::detail::constant_op_matcher::match(), and mlir::detail::constant_op_binder< AttrT >::match().
constexpr bool mlir::detail::isPowerOf2 | ( | int | n | ) |
Definition at line 46 of file CRunnerUtils.h.
Referenced by nextPowerOf2().
bool mlir::detail::isSupportedMemorySpace | ( | Attribute | memorySpace | ) |
Checks if the memorySpace has supported Attribute type.
Definition at line 473 of file BuiltinTypes.cpp.
References mlir::Attribute::getDialect(), and mlir::Attribute::isa().
Referenced by mlir::MemRefType::Builder::setMemorySpace().
std::enable_if<(N >= 1), StridedMemRefType<T, N> >::type mlir::detail::makeStridedMemRefDescriptor | ( | T * | ptr, |
T * | alignedPtr, | ||
ArrayRef< int64_t > | shape, | ||
ArrayRef< int64_t > | shapeAlloc | ||
) |
Build a StridedMemRefDescriptor<T, N>
that matches the MLIR ABI.
This is an implementation detail that is kept in sync with MLIR codegen conventions. Additionally takes a shapeAlloc
array which is used instead of shape
to allocate "more aligned" data and compute the corresponding strides.
Definition at line 64 of file MemRefUtils.h.
References StridedMemRefType< T, N >::basePtr, and copy().
std::enable_if<(N == 0), StridedMemRefType<T, 0> >::type mlir::detail::makeStridedMemRefDescriptor | ( | T * | ptr, |
T * | alignedPtr, | ||
ArrayRef< int64_t > | shape = {} , |
||
ArrayRef< int64_t > | shapeAlloc = {} |
||
) |
Build a StridedMemRefDescriptor<T, 0>
that matches the MLIR ABI.
This is an implementation detail that is kept in sync with MLIR codegen conventions. Additionally takes a shapeAlloc
array which is used instead of shape
to allocate "more aligned" data and compute the corresponding strides.
Definition at line 85 of file MemRefUtils.h.
References StridedMemRefType< T, 0 >::basePtr.
|
inline |
Given a shape with sizes greater than 0 along all dimensions, returns the distance, in number of elements, between a slice in a dimension and the next slice in the same dimension.
e.g. shape[3, 4, 5] -> strides[20, 5, 1]
Definition at line 45 of file MemRefUtils.h.
std::enable_if_t< llvm::is_detected<detail::has_operation_or_value_matcher_t, MatcherClass, Value>::value, bool> mlir::detail::matchOperandOrValueAtIndex | ( | Operation * | op, |
unsigned | idx, | ||
MatcherClass & | matcher | ||
) |
Statically switch to a Value matcher.
Definition at line 186 of file Matchers.h.
References mlir::Operation::getOperand(), and value.
std::enable_if_t< llvm::is_detected<detail::has_operation_or_value_matcher_t, MatcherClass, Operation *>::value, bool> mlir::detail::matchOperandOrValueAtIndex | ( | Operation * | op, |
unsigned | idx, | ||
MatcherClass & | matcher | ||
) |
Statically switch to an Operation matcher.
Definition at line 196 of file Matchers.h.
References mlir::Value::getDefiningOp(), and mlir::Operation::getOperand().
constexpr unsigned mlir::detail::nextPowerOf2 | ( | int | n | ) |
Definition at line 48 of file CRunnerUtils.h.
References isPowerOf2().
Referenced by allocAligned(), mlir::detail::Vector1D< T, Dim, false >::operator[](), mlir::OwningMemRef< T, Rank >::OwningMemRef(), mlir::detail::Vector1D< T, Dim, true >::Vector1D(), and mlir::detail::Vector1D< T, Dim, false >::Vector1D().
bool mlir::detail::sameOffsetsSizesAndStrides | ( | OffsetSizeAndStrideOpInterface | a, |
OffsetSizeAndStrideOpInterface | b, | ||
llvm::function_ref< bool(OpFoldResult, OpFoldResult)> | cmp | ||
) |
Definition at line 161 of file ViewLikeInterface.cpp.
References mlir::Type::cast(), mlir::Value::getContext(), and mlir::Value::getType().
Replaces default memorySpace (integer == 0
) with empty Attribute.
Definition at line 497 of file BuiltinTypes.cpp.
References mlir::Attribute::dyn_cast_or_null().
Referenced by mlir::MemRefType::Builder::setMemorySpace().
LogicalResult mlir::detail::verifyAffineMapAsLayout | ( | AffineMap | m, |
ArrayRef< int64_t > | shape, | ||
function_ref< InFlightDiagnostic()> | emitError | ||
) |
Definition at line 81 of file BuiltinAttributeInterfaces.cpp.
References mlir::emitError(), mlir::AffineMap::getNumDims(), and mlir::success().
Referenced by mlir::detail::ElementsAttrRange< IteratorT >::size().
LogicalResult mlir::detail::verifyBranchSuccessorOperands | ( | Operation * | op, |
unsigned | succNo, | ||
const SuccessorOperands & | operands | ||
) |
Verify that the given operands match those of the given successor block.
Definition at line 61 of file ControlFlowInterfaces.cpp.
References mlir::Operation::emitError(), mlir::Block::getArgument(), mlir::Block::getNumArguments(), mlir::SuccessorOperands::getProducedOperandCount(), mlir::Operation::getSuccessor(), mlir::Value::getType(), mlir::SuccessorOperands::size(), and mlir::success().
Referenced by mlir::SuccessorOperands::getOperandIndex().
LogicalResult mlir::detail::verifyDataLayoutOp | ( | Operation * | op | ) |
Verifies that the operation implementing the data layout interface, or a module operation, is valid.
This calls the verifier of the spec attribute and checks if the layout is compatible with specs attached to the enclosing operations.
Definition at line 311 of file DataLayoutInterfaces.cpp.
References mlir::InFlightDiagnostic::attachNote(), collectParentLayouts(), diag(), mlir::Operation::emitError(), mlir::failed(), mlir::failure(), getCombinedDataLayout(), mlir::Operation::getLoc(), getSpec(), and mlir::success().
Referenced by mlir::DataLayoutSpecAttr::print().
LogicalResult mlir::detail::verifyDataLayoutSpec | ( | DataLayoutSpecInterface | spec, |
Location | loc | ||
) |
Verifies that a data layout spec is valid.
This dispatches to individual entry verifiers, and then to the verifiers implemented by the relevant type and dialect interfaces for type and identifier keys respectively.
Definition at line 474 of file DataLayoutInterfaces.cpp.
References mlir::emitError(), mlir::failed(), mlir::failure(), mlir::success(), and value.
LogicalResult mlir::detail::verifyInferredResultTypes | ( | Operation * | op | ) |
Verifies that the inferred result types match the actual result types for the op.
Precondition: op implements InferTypeOpInterface.
Definition at line 206 of file InferTypeOpInterface.cpp.
References mlir::Operation::emitOpError(), mlir::failed(), mlir::failure(), mlir::Operation::getAttrDictionary(), mlir::Operation::getContext(), mlir::Operation::getLoc(), mlir::Operation::getOperands(), mlir::Operation::getRegions(), mlir::Operation::getResultTypes(), and mlir::success().
Referenced by mlir::ValueShapeRange::getValues().
LogicalResult mlir::detail::verifyOffsetSizeAndStrideOp | ( | OffsetSizeAndStrideOpInterface | op | ) |
Definition at line 38 of file ViewLikeInterface.cpp.
References mlir::failed(), mlir::failure(), mlir::success(), and mlir::verifyListOfOperandsOrIntegers().
LogicalResult mlir::detail::verifySymbol | ( | Operation * | op | ) |
Definition at line 439 of file SymbolTable.cpp.
References mlir::Operation::emitOpError(), mlir::Operation::getAttr(), mlir::Operation::getAttrOfType(), mlir::SymbolTable::getSymbolAttrName(), mlir::SymbolTable::getVisibilityAttrName(), and mlir::success().
Referenced by mlir::SymbolUserMap::useEmpty().
LogicalResult mlir::detail::verifySymbolTable | ( | Operation * | op | ) |
Definition at line 398 of file SymbolTable.cpp.
References mlir::WalkResult::advance(), mlir::InFlightDiagnostic::append(), mlir::Operation::emitError(), mlir::Operation::emitOpError(), mlir::Operation::getAttrOfType(), mlir::Operation::getLoc(), mlir::Operation::getNumRegions(), mlir::Operation::getRegion(), mlir::Operation::getRegions(), mlir::SymbolTable::getSymbolAttrName(), mlir::success(), and walkSymbolTable().
Referenced by mlir::SymbolUserMap::useEmpty(), and mlir::OpTrait::SymbolTable< ConcreteType >::verifyRegionTrait().
LogicalResult mlir::detail::verifyTypesAlongControlFlowEdges | ( | Operation * | op | ) |
Verify that types match along control flow edges described the given op.
Definition at line 159 of file ControlFlowInterfaces.cpp.
References mlir::failed(), mlir::failure(), mlir::Operation::getNumRegions(), mlir::Operation::getResultTypes(), and verifyTypesAlongAllEdges().
Referenced by mlir::SuccessorOperands::getOperandIndex().
Walk all of the regions, blocks, or operations nested under (and including) the given operation.
Walk all of the regions/blocks/operations nested under and including the given operation.
Regions, blocks and operations at the same nesting level are visited in lexicographical order. The walk order for enclosing regions, blocks and operations with respect to their nested ones is specified by 'order'. These methods are invoked for void-returning callbacks. A callback on a block or operation is allowed to erase that block or operation only if the walk is in post-order. See non-void method for pre-order erasure.
Definition at line 24 of file Visitors.cpp.
References mlir::Operation::getRegions(), mlir::PostOrder, and mlir::PreOrder.
Referenced by mlir::PatternApplicator::applyDefaultCostModel(), mlir::pdll::ast::Node::getLoc(), isMemRefNormalizable(), mlir::AffineExpr::operator!(), GpuAsyncRegionPass::SingleTokenUseCallback::operator()(), verifyConstantType(), mlir::pdll::ast::Node::walk(), walk(), mlir::Operation::walk(), JamBlockGatherer::walk(), mlir::PatternApplicator::walkAllPatterns(), and walkSymbolUses().
Definition at line 40 of file Visitors.cpp.
References mlir::Operation::getRegions(), mlir::PostOrder, mlir::PreOrder, and walk().
void mlir::detail::walk | ( | Operation * | op, |
function_ref< void(Operation *)> | callback, | ||
WalkOrder | order | ||
) |
Definition at line 55 of file Visitors.cpp.
References mlir::WalkStage::advance(), mlir::Operation::getRegions(), mlir::PostOrder, mlir::PreOrder, and walk().
WalkResult mlir::detail::walk | ( | Operation * | op, |
function_ref< WalkResult(Region *)> | callback, | ||
WalkOrder | order | ||
) |
Walk all of the regions, blocks, or operations nested under (and including) the given operation.
Walk all of the regions/blocks/operations nested under and including the given operation.
Regions, blocks and operations at the same nesting level are visited in lexicographical order. The walk order for enclosing regions, blocks and operations with respect to their nested ones is specified by 'order'. This method is invoked for skippable or interruptible callbacks. A callback on a block or operation is allowed to erase that block or operation if either:
These functions walk operations until an interrupt result is returned by the callback. Walks on regions, blocks and operations may also be skipped if the callback returns a skip result. Regions, blocks and operations at the same nesting level are visited in lexicographical order. The walk order for enclosing regions, blocks and operations with respect to their nested ones is specified by 'order'. A callback on a block or operation is allowed to erase that block or operation if either:
Definition at line 102 of file Visitors.cpp.
References mlir::WalkResult::advance(), mlir::Operation::getRegions(), mlir::WalkResult::interrupt(), mlir::PostOrder, mlir::PreOrder, walk(), mlir::WalkResult::wasInterrupted(), and mlir::WalkResult::wasSkipped().
WalkResult mlir::detail::walk | ( | Operation * | op, |
function_ref< WalkResult(Block *)> | callback, | ||
WalkOrder | order | ||
) |
Definition at line 129 of file Visitors.cpp.
References mlir::WalkResult::advance(), mlir::Operation::getRegions(), mlir::WalkResult::interrupt(), mlir::PostOrder, mlir::PreOrder, walk(), mlir::WalkResult::wasInterrupted(), and mlir::WalkResult::wasSkipped().
WalkResult mlir::detail::walk | ( | Operation * | op, |
function_ref< WalkResult(Operation *)> | callback, | ||
WalkOrder | order | ||
) |
Definition at line 155 of file Visitors.cpp.
References mlir::WalkResult::advance(), mlir::WalkStage::advance(), mlir::Operation::getRegions(), mlir::WalkResult::interrupt(), mlir::PostOrder, mlir::PreOrder, walk(), mlir::WalkResult::wasInterrupted(), and mlir::WalkResult::wasSkipped().
std::enable_if< llvm::is_one_of<ArgT, Operation *, Region *, Block *>::value, RetT>::type mlir::detail::walk | ( | Operation * | op, |
FuncTy && | callback | ||
) |
Walk all of the regions, blocks, or operations nested under (and including) the given operation.
Regions, blocks and operations at the same nesting level are visited in lexicographical order. The walk order for enclosing regions, blocks and operations with respect to their nested ones is specified by 'Order' (post-order by default). A callback on a block or operation is allowed to erase that block or operation if either:
Example: op->walk([](Region *r) { ... }); op->walk([](Block *b) { ... }); op->walk([](Operation *op) { ... });
Definition at line 169 of file Visitors.h.
References mlir::PostOrder, value, and walk().
std::enable_if< !llvm::is_one_of<ArgT, Operation *, Region *, Block *>::value && std::is_same<RetT, void>::value, RetT>::type mlir::detail::walk | ( | Operation * | op, |
FuncTy && | callback | ||
) |
Walk all of the operations of type 'ArgT' nested under and including the given operation.
Regions, blocks and operations at the same nesting level are visited in lexicographical order. The walk order for enclosing regions, blocks and operations with respect to their nested ones is specified by 'order' (post-order by default). This method is selected for void-returning callbacks that operate on a specific derived operation type. A callback on an operation is allowed to erase that operation only if the walk is in post-order. See non-void method for pre-order erasure.
Example: op->walk([](ReturnOp op) { ... });
Definition at line 192 of file Visitors.h.
References mlir::PostOrder, value, and walk().
std::enable_if< !llvm::is_one_of<ArgT, Operation *, Region *, Block *>::value && std::is_same<RetT, WalkResult>::value, RetT>::type mlir::detail::walk | ( | Operation * | op, |
FuncTy && | callback | ||
) |
Walk all of the operations of type 'ArgT' nested under and including the given operation.
Regions, blocks and operations at the same nesting level are visited in lexicographical order. The walk order for enclosing regions, blocks and operations with respect to their nested ones is specified by 'Order' (post-order by default). This method is selected for WalkReturn returning skippable or interruptible callbacks that operate on a specific derived operation type. A callback on an operation is allowed to erase that operation if either:
Example: op->walk([](ReturnOp op) { if (some_invariant) return WalkResult::skip(); if (another_invariant) return WalkResult::interrupt(); return WalkResult::advance(); });
Definition at line 227 of file Visitors.h.
References mlir::WalkResult::advance(), value, walk(), and mlir::WalkResult::WalkResult().
void mlir::detail::walk | ( | Operation * | op, |
function_ref< void(Operation *, const WalkStage &stage)> | callback | ||
) |
Generic walkers with stage aware callbacks.
Walk all the operations nested under (and including) the given operation, with the callback being invoked on each operation N+1 times, where N is the number of regions attached to the operation. The stage
input to the callback indicates the current walk stage. This method is invoked for void returning callbacks.
WalkResult mlir::detail::walk | ( | Operation * | op, |
function_ref< WalkResult(Operation *, const WalkStage &stage)> | callback | ||
) |
Walk all the operations nested under (and including) the given operation, with the callback being invoked on each operation N+1 times, where N is the number of regions attached to the operation.
The stage
input to the callback indicates the current walk stage. This method is invoked for skippable or interruptible callbacks.
std::enable_if<std::is_same<ArgT, Operation *>::value, RetT>::type mlir::detail::walk | ( | Operation * | op, |
FuncTy && | callback | ||
) |
std::enable_if<!std::is_same<ArgT, Operation *>::value && std::is_same<RetT, void>::value, RetT>::type mlir::detail::walk | ( | Operation * | op, |
FuncTy && | callback | ||
) |
Walk all of the operations of type 'ArgT' nested under and including the given operation.
This method is selected for void returning callbacks that operate on a specific derived operation type.
Example: op->walk([](ReturnOp op, const WalkStage &stage) { ... });
Definition at line 282 of file Visitors.h.
std::enable_if<!std::is_same<ArgT, Operation *>::value && std::is_same<RetT, WalkResult>::value, RetT>::type mlir::detail::walk | ( | Operation * | op, |
FuncTy && | callback | ||
) |
Walk all of the operations of type 'ArgT' nested under and including the given operation.
This method is selected for WalkReturn returning interruptible callbacks that operate on a specific derived operation type.
Example: op->walk(op, [](ReturnOp op, const WalkStage &stage) { if (some_invariant) return WalkResult::interrupt(); return WalkResult::advance(); });
Definition at line 307 of file Visitors.h.
References mlir::WalkResult::advance(), and walk().
Referenced by walk().
Attribute mlir::detail::wrapIntegerMemorySpace | ( | unsigned | memorySpace, |
MLIRContext * | ctx | ||
) |
Wraps deprecated integer memory space to the new Attribute form.
Definition at line 489 of file BuiltinTypes.cpp.
Referenced by mlir::MemRefType::Builder::setMemorySpace().
decltype(first_argument_type(&F::operator())) mlir::detail::first_argument_type(F) |
Definition at line 108 of file Visitors.h.