MLIR
17.0.0git
|
Detect if any of the given parameter types has a sub-element handler. More...
Namespaces | |
analysis_impl | |
pass_options | |
pdl_function_builder | |
storage_user_base_impl | |
StorageUserTrait | |
Classes | |
struct | AliasAnalysisTraits |
This class contains various internal trait classes used by the main AliasAnalysis class below. 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 | Vector1D |
struct | Vector1D< T, Dim, true > |
struct | Vector1D< T, Dim, false > |
class | AttributeUniquer |
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 | 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... | |
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 | 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 > > |
class | DenseArrayAttrImpl |
Base class for DenseArrayAttr that is instantiated and specialized for each supported element type below. More... | |
class | DenseResourceElementsAttrBase |
Base class for DenseResourceElementsAttr that is instantiated and specialized for each supported element type below. More... | |
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 | attr_value_binder |
The matcher that matches a certain kind of Attribute and binds the value inside the Attribute. More... | |
struct | constant_op_matcher |
The matcher that matches operations that have the ConstantLike trait. More... | |
struct | constant_op_binder |
The matcher that matches operations that have the ConstantLike trait, and binds the folded attribute value. 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 | op_matcher |
The matcher that matches a certain kind of op. More... | |
struct | AnyValueMatcher |
Terminal matcher, always returns true. More... | |
struct | AnyCapturedValueMatcher |
Terminal matcher, always returns true. More... | |
struct | PatternMatcherValue |
Binds to a specific value and matches it. More... | |
struct | RecursivePatternMatcher |
RecursivePatternMatcher that composes. 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... | |
class | StorageUserTraitBase |
Helper class for implementing traits for storage classes. More... | |
class | StorageUserBase |
Utility class for implementing users of storage classes uniqued by a StorageUniquer. More... | |
struct | is_tuple |
struct | is_tuple< std::tuple< Ts... > > |
struct | TypeUniquer |
A utility class to get, or create, unique instances of types within an MLIRContext. More... | |
class | IROperandBase |
This class is the base for IROperand, and provides all of the non-templated facilities for operand use management. More... | |
class | ValueImpl |
The base class for all derived Value classes. More... | |
class | BlockArgumentImpl |
The internal implementation of a BlockArgument. More... | |
class | OpResultImpl |
This class provides the implementation for an operation result. More... | |
struct | InlineOpResult |
This class provides the implementation for an operation result whose index can be represented "inline" in the underlying ValueImpl. 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 | TypedValue |
TypedValue is a Value with a statically know type. More... | |
class | PreservedAnalyses |
A utility class to represent the analyses that are known to be preserved. More... | |
struct | AnalysisConcept |
The abstract polymorphic base class representing an analysis. More... | |
struct | AnalysisModel |
A derived analysis model used to hold a specific analysis object. More... | |
class | AnalysisMap |
This class represents a cache of analyses for a single operation. More... | |
struct | NestedAnalysisMap |
An analysis map that contains a map for the current operation, and a set of maps for any child operations. More... | |
struct | PassExecutionState |
The state for a single execution of a pass. More... | |
class | PassOptions |
Base container class and manager for all pass options. More... | |
class | Interface |
This class represents an abstract interface. More... | |
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 | InterfaceMap |
This class provides an efficient mapping between a given Interface type, and a particular implementation of its concept. More... | |
class | FallbackTypeIDResolver |
This class provides a fallback for resolving TypeIDs. More... | |
class | TypeIDResolver |
This class provides a resolver for getting the ID for a given class T. More... | |
struct | InlineTypeIDResolver |
This class provides utilities for resolving the TypeID of a class that provides a static TypeID resolveTypeID() method. 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... | |
class | AsmParserImpl |
This class provides the implementation of the generic parser methods within AsmParser. More... | |
class | Parser |
This class implement support for parsing global entities like attributes and types. More... | |
struct | SymbolState |
This class contains record of any parsed top-level symbols. More... | |
struct | ParserState |
This class refers to all of the state maintained globally by the parser, such as the current lexer position etc. More... | |
struct | AffineExprStorage |
Base storage class appearing in an affine expression. More... | |
struct | AffineBinaryOpExprStorage |
A binary operation appearing in an affine expression. More... | |
struct | AffineDimExprStorage |
A dimensional or symbolic identifier appearing in an affine expression. More... | |
struct | AffineConstantExprStorage |
An integer constant appearing in affine expression. More... | |
struct | AffineMapStorage |
class | AsmStateImpl |
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 | StringAttrStorage |
struct | DiagnosticEngineImpl |
struct | SourceMgrDiagnosticHandlerImpl |
struct | ExpectedDiag |
This class represents an expected output diagnostic. More... | |
struct | SourceMgrDiagnosticVerifierHandlerImpl |
struct | ParallelDiagnosticHandlerImpl |
struct | DynamicTypeStorage |
Storage of DynamicType. More... | |
struct | DynamicAttrStorage |
Storage of DynamicAttr. More... | |
struct | IntegerSetStorage |
struct | IntegerTypeStorage |
Integer Type Storage and Uniquing. More... | |
struct | FunctionTypeStorage |
Function Type Storage and Uniquing. More... | |
struct | TupleTypeStorage |
A type representing a collection of other types. More... | |
struct | OpPassManagerImpl |
struct | PassInstrumentorImpl |
struct | RecoveryReproducerContext |
This class contains all of the context for generating a recovery reproducer. More... | |
class | OpToOpPassAdaptor |
An adaptor pass used to run operation passes over nested operations. More... | |
class | PassCrashReproducerGenerator |
struct | PassPipelineCLParserImpl |
class | PDLByteCodePattern |
All of the data pertaining to a specific pattern within the bytecode. More... | |
class | PDLByteCodeMutableState |
This class contains the mutable state of a bytecode instance. More... | |
class | PDLByteCode |
The bytecode class is also the interpreter. More... | |
struct | StorageUniquerImpl |
This is the implementation of the StorageUniquer class. More... | |
class | TimingManagerImpl |
Private implementation details of the TimingManager . More... | |
class | DefaultTimingManagerImpl |
Implementation details of the DefaultTimingManager . More... | |
struct | ConversionPatternRewriterImpl |
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 | has_default_sub_element_handler_t = decltype(T::DefaultHandlerTag) |
template<typename T , typename... Ts> | |
using | has_get_method = decltype(T::get(std::declval< Ts >()...)) |
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 T > | |
using | is_interface_t = decltype(isInterfaceImpl(std::declval< T & >())) |
template<typename T > | |
using | IsInterface = llvm::is_detected< is_interface_t, T > |
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, std::optional< uint64_t > alignment=std::optional< uint64_t >()) |
Align nElements of type T with an optional alignment . More... | |
std::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 std::nullopt 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 | verifyDestinationStyleOpInterface (Operation *op) |
Verify that op conforms to the invariants of DestinationStyleOpInterface. More... | |
LogicalResult | inferReturnTensorTypes (function_ref< LogicalResult(MLIRContext *, std::optional< Location > location, ValueShapeRange operands, DictionaryAttr attributes, RegionRange regions, SmallVectorImpl< ShapedTypeComponents > &retComponents)> componentTypeFn, MLIRContext *context, std::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 | verifyParallelCombiningOpInterface (Operation *op) |
LogicalResult | verifyShapedDimOpInterface (Operation *op) |
Verify invariants of ops that implement the ShapedDimOpInterface. 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) |
template<typename AffineExprTy > | |
void | bindSymbolsList (MLIRContext *ctx, SmallVectorImpl< AffineExprTy > &exprs) |
template<class T > | |
decltype(auto) | unwrapForCustomParse (FailureOr< T > &failureOr) |
LogicalResult | verifyAffineMapAsLayout (AffineMap m, ArrayRef< int64_t > shape, function_ref< InFlightDiagnostic()> emitError) |
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) |
template<typename T > | |
void | walkImmediateSubElementsImpl (T derived, function_ref< void(Attribute)> walkAttrsFn, function_ref< void(Type)> walkTypesFn) |
This function provides the underlying implementation for the SubElementInterface walk method, using the key type of the derived attribute/type to interact with the individual parameters. More... | |
template<typename T , typename... Ts> | |
T | constructSubElementReplacement (MLIRContext *ctx, Ts &&...params) |
This function invokes the proper get method for a type T with the given values. More... | |
template<typename T > | |
T | replaceImmediateSubElementsImpl (T derived, ArrayRef< Attribute > &replAttrs, ArrayRef< Type > &replTypes) |
This function provides the underlying implementation for the SubElementInterface replace method, using the key type of the derived attribute/type to interact with the individual parameters. More... | |
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_t< llvm::is_one_of< ArgT, Operation *, Region *, Block * >::value, RetT > | 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_t< !llvm::is_one_of< ArgT, Operation *, Region *, Block * >::value &&std::is_same< RetT, void >::value, RetT > | 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_t< !llvm::is_one_of< ArgT, Operation *, Region *, Block * >::value &&std::is_same< RetT, WalkResult >::value, RetT > | 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_t< std::is_same< ArgT, Operation * >::value, RetT > | 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_t<!std::is_same< ArgT, Operation * >::value &&std::is_same< RetT, void >::value, RetT > | 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_t<!std::is_same< ArgT, Operation * >::value &&std::is_same< RetT, WalkResult >::value, RetT > | 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... | |
template<typename ContainerOpT , typename... ParserArgs> | |
OwningOpRef< ContainerOpT > | parseSourceFile (const ParserConfig &config, ParserArgs &&...args) |
The internal implementation of the templated parseSourceFile methods below, that simply forwards to the non-templated version. More... | |
template<typename ConcreteType , typename ValueT , typename Traits , typename BaseType , template< typename, template< typename > class > class BaseTrait> | |
void | isInterfaceImpl (Interface< ConcreteType, ValueT, Traits, BaseType, BaseTrait > &) |
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) |
Detect if any of the given parameter types has a sub-element handler.
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 153 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 41 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 113 of file Visitors.h.
using mlir::detail::has_default_sub_element_handler_t = typedef decltype(T::DefaultHandlerTag) |
Definition at line 232 of file SubElementInterfaces.h.
using mlir::detail::has_get_method = typedef decltype(T::get(std::declval<Ts>()...)) |
Definition at line 335 of file SubElementInterfaces.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 169 of file Matchers.h.
using mlir::detail::is_interface_t = typedef decltype(isInterfaceImpl(std::declval<T &>())) |
Definition at line 274 of file InterfaceSupport.h.
using mlir::detail::IsInterface = typedef llvm::is_detected<is_interface_t, T> |
Definition at line 277 of file InterfaceSupport.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 320 of file Visitors.h.
std::pair<T *, T *> mlir::detail::allocAligned | ( | size_t | nElements, |
AllocFunType | allocFun = &::malloc , |
||
std::optional< uint64_t > | alignment = std::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 103 of file MemRefUtils.h.
References nextPowerOf2().
void mlir::detail::bindDims | ( | MLIRContext * | ctx | ) |
Definition at line 307 of file AffineExpr.h.
Referenced by bindDims(), and mlir::getDivMod().
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(), and getIndexProduct().
void mlir::detail::bindSymbols | ( | MLIRContext * | ctx, |
AffineExprTy & | e, | ||
AffineExprTy2 &... | exprs | ||
) |
Definition at line 319 of file AffineExpr.h.
References bindSymbols(), and mlir::getAffineSymbolExpr().
void mlir::detail::bindSymbolsList | ( | MLIRContext * | ctx, |
SmallVectorImpl< AffineExprTy > & | exprs | ||
) |
Definition at line 325 of file AffineExpr.h.
References 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 38 of file Parser.h.
References mlir::Block::begin(), mlir::OpBuilder::create(), mlir::emitError(), mlir::failed(), mlir::Block::front(), and mlir::Block::getOperations().
T mlir::detail::constructSubElementReplacement | ( | MLIRContext * | ctx, |
Ts &&... | params | ||
) |
This function invokes the proper get
method for a type T
with the given values.
Definition at line 358 of file SubElementInterfaces.h.
|
constexpr |
Definition at line 223 of file Matchers.h.
References enumerateImpl().
Referenced by adjustIter(), mlir::alignAffineMapWithValues(), mlir::bufferization::allocateTensorForShapedValue(), mlir::PatternApplicator::applyCostModel(), applyPatterns(), mlir::applyPermutationToVector(), mlir::bufferization::func_ext::CallOpInterface::bufferize(), mlir::bufferization::func_ext::FuncOpInterface::bufferize(), buildCostGraph(), mlir::python::PyOpView::buildGeneric(), buildPredicateList(), mlir::linalg::collapseGenericOpIterationDims(), composeAffineMapAndOperands(), computeMemRefRankReductionMask(), mlir::LLVM::detail::connectPHINodes(), constifyIndexValues(), constructResultVector(), convertForOp(), mlir::LLVMTypeConverter::convertFunctionSignature(), convertIntrinsicResult(), convertOperationImpl(), convertYieldOp(), mlir::tensor::createDimValues(), mlir::tensor::createDynamicDimValues(), createFullTiles(), mlir::ConvertToLLVMPattern::createMemRefDescriptor(), mlir::tensor::createPadHighOp(), deduceCanonicalResource(), defaultAllocBufferCallBack(), mlir::linalg::GenerateLoopNest< LoopTy >::doit(), doubleBuffer(), mlir::bufferization::dropEquivalentBufferResults(), dropSwitchCasesThatMatchDefault(), mlir::ComputationSliceState::dump(), elementwiseMatchAndRewriteHelper(), mlir::findPositionsOfType(), foldSwitch(), forEachIJPairInAllBuffers(), fuse(), mlir::linalg::fuseElementwiseOps(), generateCollapsedIndexingRegion(), generateFusedElementwiseOpRegion(), generateTileLoopNest(), mlir::sparse_tensor::genReshapeDstShape(), getBackwardSliceImpl(), getCollapsableIterationSpaceDims(), getDimMap(), getDynamicSizes(), mlir::linalg::getDynOperands(), getExpandedDimToCollapsedDimMap(), getExpandedOutputDimFromInputShape(), mlir::getLinearizedDimensions(), getPackUnpackNormalizedInnerPerm(), getPHISourceValue(), mlir::linalg::getReassociationMapForFoldingUnitDims(), getSemiAffineExprFromFlatForm(), getShapeDefiningLoopRange(), mlir::getSinglyExecutedRegionsToSink(), getTiledSliceDims(), getTreePredicates(), getTypeNumBytes(), groupByDialectPerByte(), handleMultidimensionalVectors(), mlir::LLVM::detail::handleMultidimensionalVectors(), mlir::linalg::hoistRedundantVectorTransfersOnTensor(), inferTransposeResultType(), injectGpuIndexOperations(), inlinePayload(), inlineRegionImpl(), insertCopyLoops(), mlir::inversePermutation(), mlir::invertPermutationVector(), mlir::bytecode::detail::IRNumberingState::IRNumberingState(), isDimSequencePreserved(), isIntegerArrayAttrConfinedToShape(), mlir::AffineMap::isMinorIdentityWithBroadcasting(), mlir::isOpwiseShiftValid(), mlir::AffineMap::isPermutationOfMinorIdentityWithBroadcasting(), mlir::isReassociationValid(), isSumOfIntegerArrayAttrConfinedToShape(), isTrivialSubViewOp(), mlir::linalg::LinalgDependenceGraph::LinalgDependenceGraph(), mlir::spirv::linearizeIndex(), lowerAsEntryFunction(), mlir::makeStridedLinearLayoutMap(), VectorizationState::maskOperation(), mlir::detail::RecursivePatternMatcher< OpType, OperandMatchers >::match(), mlir::GPUFuncOpLowering::matchAndRewrite(), mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite(), ReduceMultiDimReductionRank::matchAndRewrite(), TransferReadPermutationLowering::matchAndRewrite(), TransposeOpLowering::matchAndRewrite(), moveRegionToNewWarpOpAndAppendReturns(), outlineKernelFuncImpl(), packFunctionArguments(), padOperandToSmallestStaticBoundingBox(), parseOptionalKeywordAlternative(), mlir::permuteLoops(), permuteValues(), printResultsAsList(), printSwitchOpCases(), mlir::LLVM::ModuleImport::processFunction(), mlir::linalg::promoteSubviewAsNewBuffer(), mlir::detail::ConversionPatternRewriterImpl::remapValues(), mlir::replaceAllMemRefUsesWith(), mlir::reshapeLikeShapesAreCompatible(), mlir::linalg::LinalgPaddingPattern::returningMatchAndRewrite(), mlir::linalg::rewriteAsPaddedOp(), simplifySwitchFromDefaultSwitchOnSameCondition(), sizesForTensor(), sliceTransferIndices(), mlir::linalg::splitReduction(), mlir::scf::tileConsumerAndFuseProducerGreedilyUsingSCFForOp(), tileLinalgOpImpl(), mlir::scf::tileParallelLoop(), mlir::scf::tileReductionUsingScf(), mlir::linalg::TileLoopNest::tileRootOp(), mlir::scf::tileUsingSCFForOp(), mlir::linalg::transformIndexOps(), mlir::sparse_tensor::translateIndicesArray(), updateDestinationOperandsForTiledOp(), updateFuncOp(), vectorizeAsLinalgGeneric(), vectorizeLinalgYield(), verifyCollapsedShape(), mlir::verifyReshapeLikeTypes(), verifyResultTypesAreInferrable(), verifyTypesAlongAllEdges(), wrapExternalFunction(), wrapForExternalCallers(), and yieldTiledValues().
|
constexpr |
Definition at line 215 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.
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...) | ) |
std::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 std::nullopt 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 std::nullopt 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().
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 | ( | const Location & | loc | ) |
Definition at line 1098 of file MLIRContext.cpp.
References mlir::emitError().
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 1094 of file MLIRContext.cpp.
References mlir::emitError().
Referenced by mlir::DynamicType::get(), mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT, Traits >::get(), and mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT, Traits >::getChecked().
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(), and mappingHelper().
unsigned mlir::detail::getMemorySpaceAsInt | ( | Attribute | memorySpace | ) |
[deprecated] Returns the memory space in old raw integer representation.
New Attribute getMemorySpace()
method should be used instead.
Definition at line 481 of file BuiltinTypes.cpp.
References mlir::Attribute::cast(), and mlir::Attribute::isa().
Referenced by mlir::AffineDmaStartOp::getDstMemorySpace(), and mlir::AffineDmaStartOp::getSrcMemorySpace().
LogicalResult mlir::detail::inferReturnTensorTypes | ( | function_ref< LogicalResult(MLIRContext *, std::optional< Location > location, ValueShapeRange operands, DictionaryAttr attributes, RegionRange regions, SmallVectorImpl< ShapedTypeComponents > &retComponents)> | componentTypeFn, |
MLIRContext * | context, | ||
std::optional< Location > | location, | ||
ValueRange | operands, | ||
DictionaryAttr | attributes, | ||
RegionRange | regions, | ||
SmallVectorImpl< Type > & | inferredReturnTypes | ||
) |
Definition at line 176 of file InferTypeOpInterface.cpp.
References mlir::failed(), mlir::failure(), and mlir::success().
Referenced by mlir::OpTrait::InferTensorType< ConcreteType >::inferReturnTypes().
void mlir::detail::isInterfaceImpl | ( | Interface< ConcreteType, ValueT, Traits, BaseType, BaseTrait > & | ) |
|
constexpr |
Definition at line 47 of file CRunnerUtils.h.
Referenced by nextPowerOf2().
bool mlir::detail::isSupportedMemorySpace | ( | Attribute | memorySpace | ) |
Checks if the memorySpace has supported Attribute type.
Definition at line 449 of file BuiltinTypes.cpp.
References mlir::Attribute::getDialect(), and mlir::Attribute::isa().
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 65 of file MemRefUtils.h.
References StridedMemRefType< T, N >::basePtr, copy(), StridedMemRefType< T, N >::data, StridedMemRefType< T, N >::offset, StridedMemRefType< T, N >::sizes, and StridedMemRefType< T, N >::strides.
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 86 of file MemRefUtils.h.
|
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 46 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 177 of file Matchers.h.
References mlir::Operation::getOperand().
Referenced by mlir::detail::RecursivePatternMatcher< OpType, OperandMatchers >::match().
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 186 of file Matchers.h.
References mlir::Value::getDefiningOp(), and mlir::Operation::getOperand().
|
constexpr |
Definition at line 49 of file CRunnerUtils.h.
References isPowerOf2().
Referenced by allocAligned(), mlir::detail::Vector1D< T, Dim, true >::Vector1D(), and mlir::detail::Vector1D< T, Dim, false >::Vector1D().
|
inline |
The internal implementation of the templated parseSourceFile
methods below, that simply forwards to the non-templated version.
Definition at line 152 of file Parser.h.
References mlir::failed(), and mlir::ParserConfig::getContext().
T mlir::detail::replaceImmediateSubElementsImpl | ( | T | derived, |
ArrayRef< Attribute > & | replAttrs, | ||
ArrayRef< Type > & | replTypes | ||
) |
This function provides the underlying implementation for the SubElementInterface replace method, using the key type of the derived attribute/type to interact with the individual parameters.
Definition at line 376 of file SubElementInterfaces.h.
References mlir::has_sub_attr_or_type_v.
bool mlir::detail::sameOffsetsSizesAndStrides | ( | OffsetSizeAndStrideOpInterface | a, |
OffsetSizeAndStrideOpInterface | b, | ||
llvm::function_ref< bool(OpFoldResult, OpFoldResult)> | cmp | ||
) |
Definition at line 119 of file ViewLikeInterface.cpp.
Replaces default memorySpace (integer == 0
) with empty Attribute.
Definition at line 473 of file BuiltinTypes.cpp.
References mlir::Attribute::dyn_cast_or_null().
decltype(auto) mlir::detail::unwrapForCustomParse | ( | FailureOr< T > & | failureOr | ) |
Definition at line 273 of file AttributeSupport.h.
LogicalResult mlir::detail::verifyAffineMapAsLayout | ( | AffineMap | m, |
ArrayRef< int64_t > | shape, | ||
function_ref< InFlightDiagnostic()> | emitError | ||
) |
Definition at line 77 of file BuiltinAttributeInterfaces.cpp.
References mlir::emitError(), mlir::AffineMap::getNumDims(), and mlir::success().
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().
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 collectParentLayouts(), diag(), mlir::Operation::emitError(), mlir::failed(), mlir::failure(), getCombinedDataLayout(), mlir::Operation::getLoc(), getSpec(), and mlir::success().
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(), and mlir::success().
LogicalResult mlir::detail::verifyDestinationStyleOpInterface | ( | Operation * | op | ) |
Verify that op
conforms to the invariants of DestinationStyleOpInterface.
Definition at line 25 of file DestinationStyleOpInterface.cpp.
References mlir::Operation::emitOpError(), mlir::failed(), mlir::failure(), mlir::Operation::getNumResults(), mlir::Value::getType(), mlir::Type::isa(), mlir::success(), and mlir::OpTrait::impl::verifyNOperands().
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::getAttrDictionary(), mlir::Operation::getContext(), mlir::Operation::getLoc(), mlir::Operation::getOperands(), mlir::Operation::getRegions(), and mlir::Operation::getResultTypes().
LogicalResult mlir::detail::verifyOffsetSizeAndStrideOp | ( | OffsetSizeAndStrideOpInterface | op | ) |
Definition at line 40 of file ViewLikeInterface.cpp.
References mlir::failed(), mlir::failure(), mlir::success(), and mlir::verifyListOfOperandsOrIntegers().
LogicalResult mlir::detail::verifyParallelCombiningOpInterface | ( | Operation * | op | ) |
Definition at line 18 of file ParallelCombiningOpInterface.cpp.
References mlir::Operation::emitError(), mlir::Operation::getNumRegions(), mlir::Operation::getRegion(), mlir::Region::hasOneBlock(), and mlir::success().
LogicalResult mlir::detail::verifyShapedDimOpInterface | ( | Operation * | op | ) |
Verify invariants of ops that implement the ShapedDimOpInterface.
Definition at line 17 of file ShapedOpInterfaces.cpp.
References mlir::Operation::emitError(), mlir::Operation::getNumResults(), mlir::Operation::getResult(), mlir::Value::getType(), mlir::Type::isIndex(), and mlir::success().
LogicalResult mlir::detail::verifySymbol | ( | Operation * | op | ) |
Definition at line 454 of file SymbolTable.cpp.
References mlir::Operation::emitOpError(), mlir::Operation::getAttr(), mlir::Operation::getAttrOfType(), mlir::SymbolTable::getSymbolAttrName(), mlir::SymbolTable::getVisibilityAttrName(), and mlir::success().
LogicalResult mlir::detail::verifySymbolTable | ( | Operation * | op | ) |
Definition at line 413 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::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 152 of file ControlFlowInterfaces.cpp.
References mlir::Operation::emitOpError(), mlir::failed(), mlir::failure(), mlir::Operation::getNumRegions(), mlir::Operation::getRegion(), mlir::getRegionBranchSuccessorOperands(), mlir::success(), and verifyTypesAlongAllEdges().
void mlir::detail::walk | ( | Operation * | op, |
function_ref< void(Block *)> | callback, | ||
WalkOrder | order | ||
) |
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::Operation::getRegions(), mlir::PostOrder, mlir::PreOrder, and walk().
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.
void mlir::detail::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.
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::LLVM::detail::DebugTranslation::translate(), mlir::AttrTypeSubElementHandler< ArrayRef< T >, std::enable_if_t< has_sub_attr_or_type_v< T > > >::walk(), mlir::Operation::walk(), mlir::LocationAttr::walk(), JamBlockGatherer::walk(), walk(), mlir::PatternApplicator::walkAllPatterns(), and walkImmediateSubElementsImpl().
WalkResult mlir::detail::walk | ( | Operation * | op, |
function_ref< WalkResult(Block *)> | callback, | ||
WalkOrder | order | ||
) |
Definition at line 130 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 157 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 *, 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.
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().
std::enable_if_t<llvm::is_one_of<ArgT, Operation *, Region *, Block *>::value, RetT> 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 170 of file Visitors.h.
References walk().
std::enable_if_t< !llvm::is_one_of<ArgT, Operation *, Region *, Block *>::value && std::is_same<RetT, void>::value, RetT> 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 193 of file Visitors.h.
References walk().
std::enable_if_t< !llvm::is_one_of<ArgT, Operation *, Region *, Block *>::value && std::is_same<RetT, WalkResult>::value, RetT> 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 228 of file Visitors.h.
References mlir::WalkResult::advance(), and walk().
std::enable_if_t<std::is_same<ArgT, Operation *>::value, RetT> mlir::detail::walk | ( | Operation * | op, |
FuncTy && | callback | ||
) |
Walk all of the operations nested under and including the given operation.
This method is selected for stage-aware callbacks that operate on Operation*.
Example: op->walk([](Operation *op, const WalkStage &stage) { ... });
Definition at line 266 of file Visitors.h.
References walk().
std::enable_if_t<!std::is_same<ArgT, Operation *>::value && std::is_same<RetT, void>::value, RetT> 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 283 of file Visitors.h.
References walk().
std::enable_if_t<!std::is_same<ArgT, Operation *>::value && std::is_same<RetT, WalkResult>::value, RetT> 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 308 of file Visitors.h.
References mlir::WalkResult::advance(), and walk().
void mlir::detail::walkImmediateSubElementsImpl | ( | T | derived, |
function_ref< void(Attribute)> | walkAttrsFn, | ||
function_ref< void(Type)> | walkTypesFn | ||
) |
This function provides the underlying implementation for the SubElementInterface walk method, using the key type of the derived attribute/type to interact with the individual parameters.
Definition at line 341 of file SubElementInterfaces.h.
References mlir::has_sub_attr_or_type_v, and walk().
Attribute mlir::detail::wrapIntegerMemorySpace | ( | unsigned | memorySpace, |
MLIRContext * | ctx | ||
) |
Wraps deprecated integer memory space to the new Attribute form.
Definition at line 465 of file BuiltinTypes.cpp.
decltype(first_argument_type(&F::operator())) mlir::detail::first_argument_type(F) | ( | F | ) |
Definition at line 109 of file Visitors.h.