MLIR
15.0.0git
|
Include the generated interface declarations. More...
Namespaces | |
acc | |
arith | |
arm_neon | |
async | |
AttributeTrait | |
This trait is used to determine if an attribute is a dynamic attribute or not; it should only be implemented by dynamic attributes. | |
bufferization | |
cf | |
complex | |
detail | |
emitc | |
func | |
function_interface_impl | |
gpu | |
impl | |
Attribute collections provide a dictionary-like interface. | |
linalg | |
LLVM | |
lsp | |
matcher | |
matchers | |
math | |
MemoryEffects | |
memref | |
MemRefType | |
nvgpu | |
NVVM | |
omp | |
op_definition_impl | |
OpTrait | |
pdl | |
pdl_interp | |
pdl_to_pdl_interp | |
pdll | |
presburger | |
python | |
quant | |
RankedTensorType | |
ROCDL | |
runtime | |
scf | |
shape | |
SideEffects | |
sparse_tensor | |
spirv | |
tblgen | |
tensor | |
tosa | |
transform | |
TypeTrait | |
This trait is used to determine if a type is a dynamic type or not; it should only be implemented by dynamic types. | |
vector | |
VectorType | |
x86vector | |
Classes | |
class | AbstractAttribute |
This class contains all of the static information common to all instances of a registered Attribute. More... | |
class | AbstractType |
This class contains all of the static information common to all instances of a registered Type. More... | |
class | AffineBinaryOpExpr |
Affine binary operation expression. More... | |
class | AffineBound |
AffineBound represents a lower or upper bound in the for operation. More... | |
class | AffineConstantExpr |
An integer constant appearing in affine expression. More... | |
struct | AffineCopyOptions |
Explicit copy / DMA generation options for mlir::affineDataCopyGenerate. More... | |
class | AffineDimExpr |
A dimensional identifier appearing in an affine expression. More... | |
class | AffineDmaStartOp |
AffineDmaStartOp starts a non-blocking DMA operation that transfers data from a source memref to a destination memref. More... | |
class | AffineDmaWaitOp |
AffineDmaWaitOp blocks until the completion of a DMA operation associated with the tag element 'tag[index]'. More... | |
class | AffineExpr |
Base type for affine expression. More... | |
class | AffineExprVisitor |
Base class for AffineExpr visitors/walkers. More... | |
class | AffineMap |
A multi-dimensional affine map Affine map's are immutable like Type's, and they are uniqued. More... | |
class | AffineMapAccessInterface |
class | AffineReadOpInterface |
class | AffineSymbolExpr |
A symbolic identifier appearing in an affine expression. More... | |
class | AffineValueMap |
An AffineValueMap is an affine map plus its ML value operands and results for analysis purposes. More... | |
class | AffineWriteOpInterface |
class | AliasAnalysis |
This class represents the main alias analysis interface in MLIR. More... | |
class | AliasResult |
The possible results of an alias query. More... | |
struct | AllocLikeOpLLVMLowering |
Lowering for AllocOp and AllocaOp. More... | |
class | AnalysisManager |
This class represents an analysis manager for a particular operation instance. More... | |
struct | ArithBuilder |
Helper struct to build simple arithmetic quantities with minimal type inference support. More... | |
class | AsmParser |
This base class exposes generic asm parser hooks, usable across the various derived parsers. More... | |
class | AsmParserState |
This class represents state from a parsed MLIR textual format string. More... | |
class | AsmPrinter |
This base class exposes generic asm printer hooks, usable across the various derived printers. More... | |
class | AsmState |
This class provides management for the lifetime of the state used when printing the IR. More... | |
class | Attribute |
Attributes are known-constant values of operations. More... | |
class | AttributeInterface |
This class represents the base of an attribute interface. More... | |
class | AttributeStorage |
Base storage class appearing in an attribute. More... | |
class | BaseMemRefType |
This class provides a shared interface for ranked and unranked memref types. More... | |
class | Block |
Block represents an ordered list of Operation s. More... | |
class | BlockAndValueMapping |
class | BlockArgument |
This class represents an argument of a Block. More... | |
class | BlockOperand |
A block operand represents an operand that holds a reference to a Block, e.g. More... | |
class | BlockRange |
This class provides an abstraction over the different types of ranges over Blocks. More... | |
class | BoolAttr |
Special case of IntegerAttr to represent boolean integers, i.e., signless i1 integers. More... | |
class | BufferViewFlowAnalysis |
A straight-forward alias analysis which ensures that all dependencies of all values will be determined. More... | |
class | Builder |
This class is a general helper class for creating context-global objects like types, attributes, and affine expressions. More... | |
class | CallGraph |
class | CallGraphNode |
This class represents a single callable in the callgraph. More... | |
struct | CallInterfaceCallable |
A callable is either a symbol, or an SSA value, that is referenced by a call-like operation. More... | |
class | ComplexStructBuilder |
struct | ComposeCollapseOfExpandOp |
Pattern to compose collapse_shape(expand_shape(src, reassociation_1), reassociation_2) . More... | |
struct | ComposeExpandOfCollapseOp |
struct | ComposeReassociativeReshapeOps |
Pattern to collapse producer/consumer reshape ops that are both collapsing dimensions or are both expanding dimensions. More... | |
struct | ComputationSliceState |
ComputationSliceState aggregates loop IVs, loop bound AffineMaps and their associated operands for a set of loops within a loop nest (typically the set of loops surrounding a store operation). More... | |
class | ConversionPattern |
Base class for the conversion patterns. More... | |
class | ConversionPatternRewriter |
This class implements a pattern rewriter for use with ConversionPatterns. More... | |
class | ConversionTarget |
This class describes a specific conversion target. More... | |
class | ConvertOpToLLVMPattern |
Utility class for operation conversions targeting the LLVM dialect that match exactly one source operation. More... | |
class | ConvertToLLVMPattern |
Base class for operation conversions targeting the LLVM IR dialect. More... | |
struct | CopyGenerateResult |
Result for calling generateCopyForMemRegion. More... | |
class | DataDescriptor |
Helper class to produce LLVM dialect operations inserting elements to a Data descriptor. More... | |
class | DataLayout |
The main mechanism for performing data layout queries. More... | |
class | DataLayoutAnalysis |
Stores data layout objects for each operation that specifies the data layout above and below the given operation. More... | |
class | DataLayoutDialectInterface |
An interface to be implemented by dialects that can have identifiers in the data layout specification entries. More... | |
class | DataLayoutEntryAttr |
A data layout entry attribute is a key-value pair where the key is a type or an identifier and the value is another attribute. More... | |
class | DataLayoutSpecAttr |
A data layout specification is a list of entries that specify (partial) data layout information. More... | |
class | DebugAction |
A debug action is a specific action that is to be taken by the compiler, that can be toggled and controlled by an external user. More... | |
class | DebugActionManager |
This class represents manages debug actions, and orchestrates the communication between action queries and action handlers. More... | |
class | DebugCounter |
This class implements a debug action handler that attaches a counter value to debug actions and enables/disables execution of these action based on the value of the counter. More... | |
class | DefaultTimingManager |
Facilities for time measurement and report printing to an output stream. More... | |
class | DenseElementsAttr |
An attribute that represents a reference to a dense vector or tensor object. More... | |
class | DenseFPElementsAttr |
An attribute that represents a reference to a dense float vector or tensor object. More... | |
class | DenseIntElementsAttr |
An attribute that represents a reference to a dense integer vector or tensor object. More... | |
struct | DependenceComponent |
struct | DependenceResult |
Checks whether two accesses to the same memref access the same element. More... | |
class | Diagnostic |
This class contains all of the information necessary to report a diagnostic to the DiagnosticEngine. More... | |
class | DiagnosticArgument |
A variant type that holds a single argument for a diagnostic. More... | |
class | DiagnosticEngine |
This class is the main interface for diagnostics. More... | |
class | Dialect |
Dialects are groups of MLIR operations, types and attributes, as well as behavior associated with the entire group. More... | |
class | DialectAsmParser |
The DialectAsmParser has methods for interacting with the asm parser when parsing attributes and types. More... | |
class | DialectAsmPrinter |
This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom printAttribute/printType() method on a dialect. More... | |
class | DialectDecodeAttributesInterface |
Define an interface to decode opaque constant tensor. More... | |
class | DialectExtension |
This class represents a dialect extension anchored on the given set of dialects. More... | |
class | DialectExtensionBase |
This class represents an opaque dialect extension. More... | |
class | DialectFoldInterface |
Define a fold interface to allow for dialects to control specific aspects of the folding behavior for operations they define. More... | |
class | DialectInlinerInterface |
This is the interface that must be implemented by the dialects of operations to be inlined. More... | |
class | DialectInterface |
This class represents an interface overridden for a single dialect. More... | |
class | DialectInterfaceCollection |
A collection of dialect interfaces within a context, for a given concrete interface type. More... | |
class | DialectReductionPatternInterface |
This is used to report the reduction patterns for a Dialect. More... | |
class | DialectRegistry |
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect. More... | |
class | DominanceInfo |
A class for computing basic dominance information. More... | |
class | DynamicAttr |
A dynamic attribute instance. More... | |
class | DynamicAttrDefinition |
The definition of a dynamic attribute. More... | |
class | DynamicOpDefinition |
The definition of a dynamic op. More... | |
class | DynamicType |
A dynamic type instance. More... | |
class | DynamicTypeDefinition |
The definition of a dynamic type. More... | |
struct | EmptyPipelineOptions |
A default empty option struct to be used for passes that do not need to take any options. More... | |
class | ExecutionEngine |
JIT-backed execution engine for MLIR modules. More... | |
struct | ExecutionEngineOptions |
class | ExtensibleDialect |
A dialect that can be extended with new operations/types/attributes at runtime. More... | |
class | ExternalPass |
This pass class wraps external passes defined in other languages using the MLIR C-interface. More... | |
class | FailureOr |
This class provides support for representing a failure result, or a valid value of type T . More... | |
struct | FieldParser |
Provide a template class that can be specialized by users to dispatch to parsers. More... | |
struct | FieldParser< AttributeT, std::enable_if_t< std::is_base_of< Attribute, AttributeT >::value, AttributeT > > |
Parse an attribute. More... | |
struct | FieldParser< ContainerT, std::enable_if_t< std::is_member_function_pointer< decltype(&ContainerT::push_back)>::value, ContainerT > > |
Parse any container that supports back insertion as a list. More... | |
struct | FieldParser< IntT, std::enable_if_t< std::is_integral< IntT >::value, IntT > > |
Parse any integer. More... | |
struct | FieldParser< std::string > |
Parse a string. More... | |
struct | FieldParser< TypeT, std::enable_if_t< std::is_base_of< Type, TypeT >::value, TypeT > > |
Parse an attribute. More... | |
class | FilteredValueUseIterator |
class | FlatAffineRelation |
A FlatAffineRelation represents a set of ordered pairs (domain -> range) where "domain" and "range" are tuples of identifiers. More... | |
class | FlatAffineValueConstraints |
FlatAffineValueConstraints represents an extension of IntegerPolyhedron where each non-local identifier can have an SSA Value attached to it. More... | |
class | FlatSymbolRefAttr |
A symbol reference with a reference path containing a single element. More... | |
class | FloatType |
class | ForwardDataFlowAnalysis |
This class provides a general forward dataflow analysis driver utilizing the lattice classes defined above, to enable the easy definition of dataflow analysis algorithms. More... | |
class | FrozenRewritePatternSet |
This class represents a frozen set of patterns that can be processed by a pattern applicator. More... | |
struct | FusionResult |
class | FusionStrategy |
Describes the fusion strategy to be used in the Affine loop fusion utilities. More... | |
class | GenInfo |
Structure to group information about a generator (argument to invoke via mlir-tblgen, description, and generator function). More... | |
struct | GenNameParser |
Adds command line option for each registered generator. More... | |
struct | GenRegistration |
GenRegistration provides a global initializer that registers a generator function. More... | |
struct | GPUFuncOpLowering |
struct | GPUIndexIntrinsicOpLowering |
struct | GPUPrintfOpToHIPLowering |
The lowering of gpu.printf to a call to HIP hostcalls. More... | |
struct | GPUPrintfOpToLLVMCallLowering |
The lowering of gpu.printf to a call to an external printf() function. More... | |
struct | GPUReturnOpLowering |
class | GreedyRewriteConfig |
This class allows control over how the GreedyPatternRewriteDriver works. More... | |
class | HasDefaultDLTIDataLayout |
Trait to be used by operations willing to use the implementation of the data layout interfaces provided by the Target dialect. More... | |
class | ImplicitLocOpBuilder |
ImplicitLocOpBuilder maintains a 'current location', allowing use of the create<> method without specifying the location. More... | |
class | InFlightDiagnostic |
This class represents a diagnostic that is inflight and set to be reported. More... | |
class | InlinerInterface |
This interface provides the hooks into the inlining interface. More... | |
class | IntegerSet |
An integer set representing a conjunction of one or more affine equalities and inequalities. More... | |
class | InterfacePass |
Pass to transform an operation that implements the given interface. More... | |
class | InvocationBounds |
This class represents upper and lower bounds on the number of times a region of a RegionBranchOpInterface can be invoked. More... | |
class | IRObjectWithUseList |
This class represents a single IR object that contains a use list. More... | |
class | IROperand |
A reference to a value, suitable for use as an operand of an operation. More... | |
class | IRRewriter |
This class coordinates rewriting a piece of IR outside of a pattern rewrite, providing a way to keep track of the mutations made to the IR. More... | |
struct | JitRunnerConfig |
class | LatticeElement |
This class represents a lattice holding a specific value of type ValueT . More... | |
class | Lexer |
This class breaks up the current file into a token stream. More... | |
class | Liveness |
Represents an analysis for computing liveness information from a given top-level operation. More... | |
class | LivenessBlockInfo |
This class represents liveness information on block level. More... | |
class | LLVMConversionTarget |
Derived class that automatically populates legalization information for different LLVM ops. More... | |
class | LLVMTranslationDialectInterface |
Base class for dialect interfaces providing translation to LLVM IR. More... | |
class | LLVMTranslationInterface |
Interface collection for translation to LLVM IR, dispatches to a concrete interface implementation based on the dialect to which the given op belongs. More... | |
class | LLVMTypeConverter |
Conversion from types to the LLVM IR dialect. More... | |
class | LocalAliasAnalysis |
This class implements a local form of alias analysis that tries to identify the underlying values addressed by each value and performs a few basic checks to see if they alias. More... | |
class | Location |
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around a LocationAttr. More... | |
class | LocationAttr |
Location objects represent source locations information in MLIR. More... | |
struct | LogicalResult |
This class represents an efficient way to signal success or failure. More... | |
struct | LoopNestStats |
LoopNestStats aggregates various per-loop statistics (eg. More... | |
struct | LoopReduction |
A description of a (parallelizable) reduction in an affine loop. More... | |
class | LowerToLLVMOptions |
Options to control the LLVM lowering. More... | |
struct | LowerVectorToLLVMOptions |
Options to control Vector to LLVM lowering. More... | |
struct | MathPolynomialApproximationOptions |
struct | MemRefAccess |
Encapsulates a memref load or store access information. More... | |
class | MemRefDescriptor |
Helper class to produce LLVM dialect operations extracting or inserting elements of a MemRef descriptor. More... | |
class | MemRefDescriptorView |
Helper class allowing the user to access a range of Values that correspond to an unpacked memref descriptor using named accessors. More... | |
struct | MemRefRegion |
A region of a memref's data space; this is typically constructed by analyzing load/store op's on this memref and the index space of loops surrounding such op's. More... | |
class | MLIRContext |
MLIRContext is the top-level object for a collection of MLIR operations. More... | |
class | MLIRContextImpl |
This is the implementation of the MLIRContext class, using the pImpl idiom. More... | |
class | ModRefResult |
The possible results of whether a memory access modifies or references a memory location. More... | |
class | ModuleAnalysisManager |
An analysis manager class specifically for the top-level operation. More... | |
struct | MutableAffineMap |
A mutable affine map. Its affine expressions are however unique. More... | |
class | MutableOperandRange |
This class provides a mutable adaptor for a range of operands. More... | |
class | MutableOperandRangeRange |
This class represents a contiguous range of mutable operand ranges, e.g. More... | |
class | NamedAttribute |
NamedAttribute represents a combination of a name and an Attribute value. More... | |
class | NamedAttrList |
NamedAttrList is array of NamedAttributes that tracks whether it is sorted and does some basic work to remain sorted. More... | |
class | NestedMatch |
An NestedPattern captures nested patterns in the IR. More... | |
class | NestedPattern |
class | NestedPatternContext |
RAII structure to transparently manage the bump allocator for NestedPattern and NestedMatch classes. More... | |
class | OneToOneConvertToLLVMPattern |
Generic implementation of one-to-one conversion from "SourceOp" to "TargetOp" where the latter belongs to the LLVM dialect or an equivalent. More... | |
class | Op |
This provides public APIs that all operations should have. More... | |
class | OpAsmDialectInterface |
class | OpAsmParser |
The OpAsmParser has methods for interacting with the asm parser: parsing things from it, emitting errors etc. More... | |
class | OpAsmPrinter |
This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom print() method. More... | |
class | OpBuilder |
This class helps build Operations. More... | |
class | OpConversionPattern |
OpConversionPattern is a wrapper around ConversionPattern that allows for matching and rewriting against an instance of a derived operation class as opposed to a raw Operation. More... | |
class | OperandElementTypeIterator |
class | OperandRange |
This class implements the operand iterators for the Operation class. More... | |
class | OperandRangeRange |
This class represents a contiguous range of operand ranges, e.g. More... | |
class | Operation |
Operation is a basic unit of execution within MLIR. More... | |
struct | OperationEquivalence |
This class provides utilities for computing if two operations are equivalent. More... | |
class | OperationFolder |
A utility class for folding operations, and unifying duplicated constants generated along the way. More... | |
class | OperationName |
class | OperationPass |
Pass to transform an operation of a specific type. More... | |
class | OperationPass< void > |
Pass to transform an operation. More... | |
struct | OperationState |
This represents an operation in an abstracted form, suitable for use with the builder APIs. More... | |
class | OpFoldResult |
This class represents a single result from folding an operation. More... | |
class | OpInterface |
This class represents the base of an operation interface. More... | |
class | OpInterfaceConversionPattern |
OpInterfaceConversionPattern is a wrapper around ConversionPattern that allows for matching and rewriting against an instance of an OpInterface class as opposed to a raw Operation. More... | |
struct | OpInterfaceRewritePattern |
OpInterfaceRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an instance of an operation interface instead of a raw Operation. More... | |
class | OpOperand |
This class represents an operand of an operation. More... | |
class | OpPassManager |
This class represents a pass manager that runs passes on either a specific operation type, or any isolated operation. More... | |
class | OpPrintingFlags |
Set of flags used to control the behavior of the various IR print methods (e.g. More... | |
class | OpResult |
This is a value defined by a result of an operation. More... | |
struct | OpRewritePattern |
OpRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an instance of a derived operation class as opposed to a raw Operation. More... | |
class | OpState |
This is the concrete base class that holds the operation pointer and has non-generic methods that only depend on State (to avoid having them instantiated on template types that don't affect them. More... | |
class | OptionalParseResult |
This class implements Optional functionality for ParseResult. More... | |
struct | OpToFuncCallLowering |
Rewriting that replace SourceOp with a CallOp to f32Func or f64Func depending on the element type that Op operates upon. More... | |
class | OpTraitRewritePattern |
OpTraitRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against instances of an operation that possess a given trait. More... | |
class | OpWithOffsetSizesAndStridesConstantArgumentFolder |
Pattern to rewrite a subview op with constant arguments. More... | |
class | OwningMemRef |
Owning MemRef type that abstracts over the runtime type for ranked strided memref. More... | |
class | OwningOpRef |
This class acts as an owning reference to an op, and will automatically destroy the held op on destruction if the held op is valid. More... | |
class | ParallelDiagnosticHandler |
This class is a utility diagnostic handler for use when multi-threading some part of the compiler where diagnostics may be emitted. More... | |
class | ParseResult |
This class represents success/failure for parsing-like operations that find it important to chain together failable operations with || . More... | |
class | Pass |
The abstract base pass class. More... | |
class | PassInfo |
A structure to represent the information for a derived pass class. More... | |
class | PassInstrumentation |
PassInstrumentation provides several entry points into the pass manager infrastructure. More... | |
class | PassInstrumentor |
This class holds a collection of PassInstrumentation objects, and invokes their respective call backs. More... | |
class | PassManager |
The main pass manager and pipeline builder. More... | |
class | PassNameCLParser |
This class implements a command-line parser specifically for MLIR pass names. More... | |
class | PassPipelineCLParser |
This class implements a command-line parser for MLIR passes. More... | |
class | PassPipelineInfo |
A structure to represent the information of a registered pass pipeline. More... | |
class | PassPipelineOptions |
Subclasses of PassPipelineOptions provide a set of options that can be used to initialize a pass pipeline. More... | |
struct | PassPipelineRegistration |
PassPipelineRegistration provides a global initializer that registers a Pass pipeline builder routine. More... | |
struct | PassPipelineRegistration< EmptyPipelineOptions > |
Convenience specialization of PassPipelineRegistration for EmptyPassOptions that does not pass an empty options struct to the pass builder function. More... | |
struct | PassRegistration |
PassRegistration provides a global initializer that registers a Pass allocation routine for a concrete pass instance. More... | |
class | PassRegistryEntry |
Structure to group information about a passes and pass pipelines (argument to invoke via mlir-opt, description, pass pipeline builder). More... | |
class | PassWrapper |
This class provides a CRTP wrapper around a base pass class to define several necessary utility methods. More... | |
class | Pattern |
This class contains all of the data related to a pattern, but does not contain any methods or logic for the actual matching. More... | |
class | PatternApplicator |
This class manages the application of a group of rewrite patterns, with a user-provided cost model. More... | |
class | PatternBenefit |
This class represents the benefit of a pattern match in a unitless scheme that ranges from 0 (very little benefit) to 65K. More... | |
class | PatternRewriter |
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current IR being matched, providing a way to keep track of any mutations made. More... | |
class | PDLPatternModule |
This class contains all of the necessary data for a set of PDL patterns, or pattern rewrites specified in the form of the PDL dialect. More... | |
class | PDLResultList |
The class represents a list of PDL results, returned by a native rewrite method. More... | |
class | PDLValue |
Storage type of byte-code interpreter values. More... | |
class | PostDominanceInfo |
A class for computing basic postdominance information. More... | |
class | PredecessorIterator |
Implement a predecessor iterator for blocks. More... | |
class | PyFileAccumulator |
Accumulates int a python file-like object, either writing text (default) or binary. More... | |
struct | PyPrintAccumulator |
Accumulates into a python string from a method that accepts an MlirStringCallback. More... | |
struct | PySinglePartStringAccumulator |
Accumulates into a python string from a method that is expected to make one (no more, no less) call to the callback (asserts internally on violation). More... | |
struct | Range |
Auxiliary range data structure to unpack the offset, size and stride operands into a list of triples. More... | |
class | raw_indented_ostream |
raw_ostream subclass that simplifies indention a sequence of code. More... | |
class | ReductionNode |
ReductionTreePass will build a reduction tree during module reduction and the ReductionNode represents the vertex of the tree. More... | |
class | Region |
This class contains a list of basic blocks and a link to the parent operation it is attached to. More... | |
class | RegionRange |
This class provides an abstraction over the different types of ranges over Regions. More... | |
class | RegionSuccessor |
This class represents a successor of a region. More... | |
class | RegisteredOperationName |
This is a "type erased" representation of a registered operation. More... | |
class | ResultElementTypeIterator |
class | ResultRange |
This class implements the result iterators for the Operation class. More... | |
class | RewritePattern |
RewritePattern is the common base class for all DAG to DAG replacements. More... | |
class | RewritePatternSet |
class | RewriterBase |
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to track mutations and create new operations. More... | |
struct | ScfToSPIRVContext |
struct | ScfToSPIRVContextImpl |
class | ScopedDiagnosticHandler |
This diagnostic handler is a simple RAII class that registers and erases a diagnostic handler on a given context. More... | |
class | SelfOwningTypeID |
Defines a TypeID for each instance of this class by using a pointer to the instance. More... | |
class | ShapeAdaptor |
Adaptor class to abstract the differences between whether value is from a ShapedType or ShapedTypeComponents or DenseIntElementsAttribute. More... | |
class | ShapedTypeComponents |
ShapedTypeComponents that represents the components of a ShapedType. More... | |
class | SimpleAffineExprFlattener |
class | SimpleObjectCache |
A simple object cache following Lang's LLJITWithObjectCache example. More... | |
class | Sliceable |
A CRTP base class for pseudo-containers willing to support Python-type slicing access on top of indexed access. More... | |
struct | SliceComputationResult |
Enumerates different result statuses of slice computation by computeSliceUnion More... | |
class | SourceMgrDiagnosticHandler |
This class is a utility diagnostic handler for use with llvm::SourceMgr. More... | |
class | SourceMgrDiagnosticVerifierHandler |
This class is a utility diagnostic handler for use with llvm::SourceMgr that verifies that emitted diagnostics match 'expected-*' lines on the corresponding line of the source file. More... | |
struct | SparseTensorConversionOptions |
SparseTensorConversion options. More... | |
struct | SparsificationOptions |
Options for the Sparsification pass. More... | |
class | SPIRVConversionTarget |
class | SPIRVToLLVMConversion |
class | SPIRVTypeConverter |
Type conversion from builtin types to SPIR-V types for shader interface. More... | |
class | SplatElementsAttr |
An attribute that represents a reference to a splat vector or tensor constant, meaning all of the elements have the same value. More... | |
class | StorageUniquer |
A utility class to get or create instances of "storage classes". More... | |
class | StructBuilder |
Helper class to produce LLVM dialect operations extracting or inserting values to a struct. More... | |
class | StructuredGenerator |
Helper StructuredGenerator class to manipulate and rewrite ops with StructuredOpInterface . More... | |
class | SuccessorOperands |
This class models how operands are forwarded to block arguments in control flow. More... | |
class | SuccessorRange |
This class implements the successor iterators for Block. More... | |
class | SymbolTable |
This class allows for representing and managing the symbol table used by operations with the 'SymbolTable' trait. More... | |
class | SymbolTableCollection |
This class represents a collection of SymbolTable s. More... | |
class | SymbolUserMap |
This class represents a map of symbols to users, and provides efficient implementations of symbol queries related to users; such as collecting the users of a symbol, replacing all uses, etc. More... | |
class | TensorType |
Tensor types represent multi-dimensional arrays, and have two variants: RankedTensorType and UnrankedTensorType. More... | |
class | Tester |
This class is used to keep track of the testing environment of the tool. More... | |
class | ThreadLocalCache |
This class provides support for defining a thread local object with non static storage duration. More... | |
class | Timer |
A handle for a timer in a TimingManager . More... | |
class | TimingIdentifier |
This class represesents a uniqued string owned by a TimingManager . More... | |
class | TimingManager |
This class represents facilities to measure execution time. More... | |
class | TimingScope |
An RAII-style wrapper around a timer that ensures the timer is properly started and stopped. More... | |
class | Token |
This represents a token in the MLIR syntax. More... | |
struct | TranslateFromMLIRRegistration |
struct | TranslateRegistration |
struct | TranslateToMLIRRegistration |
Use Translate[ToMLIR|FromMLIR]Registration as an initializer that registers a function and associates it with name. More... | |
struct | TranslationParser |
A command line parser for translation functions. More... | |
class | Type |
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable component. More... | |
class | TypeConverter |
Type conversion class. More... | |
class | TypeID |
This class provides an efficient unique identifier for a specific C++ type. More... | |
class | TypeIDAllocator |
This class provides a way to define new TypeIDs at runtime. More... | |
class | TypeInterface |
This class represents the base of a type interface. More... | |
class | TypeRange |
This class provides an abstraction over the various different ranges of value types. More... | |
class | TypeRangeRange |
This class provides an abstraction for a range of TypeRange. More... | |
class | TypeStorage |
Base storage class appearing in a Type. More... | |
class | UnrankedMemRefDescriptor |
class | Value |
This class represents an instance of an SSA value in the MLIR system, representing a computable value that has a type and a set of users. More... | |
class | ValueDecomposer |
This class provides a hook that expands one Value into multiple Value's, with a TypeConverter-inspired callback registration mechanism. More... | |
class | ValueRange |
This class provides an abstraction over the different types of ranges over Values. More... | |
class | ValueShapeRange |
Range of values and shapes (corresponding effectively to Shapes dialect's ValueShape type concept). More... | |
class | ValueTypeIterator |
This class implements iteration on the types of a given range of values. More... | |
class | ValueTypeRange |
This class implements iteration on the types of a given range of values. More... | |
class | ValueUseIterator |
An iterator class that allows for iterating over the uses of an IR operand type. More... | |
class | ValueUserIterator |
An iterator over the users of an IRObject. More... | |
class | VectorConvertToLLVMPattern |
Basic lowering implementation to rewrite Ops with just one result to the LLVM Dialect. More... | |
struct | VectorizationStrategy |
Holds parameters to perform n-D vectorization on a single loop nest. More... | |
struct | VectorTransferToSCFOptions |
When lowering an N-d vector transfer op to an (N-1)-d vector transfer op, a temporary buffer is created through which individual (N-1)-d vector are staged. More... | |
class | VulkanLayoutUtils |
According to the Vulkan spec "14.5.4. Offset and Stride Assignment": "There are different alignment requirements depending on the specific resources and on the features enabled on the device. More... | |
class | WalkResult |
A utility result that is used to signal how to proceed with an ongoing walk: More... | |
class | WalkStage |
A utility class to encode the current walk stage for "generic" walkers. More... | |
Typedefs | |
using | TransitiveFilter = llvm::function_ref< bool(Operation *)> |
Type of the condition to limit the propagation of transitive use-defs. More... | |
using | OwnedBlob = std::unique_ptr< std::vector< char > > |
using | BlobGenerator = std::function< OwnedBlob(const std::string &, Location, StringRef)> |
using | LoweringCallback = std::function< std::unique_ptr< llvm::Module >(Operation *, llvm::LLVMContext &, StringRef)> |
using | VectorizableLoopFun = std::function< bool(AffineForOp)> |
using | FilterFunctionType = std::function< bool(Operation &)> |
A NestedPattern is a nested operation walker that: More... | |
using | ReductionLoopMap = DenseMap< Operation *, SmallVector< LoopReduction, 2 > > |
using | NewYieldValueFn = std::function< SmallVector< Value >(OpBuilder &b, Location loc, ArrayRef< BlockArgument > newBBArgs)> |
Replace the loop with newIterOperands added as new initialization values. More... | |
using | Loops = SmallVector< scf::ForOp, 8 > |
Tile a nest of standard for loops rooted at rootForOp by finding such parametric tile sizes that the outer loops have a fixed number of iterations as defined in sizes . More... | |
using | TileLoops = std::pair< Loops, Loops > |
using | ReassociationIndices = SmallVector< int64_t, 2 > |
using | ReassociationIndicesRef = ArrayRef< int64_t > |
using | ReassociationExprs = SmallVector< AffineExpr, 2 > |
using | AllocFunType = llvm::function_ref< void *(size_t)> |
template<typename T > | |
using | ElementWiseVisitor = llvm::function_ref< void(T &ptr, ArrayRef< int64_t >)> |
Convenient callback to "visit" a memref element by element. More... | |
using | DataLayoutEntryKey = llvm::PointerUnion< Type, StringAttr > |
using | DataLayoutEntryList = llvm::SmallVector< DataLayoutEntryInterface, 4 > |
using | DataLayoutEntryListRef = llvm::ArrayRef< DataLayoutEntryInterface > |
using | ReifiedRankedShapedTypeDims = SmallVector< SmallVector< Value > > |
using | DefaultAttributeStorage = AttributeStorage |
Default storage type for attributes that require no additional initialization or storage. More... | |
using | AttributeStorageAllocator = StorageUniquer::StorageAllocator |
using | DialectAllocatorFunction = std::function< Dialect *(MLIRContext *)> |
using | DialectAllocatorFunctionRef = function_ref< Dialect *(MLIRContext *)> |
using | DominanceInfoNode = llvm::DomTreeNodeBase< Block > |
using | OpAsmSetValueNameFn = function_ref< void(Value, StringRef)> |
A functor used to set the name of the start of a result group of an operation. More... | |
using | OpAsmSetBlockNameFn = function_ref< void(Block *, StringRef)> |
A functor used to set the name of blocks in regions directly nested under an operation. More... | |
using | PDLConstraintFunction = std::function< LogicalResult(PatternRewriter &, ArrayRef< PDLValue >)> |
A generic PDL pattern constraint function. More... | |
using | PDLRewriteFunction = std::function< void(PatternRewriter &, PDLResultList &, ArrayRef< PDLValue >)> |
A native PDL rewrite function. More... | |
using | TypeRangeRangeIterator = llvm::mapped_iterator< llvm::iota_range< unsigned >::iterator, std::function< TypeRange(unsigned)> > |
using | DefaultTypeStorage = TypeStorage |
Default storage type for types that require no additional initialization or storage. More... | |
using | TypeStorageAllocator = StorageUniquer::StorageAllocator |
This is a utility allocator used to allocate memory for instances of derived Types. More... | |
using | OperandElementTypeRange = iterator_range< OperandElementTypeIterator > |
using | ResultElementTypeRange = iterator_range< ResultElementTypeIterator > |
using | PassRegistryFunction = std::function< LogicalResult(OpPassManager &, StringRef options, function_ref< LogicalResult(const Twine &)> errorHandler)> |
A registry function that adds passes to the given pass manager. More... | |
using | PassAllocatorFunction = std::function< std::unique_ptr< Pass >()> |
template<typename T , typename Enable = void> | |
using | DenseMapInfo = llvm::DenseMapInfo< T, Enable > |
template<typename KeyT , typename ValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>> | |
using | DenseMap = llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT > |
template<typename ValueT , typename ValueInfoT = DenseMapInfo<ValueT>> | |
using | DenseSet = llvm::DenseSet< ValueT, ValueInfoT > |
template<typename T , typename Vector = std::vector<T>, typename Set = DenseSet<T>> | |
using | SetVector = llvm::SetVector< T, Vector, Set > |
template<typename AllocatorTy = llvm::MallocAllocator> | |
using | StringSet = llvm::StringSet< AllocatorTy > |
template<typename T , typename R = T> | |
using | StringSwitch = llvm::StringSwitch< T, R > |
template<typename T , typename ResultT = void> | |
using | TypeSwitch = llvm::TypeSwitch< T, ResultT > |
template<typename Fn > | |
using | function_ref = llvm::function_ref< Fn > |
using | ChunkBufferHandler = function_ref< LogicalResult(std::unique_ptr< llvm::MemoryBuffer > chunkBuffer, raw_ostream &os)> |
using | GenFunction = std::function< bool(const llvm::RecordKeeper &recordKeeper, raw_ostream &os)> |
Generator function to invoke. More... | |
using | PassPipelineFn = llvm::function_ref< LogicalResult(PassManager &pm)> |
This defines the function type used to setup the pass manager. More... | |
using | TranslateSourceMgrToMLIRFunction = std::function< OwningOpRef< ModuleOp >(llvm::SourceMgr &sourceMgr, MLIRContext *)> |
Interface of the function that translates the sources managed by sourceMgr to MLIR. More... | |
using | TranslateStringRefToMLIRFunction = std::function< OwningOpRef< ModuleOp >(llvm::StringRef, MLIRContext *)> |
Interface of the function that translates the given string to MLIR. More... | |
using | TranslateFromMLIRFunction = std::function< LogicalResult(ModuleOp, llvm::raw_ostream &output)> |
Interface of the function that translates MLIR to a different format and outputs the result to a stream. More... | |
using | TranslateFunction = std::function< LogicalResult(llvm::SourceMgr &sourceMgr, llvm::raw_ostream &output, MLIRContext *)> |
Interface of the function that performs file-to-file translation involving MLIR. More... | |
Functions | |
raw_ostream & | operator<< (raw_ostream &os, const AliasResult &result) |
raw_ostream & | operator<< (raw_ostream &os, const ModRefResult &result) |
ChangeResult | operator| (ChangeResult lhs, ChangeResult rhs) |
ChangeResult & | operator|= (ChangeResult &lhs, ChangeResult rhs) |
ChangeResult | operator & (ChangeResult lhs, ChangeResult rhs) |
void | getForwardSlice (Operation *op, SetVector< Operation *> *forwardSlice, TransitiveFilter filter=nullptr) |
Fills forwardSlice with the computed forward slice (i.e. More... | |
void | getForwardSlice (Value root, SetVector< Operation *> *forwardSlice, TransitiveFilter filter=nullptr) |
Value-rooted version of getForwardSlice . More... | |
void | getBackwardSlice (Operation *op, SetVector< Operation *> *backwardSlice, TransitiveFilter filter=nullptr) |
Fills backwardSlice with the computed backward slice (i.e. More... | |
void | getBackwardSlice (Value root, SetVector< Operation *> *backwardSlice, TransitiveFilter filter=nullptr) |
Value-rooted version of getBackwardSlice . More... | |
SetVector< Operation * > | getSlice (Operation *op, TransitiveFilter backwardFilter=nullptr, TransitiveFilter forwardFilter=nullptr) |
Iteratively computes backward slices and forward slices until a fixed point is reached. More... | |
SetVector< Operation * > | topologicalSort (const SetVector< Operation *> &toSort) |
Multi-root DAG topological sort. More... | |
Value | matchReduction (ArrayRef< BlockArgument > iterCarriedArgs, unsigned redPos, SmallVectorImpl< Operation *> &combinerOps) |
Utility to match a generic reduction given a list of iteration-carried arguments, iterCarriedArgs and the position of the potential reduction argument within the list, redPos . More... | |
void | populateAffineToStdConversionPatterns (RewritePatternSet &patterns) |
Collect a set of patterns to convert from the Affine dialect to the Standard dialect, in particular convert structured affine control flow into CFG branch-based control flow. More... | |
void | populateAffineToVectorConversionPatterns (RewritePatternSet &patterns) |
Collect a set of patterns to convert vector-related Affine ops to the Vector dialect. More... | |
Value | lowerAffineLowerBound (AffineForOp op, OpBuilder &builder) |
Emit code that computes the lower bound of the given affine loop using standard arithmetic operations. More... | |
Value | lowerAffineUpperBound (AffineForOp op, OpBuilder &builder) |
Emit code that computes the upper bound of the given affine loop using standard arithmetic operations. More... | |
std::unique_ptr< Pass > | createLowerAffinePass () |
Lowers affine control flow operations (ForStmt, IfStmt and AffineApplyOp) to equivalent lower-level constructs (flow of basic blocks and arithmetic primitives). More... | |
void | populateAMDGPUToROCDLConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
std::unique_ptr< Pass > | createConvertAMDGPUToROCDLPass () |
void | populateConvertArmNeon2dToIntrPatterns (RewritePatternSet &patterns) |
Populates patterns for the lowering of Arm NEON 2D ops to intrinsics. More... | |
std::unique_ptr< Pass > | createConvertArmNeon2dToIntrPass () |
Creates a pass to lower Arm NEON 2D ops to intrinsics, i.e. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertAsyncToLLVMPass () |
Create a pass to convert Async operations to the LLVM dialect. More... | |
void | populateAsyncStructuralTypeConversionsAndLegality (TypeConverter &typeConverter, RewritePatternSet &patterns, ConversionTarget &target) |
Populates patterns for async structural type conversions. More... | |
void | populateBufferizationToMemRefConversionPatterns (RewritePatternSet &patterns) |
Collect a set of patterns to convert memory-related operations from the Bufferization dialect to the MemRef dialect. More... | |
std::unique_ptr< Pass > | createBufferizationToMemRefPass () |
void | populateComplexToLibmConversionPatterns (RewritePatternSet &patterns, PatternBenefit benefit) |
Populate the given list with patterns that convert from Complex to Libm calls. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertComplexToLibmPass () |
Create a pass to convert Complex operations to libm calls. More... | |
void | populateComplexToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Populate the given list with patterns that convert from Complex to LLVM. More... | |
std::unique_ptr< Pass > | createConvertComplexToLLVMPass () |
Create a pass to convert Complex operations to the LLVMIR dialect. More... | |
void | populateComplexToStandardConversionPatterns (RewritePatternSet &patterns) |
Populate the given list with patterns that convert from Complex to Standard. More... | |
std::unique_ptr< Pass > | createConvertComplexToStandardPass () |
Create a pass to convert Complex operations to the Standard dialect. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertControlFlowToSPIRVPass () |
Creates a pass to convert ControlFlow ops to SPIR-V ops. More... | |
void | populateFuncToLLVMFuncOpConversionPattern (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect the default pattern to convert a FuncOp to the LLVM dialect. More... | |
void | populateFuncToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect the patterns to convert from the Func dialect to LLVM. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertFuncToLLVMPass () |
Creates a pass to convert the Func dialect into the LLVMIR dialect. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertFuncToLLVMPass (const LowerToLLVMOptions &options) |
void | populateFuncToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating Func ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertFuncToSPIRVPass () |
Creates a pass to convert Func ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createGpuToLLVMConversionPass () |
Creates a pass to convert a GPU operations into a sequence of GPU runtime calls. More... | |
void | populateGpuToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns, StringRef gpuBinaryAnnotation={}) |
Collect a set of patterns to convert from the GPU dialect to LLVM and populate converter for gpu types. More... | |
LLVM::LLVMStructType | convertMMAToLLVMType (gpu::MMAMatrixType type) |
Return the LLVMStructureType corresponding to the MMAMatrixType type . More... | |
void | configureGpuToNVVMConversionLegality (ConversionTarget &target) |
Configure target to convert from the GPU dialect to NVVM. More... | |
void | populateGpuToNVVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect a set of patterns to convert from the GPU dialect to NVVM. More... | |
void | populateGpuWMMAToNVVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect a set of patterns to convert WMMA ops from GPU dialect to NVVM. More... | |
std::unique_ptr< OperationPass< gpu::GPUModuleOp > > | createLowerGpuOpsToNVVMOpsPass (unsigned indexBitwidth=kDeriveIndexBitwidthFromDataLayout) |
Creates a pass that lowers GPU dialect operations to NVVM counterparts. More... | |
void | populateGpuToROCDLConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns, gpu::amd::Runtime runtime) |
Collect a set of patterns to convert from the GPU dialect to ROCDL. More... | |
void | configureGpuToROCDLConversionLegality (ConversionTarget &target) |
Configure target to convert from the GPU dialect to ROCDL. More... | |
std::unique_ptr< OperationPass< gpu::GPUModuleOp > > | createLowerGpuOpsToROCDLOpsPass (unsigned indexBitwidth=kDeriveIndexBitwidthFromDataLayout, gpu::amd::Runtime runtime=gpu::amd::Runtime::Unknown) |
Creates a pass that lowers GPU dialect operations to ROCDL counterparts. More... | |
void | populateGPUToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating GPU Ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertGPUToSPIRVPass () |
Creates a pass to convert GPU Ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertVulkanLaunchFuncToVulkanCallsPass () |
std::unique_ptr< OperationPass< mlir::ModuleOp > > | createConvertGpuLaunchFuncToVulkanLaunchFuncPass () |
void | populateLinalgToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Populate the given list with patterns that convert from Linalg to LLVM. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertLinalgToLLVMPass () |
Create a pass to convert Linalg operations to the LLVMIR dialect. More... | |
void | populateLinalgToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating Linalg ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createLinalgToSPIRVPass () |
Creates and returns a pass to convert Linalg ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertLinalgToStandardPass () |
Create a pass to convert Linalg operations to the Standard dialect. More... | |
LogicalResult | structFuncArgTypeConverter (LLVMTypeConverter &converter, Type type, SmallVectorImpl< Type > &result) |
Callback to convert function argument types. More... | |
LogicalResult | barePtrFuncArgTypeConverter (LLVMTypeConverter &converter, Type type, SmallVectorImpl< Type > &result) |
Callback to convert function argument types. More... | |
void | populateMathToLibmConversionPatterns (RewritePatternSet &patterns, PatternBenefit benefit) |
Populate the given list with patterns that convert from Math to Libm calls. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertMathToLibmPass () |
Create a pass to convert Math operations to libm calls. More... | |
void | populateMathToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
std::unique_ptr< Pass > | createConvertMathToLLVMPass () |
void | populateMathToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating Math ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertMathToSPIRVPass () |
Creates a pass to convert Math ops to SPIR-V ops. More... | |
void | populateMemRefToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect a set of patterns to convert memory-related operations from the MemRef dialect to the LLVM dialect. More... | |
std::unique_ptr< Pass > | createMemRefToLLVMPass () |
void | populateMemRefToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating MemRef ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertMemRefToSPIRVPass () |
Creates a pass to convert MemRef ops to SPIR-V ops. More... | |
void | populateNVGPUToNVVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
std::unique_ptr< Pass > | createConvertNVGPUToNVVMPass () |
void | populateOpenACCToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect the patterns to convert from the OpenACC dialect LLVMIR dialect. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertOpenACCToLLVMPass () |
Create a pass to convert the OpenACC dialect into the LLVMIR dialect. More... | |
void | populateOpenACCToSCFConversionPatterns (RewritePatternSet &patterns) |
Collect the patterns to convert from the OpenACC dialect to OpenACC with SCF dialect. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertOpenACCToSCFPass () |
Create a pass to convert the OpenACC dialect into the LLVMIR dialect. More... | |
void | configureOpenMPToLLVMConversionLegality (ConversionTarget &target, LLVMTypeConverter &typeConverter) |
Configure dynamic conversion legality of regionless operations from OpenMP to LLVM. More... | |
void | populateOpenMPToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Populate the given list with patterns that convert from OpenMP to LLVM. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertOpenMPToLLVMPass () |
Create a pass to convert OpenMP operations to the LLVMIR dialect. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createPDLToPDLInterpPass () |
Creates and returns a pass to convert PDL ops to PDL interpreter ops. More... | |
std::unique_ptr< Pass > | createReconcileUnrealizedCastsPass () |
Creates a pass that eliminates noop unrealized_conversion_cast operation sequences. More... | |
void | populateReconcileUnrealizedCastsPatterns (RewritePatternSet &patterns) |
Populates patterns with rewrite patterns that eliminate noop unrealized_conversion_cast operation sequences. More... | |
void | populateSCFToControlFlowConversionPatterns (RewritePatternSet &patterns) |
Collect a set of patterns to convert SCF operations to CFG branch-based operations within the ControlFlow dialect. More... | |
std::unique_ptr< Pass > | createConvertSCFToCFPass () |
Creates a pass to convert SCF operations to CFG branch-based operation in the ControlFlow dialect. More... | |
LogicalResult | convertAffineLoopNestToGPULaunch (AffineForOp forOp, unsigned numBlockDims, unsigned numThreadDims) |
Convert a perfect affine loop nest with the outermost loop identified by forOp into a gpu::Launch operation. More... | |
void | populateParallelLoopToGPUPatterns (RewritePatternSet &patterns) |
Adds the conversion pattern from scf.parallel to gpu.launch to the provided pattern list. More... | |
void | configureParallelLoopToGPULegality (ConversionTarget &target) |
Configures the rewrite target such that only scf.parallel operations that are not rewritten by the provided patterns are legal. More... | |
void | finalizeParallelLoopToGPUConversion (Operation *op) |
Clean up after applyPartialConversion/applyFullConversion call. More... | |
std::unique_ptr< InterfacePass< FunctionOpInterface > > | createAffineForToGPUPass (unsigned numBlockDims, unsigned numThreadDims) |
Create a pass that converts loop nests into GPU kernels. More... | |
std::unique_ptr< InterfacePass< FunctionOpInterface > > | createAffineForToGPUPass () |
std::unique_ptr< Pass > | createParallelLoopToGpuPass () |
Creates a pass that converts scf.parallel operations into a gpu.launch operation. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertSCFToOpenMPPass () |
void | populateSCFToSPIRVPatterns (SPIRVTypeConverter &typeConverter, ScfToSPIRVContext &scfToSPIRVContext, RewritePatternSet &patterns) |
Collects a set of patterns to lower from scf.for, scf.if, and loop.terminator to CFG operations within the SPIR-V dialect. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertSCFToSPIRVPass () |
Creates a pass to convert SCF ops into SPIR-V ops. More... | |
void | populateShapeToStandardConversionPatterns (RewritePatternSet &patterns) |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertShapeToStandardPass () |
void | populateConvertShapeConstraintsConversionPatterns (RewritePatternSet &patterns) |
std::unique_ptr< Pass > | createConvertShapeConstraintsPass () |
void | encodeBindAttribute (ModuleOp module) |
Encodes global variable's descriptor set and binding into its name if they both exist. More... | |
void | populateSPIRVToLLVMTypeConversion (LLVMTypeConverter &typeConverter) |
Populates type conversions with additional SPIR-V types. More... | |
void | populateSPIRVToLLVMConversionPatterns (LLVMTypeConverter &typeConverter, RewritePatternSet &patterns) |
Populates the given list with patterns that convert from SPIR-V to LLVM. More... | |
void | populateSPIRVToLLVMFunctionConversionPatterns (LLVMTypeConverter &typeConverter, RewritePatternSet &patterns) |
Populates the given list with patterns for function conversion from SPIR-V to LLVM. More... | |
void | populateSPIRVToLLVMModuleConversionPatterns (LLVMTypeConverter &typeConverter, RewritePatternSet &patterns) |
Populates the given patterns for module conversion from SPIR-V to LLVM. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createLowerHostCodeToLLVMPass () |
Creates a pass to emulate gpu.launch_func call in LLVM dialect and lower the host module code to LLVM. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertSPIRVToLLVMPass () |
Creates a pass to convert SPIR-V operations to the LLVMIR dialect. More... | |
void | populateTensorToLinalgPatterns (RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating tensor ops to Linalg ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertTensorToLinalgPass () |
Creates a pass to convert Tensor ops to Linalg ops. More... | |
void | populateTensorToSPIRVPatterns (SPIRVTypeConverter &typeConverter, int64_t byteCountThreshold, RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating tensor ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertTensorToSPIRVPass () |
Creates a pass to convert Tensor ops to SPIR-V ops. More... | |
void | populatePrepareVectorToMMAPatterns (RewritePatternSet &patterns, bool useNvGpu=false) |
Patterns to transform vector ops into a canonical form to convert to MMA matrix operations. More... | |
void | convertVectorToMMAOps (Operation *rootOp) |
Convert vector ops to MMA matrix operations nested under rootOp . More... | |
LogicalResult | convertVectorToNVVMCompatibleMMASync (Operation *rootOp) |
Convert vector ops ops nested under rootOp to vector and GPU operaitons compatible with the nvvm.mma.sync lowering path. More... | |
std::unique_ptr< Pass > | createConvertVectorToGPUPass (bool useNvGpu=false) |
Convert from vector to GPU ops. More... | |
void | populateVectorToLLVMMatrixConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect a set of patterns to convert from Vector contractions to LLVM Matrix Intrinsics. More... | |
void | populateVectorToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns, bool reassociateFPReductions=false, bool force32BitVectorIndices=false) |
Collect a set of patterns to convert from the Vector dialect to LLVM. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertVectorToLLVMPass (const LowerVectorToLLVMOptions &options=LowerVectorToLLVMOptions()) |
Create a pass to convert vector operations to the LLVMIR dialect. More... | |
void | populateVectorToROCDLConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect a set of patterns to convert from the GPU dialect to ROCDL. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertVectorToROCDLPass () |
Create a pass to convert vector operations to the ROCDL dialect. More... | |
void | populateVectorToSCFConversionPatterns (RewritePatternSet &patterns, const VectorTransferToSCFOptions &options=VectorTransferToSCFOptions()) |
Collect a set of patterns to convert from the Vector dialect to SCF + func. More... | |
std::unique_ptr< Pass > | createConvertVectorToSCFPass (const VectorTransferToSCFOptions &options=VectorTransferToSCFOptions()) |
Create a pass to convert a subset of vector ops to SCF. More... | |
void | populateVectorToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating Vector Ops to SPIR-V ops. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertVectorToSPIRVPass () |
Creates a pass to convert Vector Ops to SPIR-V ops. More... | |
void | getSupportedReductions (AffineForOp forOp, SmallVectorImpl< LoopReduction > &supportedReductions) |
Populate supportedReductions with descriptors of the supported reductions. More... | |
bool | isLoopParallel (AffineForOp forOp, SmallVectorImpl< LoopReduction > *parallelReductions=nullptr) |
Returns true if `forOp' is a parallel loop. More... | |
bool | isLoopMemoryParallel (AffineForOp forOp) |
Returns true if `forOp' doesn't have memory dependences preventing parallelization. More... | |
void | getReachableAffineApplyOps (ArrayRef< Value > operands, SmallVectorImpl< Operation *> &affineApplyOps) |
Returns in affineApplyOps , the sequence of those AffineApplyOp Operations that are reachable via a search starting from operands and ending at those operands that are not the result of an AffineApplyOp. More... | |
LogicalResult | getIndexSet (MutableArrayRef< Operation *> ops, FlatAffineValueConstraints *domain) |
Builds a system of constraints with dimensional identifiers corresponding to the loop IVs of the forOps and AffineIfOp's operands appearing in that order. More... | |
DependenceResult | checkMemrefAccessDependence (const MemRefAccess &srcAccess, const MemRefAccess &dstAccess, unsigned loopDepth, FlatAffineValueConstraints *dependenceConstraints, SmallVector< DependenceComponent, 2 > *dependenceComponents, bool allowRAR=false) |
bool | hasDependence (DependenceResult result) |
Utility function that returns true if the provided DependenceResult corresponds to a dependence result. More... | |
void | getDependenceComponents (AffineForOp forOp, unsigned maxLoopDepth, std::vector< SmallVector< DependenceComponent, 2 >> *depCompsVec) |
Returns in 'depCompsVec', dependence components for dependences between all load and store ops in loop nest rooted at 'forOp', at loop depths in range [1, maxLoopDepth]. More... | |
LogicalResult | getFlattenedAffineExpr (AffineExpr expr, unsigned numDims, unsigned numSymbols, SmallVectorImpl< int64_t > *flattenedExpr, FlatAffineValueConstraints *cst=nullptr) |
Flattens 'expr' into 'flattenedExpr', which contains the coefficients of the dimensions, symbols, and additional variables that represent floor divisions of dimensions, symbols, and in turn other floor divisions. More... | |
LogicalResult | getFlattenedAffineExprs (AffineMap map, std::vector< SmallVector< int64_t, 8 >> *flattenedExprs, FlatAffineValueConstraints *cst=nullptr) |
Flattens the result expressions of the map to their corresponding flattened forms and set in 'flattenedExprs'. More... | |
LogicalResult | getFlattenedAffineExprs (IntegerSet set, std::vector< SmallVector< int64_t, 8 >> *flattenedExprs, FlatAffineValueConstraints *cst=nullptr) |
AffineMap | alignAffineMapWithValues (AffineMap map, ValueRange operands, ValueRange dims, ValueRange syms, SmallVector< Value > *newSyms=nullptr) |
Re-indexes the dimensions and symbols of an affine map with given operands values to align with dims and syms values. More... | |
LogicalResult | getRelationFromMap (AffineMap &map, FlatAffineRelation &rel) |
Builds a relation from the given AffineMap/AffineValueMap map , containing all pairs of the form operands -> result that satisfy map . More... | |
LogicalResult | getRelationFromMap (const AffineValueMap &map, FlatAffineRelation &rel) |
void | getTripCountMapAndOperands (AffineForOp forOp, AffineMap *map, SmallVectorImpl< Value > *operands) |
Returns the trip count of the loop as an affine map with its corresponding operands if the latter is expressible as an affine expression, and nullptr otherwise. More... | |
Optional< uint64_t > | getConstantTripCount (AffineForOp forOp) |
Returns the trip count of the loop if it's a constant, None otherwise. More... | |
uint64_t | getLargestDivisorOfTripCount (AffineForOp forOp) |
Returns the greatest known integral divisor of the trip count. More... | |
DenseSet< Value, DenseMapInfo< Value > > | getInvariantAccesses (Value iv, ArrayRef< Value > indices) |
Given an induction variable iv of type AffineForOp and indices of type IndexType, returns the set of indices that are independent of iv . More... | |
bool | isVectorizableLoopBody (AffineForOp loop, NestedPattern &vectorTransferMatcher) |
Checks whether the loop is structurally vectorizable; i.e. More... | |
bool | isVectorizableLoopBody (AffineForOp loop, int *memRefDim, NestedPattern &vectorTransferMatcher) |
Checks whether the loop is structurally vectorizable and that all the LoadOp and StoreOp matched have access indexing functions that are are either: More... | |
bool | isOpwiseShiftValid (AffineForOp forOp, ArrayRef< uint64_t > shifts) |
Checks where SSA dominance would be violated if a for op's body operations are shifted by the specified shifts. More... | |
bool | defaultFilterFunction (Operation &) |
void | getLoopIVs (Operation &op, SmallVectorImpl< AffineForOp > *loops) |
Populates 'loops' with IVs of the loops surrounding 'op' ordered from the outermost 'affine.for' operation to the innermost one. More... | |
void | getEnclosingAffineForAndIfOps (Operation &op, SmallVectorImpl< Operation *> *ops) |
Populates 'ops' with IVs of the loops surrounding op , along with affine.if operations interleaved between these loops, ordered from the outermost affine.for or affine.if operation to the innermost one. More... | |
unsigned | getNestingDepth (Operation *op) |
Returns the nesting depth of this operation, i.e., the number of loops surrounding this operation. More... | |
bool | isLoopParallelAndContainsReduction (AffineForOp forOp) |
Returns whether a loop is a parallel loop and contains a reduction loop. More... | |
void | getSequentialLoops (AffineForOp forOp, llvm::SmallDenseSet< Value, 8 > *sequentialLoops) |
Returns in 'sequentialLoops' all sequential loops in loop nest rooted at 'forOp'. More... | |
void | getComputationSliceState (Operation *depSourceOp, Operation *depSinkOp, FlatAffineValueConstraints *dependenceConstraints, unsigned loopDepth, bool isBackwardSlice, ComputationSliceState *sliceState) |
Computes the computation slice loop bounds for one loop nest as affine maps of the other loop nest's IVs and symbols, using 'dependenceConstraints' computed between 'depSourceAccess' and 'depSinkAccess'. More... | |
uint64_t | getSliceIterationCount (const llvm::SmallDenseMap< Operation *, uint64_t, 8 > &sliceTripCountMap) |
Return the number of iterations for the slicetripCountMap provided. More... | |
bool | buildSliceTripCountMap (const ComputationSliceState &slice, llvm::SmallDenseMap< Operation *, uint64_t, 8 > *tripCountMap) |
Builds a map 'tripCountMap' from AffineForOp to constant trip count for loop nest surrounding represented by slice loop bounds in 'slice'. More... | |
SliceComputationResult | computeSliceUnion (ArrayRef< Operation *> opsA, ArrayRef< Operation *> opsB, unsigned loopDepth, unsigned numCommonLoops, bool isBackwardSlice, ComputationSliceState *sliceUnion) |
Computes in 'sliceUnion' the union of all slice bounds computed at 'loopDepth' between all dependent pairs of ops in 'opsA' and 'opsB', and then verifies if it is valid. More... | |
AffineForOp | insertBackwardComputationSlice (Operation *srcOpInst, Operation *dstOpInst, unsigned dstLoopDepth, ComputationSliceState *sliceState) |
Creates a clone of the computation contained in the loop nest surrounding 'srcOpInst', slices the iteration space of src loop based on slice bounds in 'sliceState', and inserts the computation slice at the beginning of the operation block of the loop at 'dstLoopDepth' in the loop nest surrounding 'dstOpInst'. More... | |
Optional< uint64_t > | getMemRefSizeInBytes (MemRefType memRefType) |
Returns the size of memref data in bytes if it's statically shaped, None otherwise. More... | |
template<typename LoadOrStoreOpPointer > | |
LogicalResult | boundCheckLoadOrStoreOp (LoadOrStoreOpPointer loadOrStoreOp, bool emitError=true) |
Checks a load or store op for an out of bound access; returns failure if the access is out of bounds along any of the dimensions, success otherwise. More... | |
unsigned | getNumCommonSurroundingLoops (Operation &a, Operation &b) |
Returns the number of surrounding loops common to both A and B. More... | |
Optional< int64_t > | getMemoryFootprintBytes (AffineForOp forOp, int memorySpace=-1) |
Gets the memory footprint of all data touched in the specified memory space in bytes; if the memory space is unspecified, considers all memory spaces. More... | |
IntegerSet | simplifyIntegerSet (IntegerSet set) |
Simplify the integer set by simplifying the underlying affine expressions by flattening and some simple inference. More... | |
unsigned | getInnermostCommonLoopDepth (ArrayRef< Operation *> ops, SmallVectorImpl< AffineForOp > *surroundingLoops=nullptr) |
Returns the innermost common loop depth for the set of operations in 'ops'. More... | |
bool | isTopLevelValue (Value value) |
TODO: These should be renamed if they are on the mlir namespace. More... | |
bool | isTopLevelValue (Value value, Region *region) |
A utility function to check if a value is defined at the top level of region or is an argument of region . More... | |
Region * | getAffineScope (Operation *op) |
Returns the closest region enclosing op that is held by an operation with trait AffineScope ; nullptr if there is no such region. More... | |
bool | isValidDim (Value value) |
Returns true if the given Value can be used as a dimension id in the region of the closest surrounding op that has the trait AffineScope . More... | |
bool | isValidDim (Value value, Region *region) |
Returns true if the given Value can be used as a dimension id in region , i.e., for all its uses in region . More... | |
bool | isValidSymbol (Value value) |
Returns true if the given value can be used as a symbol in the region of the closest surrounding op that has the trait AffineScope . More... | |
bool | isValidSymbol (Value value, Region *region) |
Returns true if the given Value can be used as a symbol for region , i.e., for all its uses in region . More... | |
ParseResult | parseDimAndSymbolList (OpAsmParser &parser, SmallVectorImpl< Value > &operands, unsigned &numDims) |
Parses dimension and symbol list. More... | |
void | canonicalizeMapAndOperands (AffineMap *map, SmallVectorImpl< Value > *operands) |
Modifies both map and operands in-place so as to: More... | |
void | canonicalizeSetAndOperands (IntegerSet *set, SmallVectorImpl< Value > *operands) |
Canonicalizes an integer set the same way canonicalizeMapAndOperands does for affine maps. More... | |
AffineApplyOp | makeComposedAffineApply (OpBuilder &b, Location loc, AffineMap map, ValueRange operands) |
Returns a composed AffineApplyOp by composing map and operands with other AffineApplyOps supplying those operands. More... | |
AffineApplyOp | makeComposedAffineApply (OpBuilder &b, Location loc, AffineExpr e, ValueRange values) |
Variant of makeComposedAffineApply which infers the AffineMap from e . More... | |
SmallVector< Value, 4 > | applyMapToValues (OpBuilder &b, Location loc, AffineMap map, ValueRange values) |
Returns the values obtained by applying map to the list of values. More... | |
void | fullyComposeAffineMapAndOperands (AffineMap *map, SmallVectorImpl< Value > *operands) |
Given an affine map map and its input operands , this method composes into map , maps of AffineApplyOps whose results are the values in operands , iteratively until no more of operands are the result of an AffineApplyOp. More... | |
bool | isForInductionVar (Value val) |
Returns true if the provided value is the induction variable of a AffineForOp. More... | |
AffineForOp | getForInductionVarOwner (Value val) |
Returns the loop parent of an induction variable. More... | |
void | extractForInductionVars (ArrayRef< AffineForOp > forInsts, SmallVectorImpl< Value > *ivs) |
Extracts the induction variables from a list of AffineForOps and places them in the output argument ivs . More... | |
void | buildAffineLoopNest (OpBuilder &builder, Location loc, ArrayRef< int64_t > lbs, ArrayRef< int64_t > ubs, ArrayRef< int64_t > steps, function_ref< void(OpBuilder &, Location, ValueRange)> bodyBuilderFn=nullptr) |
Builds a perfect nest of affine.for loops, i.e., each loop except the innermost one contains only another loop and a terminator. More... | |
void | buildAffineLoopNest (OpBuilder &builder, Location loc, ValueRange lbs, ValueRange ubs, ArrayRef< int64_t > steps, function_ref< void(OpBuilder &, Location, ValueRange)> bodyBuilderFn=nullptr) |
AffineForOp | replaceForOpWithNewYields (OpBuilder &b, AffineForOp loop, ValueRange newIterOperands, ValueRange newYieldedValues, ValueRange newIterArgs, bool replaceLoopResults=true) |
Replace loop with a new loop where newIterOperands are appended with new initialization values and newYieldedValues are added as new yielded values. More... | |
FusionResult | canFuseLoops (AffineForOp srcForOp, AffineForOp dstForOp, unsigned dstLoopDepth, ComputationSliceState *srcSlice, FusionStrategy fusionStrategy=FusionStrategy::Generic) |
Checks the feasibility of fusing the loop nest rooted at 'srcForOp' into the loop nest rooted at 'dstForOp' at 'dstLoopDepth'. More... | |
void | fuseLoops (AffineForOp srcForOp, AffineForOp dstForOp, const ComputationSliceState &srcSlice, bool isInnermostSiblingInsertionFusion=false) |
Fuses 'srcForOp' into 'dstForOp' with destination loop block insertion point and source slice loop bounds specified in 'srcSlice'. More... | |
bool | getLoopNestStats (AffineForOp forOp, LoopNestStats *stats) |
Collect loop nest statistics (eg. More... | |
int64_t | getComputeCost (AffineForOp forOp, LoopNestStats &stats) |
Computes the total cost of the loop nest rooted at 'forOp' using 'stats'. More... | |
bool | getFusionComputeCost (AffineForOp srcForOp, LoopNestStats &srcStats, AffineForOp dstForOp, LoopNestStats &dstStats, const ComputationSliceState &slice, int64_t *computeCost) |
Computes and returns in 'computeCost', the total compute cost of fusing the 'slice' of the loop nest rooted at 'srcForOp' into 'dstForOp'. More... | |
void | gatherProducerConsumerMemrefs (ArrayRef< Operation *> srcOps, ArrayRef< Operation *> dstOps, DenseSet< Value > &producerConsumerMemrefs) |
Returns in 'producerConsumerMemrefs' the memrefs involved in a producer-consumer dependence between write ops in 'srcOps' and read ops in 'dstOps'. More... | |
LogicalResult | loopUnrollFull (AffineForOp forOp) |
Unrolls this for operation completely if the trip count is known to be constant. More... | |
LogicalResult | loopUnrollByFactor (AffineForOp forOp, uint64_t unrollFactor, function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn=nullptr) |
Unrolls this for operation by the specified unroll factor. More... | |
LogicalResult | loopUnrollUpToFactor (AffineForOp forOp, uint64_t unrollFactor) |
Unrolls this loop by the specified unroll factor or its trip count, whichever is lower. More... | |
bool LLVM_ATTRIBUTE_UNUSED | isPerfectlyNested (ArrayRef< AffineForOp > loops) |
Returns true if loops is a perfectly nested loop nest, where loops appear in it from outermost to innermost. More... | |
void | getPerfectlyNestedLoops (SmallVectorImpl< AffineForOp > &nestedLoops, AffineForOp root) |
Get perfectly nested sequence of loops starting at root of loop nest (the first op being another AffineFor, and the second op - a terminator). More... | |
LogicalResult | loopUnrollJamByFactor (AffineForOp forOp, uint64_t unrollJamFactor) |
Unrolls and jams this loop by the specified factor. More... | |
LogicalResult | loopUnrollJamUpToFactor (AffineForOp forOp, uint64_t unrollJamFactor) |
Unrolls and jams this loop by the specified factor or by the trip count (if constant), whichever is lower. More... | |
LogicalResult | promoteIfSingleIteration (AffineForOp forOp) |
Promotes the loop body of a AffineForOp to its containing block if the loop was known to have a single iteration. More... | |
void | promoteSingleIterationLoops (func::FuncOp f) |
Promotes all single iteration AffineForOp's in the Function, i.e., moves their body into the containing Block. More... | |
LogicalResult | affineForOpBodySkew (AffineForOp forOp, ArrayRef< uint64_t > shifts, bool unrollPrologueEpilogue=false) |
Skew the operations in an affine.for's body with the specified operation-wise shifts. More... | |
void | getTileableBands (func::FuncOp f, std::vector< SmallVector< AffineForOp, 6 >> *bands) |
Identify valid and profitable bands of loops to tile. More... | |
LogicalResult | tilePerfectlyNested (MutableArrayRef< AffineForOp > input, ArrayRef< unsigned > tileSizes, SmallVectorImpl< AffineForOp > *tiledNest=nullptr) |
Tiles the specified band of perfectly nested loops creating tile-space loops and intra-tile loops. More... | |
LogicalResult | tilePerfectlyNestedParametric (MutableArrayRef< AffineForOp > input, ArrayRef< Value > tileSizes, SmallVectorImpl< AffineForOp > *tiledNest=nullptr) |
Tiles the specified band of perfectly nested loops creating tile-space loops and intra-tile loops, using SSA values as tiling parameters. More... | |
void | interchangeLoops (AffineForOp forOpA, AffineForOp forOpB) |
Performs loop interchange on 'forOpA' and 'forOpB'. More... | |
bool | isValidLoopInterchangePermutation (ArrayRef< AffineForOp > loops, ArrayRef< unsigned > loopPermMap) |
Checks if the loop interchange permutation 'loopPermMap', of the perfectly nested sequence of loops in 'loops', would violate dependences (loop 'i' in 'loops' is mapped to location 'j = 'loopPermMap[i]' in the interchange). More... | |
unsigned | permuteLoops (MutableArrayRef< AffineForOp > inputNest, ArrayRef< unsigned > permMap) |
Performs a loop permutation on a perfectly nested loop nest inputNest (where the contained loops appear from outer to inner) as specified by the permutation permMap : loop 'i' in inputNest is mapped to location 'loopPermMap[i]', where positions 0, 1, ... More... | |
AffineForOp | sinkSequentialLoops (AffineForOp forOp) |
SmallVector< SmallVector< AffineForOp, 8 >, 8 > | tile (ArrayRef< AffineForOp > forOps, ArrayRef< uint64_t > sizes, ArrayRef< AffineForOp > targets) |
Performs tiling fo imperfectly nested loops (with interchange) by strip-mining the forOps by sizes and sinking them, in their order of occurrence in forOps , under each of the targets . More... | |
SmallVector< AffineForOp, 8 > | tile (ArrayRef< AffineForOp > forOps, ArrayRef< uint64_t > sizes, AffineForOp target) |
Performs tiling (with interchange) by strip-mining the forOps by sizes and sinking them, in their order of occurrence in forOps , under target . More... | |
LogicalResult | affineDataCopyGenerate (Block::iterator begin, Block::iterator end, const AffineCopyOptions ©Options, Optional< Value > filterMemRef, DenseSet< Operation *> ©Nests) |
Performs explicit copying for the contiguous sequence of operations in the block iterator range [`begin', `end'), where `end' can't be past the terminator of the block (since additional operations are potentially inserted right before end . More... | |
LogicalResult | affineDataCopyGenerate (AffineForOp forOp, const AffineCopyOptions ©Options, Optional< Value > filterMemRef, DenseSet< Operation *> ©Nests) |
A convenience version of affineDataCopyGenerate for all ops in the body of an AffineForOp. More... | |
LogicalResult | generateCopyForMemRegion (const MemRefRegion &memrefRegion, Operation *analyzedOp, const AffineCopyOptions ©Options, CopyGenerateResult &result) |
generateCopyForMemRegion is similar to affineDataCopyGenerate, but works with a single memref region. More... | |
LogicalResult | coalesceLoops (MutableArrayRef< AffineForOp > loops) |
Replace a perfect nest of "for" loops with a single linearized loop. More... | |
void | mapLoopToProcessorIds (scf::ForOp forOp, ArrayRef< Value > processorId, ArrayRef< Value > numProcessors) |
Maps forOp for execution on a parallel grid of virtual processorIds of size given by numProcessors . More... | |
void | gatherLoops (func::FuncOp func, std::vector< SmallVector< AffineForOp, 2 >> &depthToLoops) |
Gathers all AffineForOps in 'func.func' grouped by loop depth. More... | |
AffineForOp | createCanonicalizedAffineForOp (OpBuilder b, Location loc, ValueRange lbOperands, AffineMap lbMap, ValueRange ubOperands, AffineMap ubMap, int64_t step=1) |
Creates an AffineForOp while ensuring that the lower and upper bounds are canonicalized, i.e., unused and duplicate operands are removed, any constant operands propagated/folded in, and duplicate bound maps dropped. More... | |
LogicalResult | separateFullTiles (MutableArrayRef< AffineForOp > nest, SmallVectorImpl< AffineForOp > *fullTileNest=nullptr) |
Separates full tiles from partial tiles for a perfect nest nest by generating a conditional guard that selects between the full tile version and the partial tile version using an AffineIfOp. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createSimplifyAffineStructuresPass () |
Creates a simplification pass for affine structures (maps and sets). More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createAffineLoopInvariantCodeMotionPass () |
Creates a loop invariant code motion pass that hoists loop invariant operations out of affine loops. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createAffineParallelizePass () |
Creates a pass to convert all parallel affine.for's into 1-d affine.parallel ops. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createAffineLoopNormalizePass () |
Apply normalization transformations to affine loop-like ops. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createAffineDataCopyGenerationPass (unsigned slowMemorySpace, unsigned fastMemorySpace, unsigned tagMemorySpace=0, int minDmaTransferSize=1024, uint64_t fastMemCapacityBytes=std::numeric_limits< uint64_t >::max()) |
Performs packing (or explicit copying) of accessed memref regions into buffers in the specified faster memory space through either pointwise copies or DMA operations. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createAffineDataCopyGenerationPass () |
Overload relying on pass options for initialization. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createAffineScalarReplacementPass () |
Creates a pass to replace affine memref accesses by scalars using store to load forwarding and redundant load elimination; consequently also eliminate dead allocs. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLoopCoalescingPass () |
Creates a pass that transforms perfectly nested loops with independent bounds into a single loop. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLoopFusionPass (unsigned fastMemorySpace=0, uint64_t localBufSizeThreshold=0, bool maximalFusion=false, enum FusionMode fusionMode=FusionMode::Greedy) |
Creates a loop fusion pass which fuses loops according to type of fusion specified in fusionMode . More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLoopTilingPass (uint64_t cacheSizeBytes) |
Creates a pass to perform tiling on loop nests. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLoopTilingPass () |
Overload relying on pass options for initialization. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLoopUnrollPass (int unrollFactor=-1, bool unrollUpToFactor=false, bool unrollFull=false, const std::function< unsigned(AffineForOp)> &getUnrollFactor=nullptr) |
Creates a loop unrolling pass with the provided parameters. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLoopUnrollAndJamPass (int unrollJamFactor=-1) |
Creates a loop unroll jam pass to unroll jam by the specified factor. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createPipelineDataTransferPass () |
Creates a pass to pipeline explicit movement of data across levels of the memory hierarchy. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createSuperVectorizePass (ArrayRef< int64_t > virtualVectorSize) |
Creates a pass to vectorize loops, operations and data types using a target-independent, n-D super-vector abstraction. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createSuperVectorizePass () |
Overload relying on pass options for initialization. More... | |
LogicalResult | affineParallelize (AffineForOp forOp, ArrayRef< LoopReduction > parallelReductions={}) |
Replaces a parallel affine.for op with a 1-d affine.parallel op. More... | |
LogicalResult | hoistAffineIfOp (AffineIfOp ifOp, bool *folded=nullptr) |
Hoists out affine.if/else to as high as possible, i.e., past all invariant affine.fors/parallel's. More... | |
void | affineScalarReplace (func::FuncOp f, DominanceInfo &domInfo, PostDominanceInfo &postDomInfo) |
Replace affine store and load accesses by scalars by forwarding stores to loads and eliminate invariant affine loads; consequently, eliminate dead allocs. More... | |
void | vectorizeAffineLoops (Operation *parentOp, llvm::DenseSet< Operation *, DenseMapInfo< Operation *>> &loops, ArrayRef< int64_t > vectorSizes, ArrayRef< int64_t > fastestVaryingPattern, const ReductionLoopMap &reductionLoops=ReductionLoopMap()) |
Vectorizes affine loops in 'loops' using the n-D vectorization factors in 'vectorSizes'. More... | |
LogicalResult | vectorizeAffineLoopNest (std::vector< SmallVector< AffineForOp, 2 >> &loops, const VectorizationStrategy &strategy) |
External utility to vectorize affine loops from a single loop nest using an n-D vectorization strategy (see doc in VectorizationStrategy definition). More... | |
void | normalizeAffineParallel (AffineParallelOp op) |
Normalize a affine.parallel op so that lower bounds are 0 and steps are 1. More... | |
LogicalResult | normalizeAffineFor (AffineForOp op) |
Normalize an affine.for op. More... | |
AffineExpr | substWithMin (AffineExpr e, AffineExpr dim, AffineExpr min, AffineExpr max, bool positivePath=true) |
Traverse e and return an AffineExpr where all occurrences of dim have been replaced by either: More... | |
LogicalResult | replaceAllMemRefUsesWith (Value oldMemRef, Value newMemRef, ArrayRef< Value > extraIndices={}, AffineMap indexRemap=AffineMap(), ArrayRef< Value > extraOperands={}, ArrayRef< Value > symbolOperands={}, Operation *domOpFilter=nullptr, Operation *postDomOpFilter=nullptr, bool allowNonDereferencingOps=false, bool replaceInDeallocOp=false) |
Replaces all "dereferencing" uses of oldMemRef with newMemRef while optionally remapping the old memref's indices using the supplied affine map, indexRemap . More... | |
LogicalResult | replaceAllMemRefUsesWith (Value oldMemRef, Value newMemRef, Operation *op, ArrayRef< Value > extraIndices={}, AffineMap indexRemap=AffineMap(), ArrayRef< Value > extraOperands={}, ArrayRef< Value > symbolOperands={}, bool allowNonDereferencingOps=false) |
Performs the same replacement as the other version above but only for the dereferencing uses of oldMemRef in op , except in cases where 'allowNonDereferencingOps' is set to true where we replace the non-dereferencing uses as well. More... | |
LogicalResult | normalizeMemRef (memref::AllocOp *op) |
Rewrites the memref defined by this alloc op to have an identity layout map and updates all its indexing uses. More... | |
MemRefType | normalizeMemRefType (MemRefType memrefType, OpBuilder builder, unsigned numSymbolicOperands) |
Uses the old memref type map layout and computes the new memref type to have a new shape and a layout map, where the old layout map has been normalized to an identity layout map. More... | |
Operation * | createComposedAffineApplyOp (OpBuilder &builder, Location loc, ArrayRef< Value > operands, ArrayRef< Operation *> affineApplyOps, SmallVectorImpl< Value > *results) |
Creates and inserts into 'builder' a new AffineApplyOp, with the number of its results equal to the number of operands, as a composition of all other AffineApplyOps reachable from input parameter 'operands'. More... | |
void | createAffineComputationSlice (Operation *opInst, SmallVectorImpl< AffineApplyOp > *sliceOps) |
Given an operation, inserts one or more single result affine apply operations, results of which are exclusively used by this operation. More... | |
Value | expandAffineExpr (OpBuilder &builder, Location loc, AffineExpr expr, ValueRange dimValues, ValueRange symbolValues) |
Emit code that computes the given affine expression using standard arithmetic operations applied to the provided dimension and symbol values. More... | |
Optional< SmallVector< Value, 8 > > | expandAffineMap (OpBuilder &builder, Location loc, AffineMap affineMap, ValueRange operands) |
Create a sequence of operations that implement the affineMap applied to the given operands (as it it were an AffineApplyOp). More... | |
void | populateAMXLegalizeForLLVMExportPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect a set of patterns to lower AMX ops to ops that map to LLVM intrinsics. More... | |
void | configureAMXLegalizeForExportTarget (LLVMConversionTarget &target) |
Configure the target to support lowering AMX ops to ops that map to LLVM intrinsics. More... | |
detail::op_matcher< arith::ConstantIndexOp > | matchConstantIndex () |
Matches a ConstantIndexOp. More... | |
void | canonicalizeSubViewPart (SmallVectorImpl< OpFoldResult > &values, function_ref< bool(int64_t)> isDynamic) |
Detects the values produced by a ConstantIndexOp and places the new constant in place of the corresponding sentinel value. More... | |
llvm::SmallBitVector | getPositionsOfShapeOne (unsigned rank, ArrayRef< int64_t > shape) |
Value | getValueOrCreateConstantIndexOp (OpBuilder &b, Location loc, OpFoldResult ofr) |
Converts an OpFoldResult to a Value. More... | |
Value | getValueOrCreateCastToIndexLike (OpBuilder &b, Location loc, Type targetType, Value value) |
Create a cast from an index-like value (index or integer) to another index-like value. More... | |
SmallVector< Value > | getValueOrCreateConstantIndexOp (OpBuilder &b, Location loc, ArrayRef< OpFoldResult > valueOrAttrVec) |
Similar to the other overload, but converts multiple OpFoldResults into Values. More... | |
void | populateArmSVELegalizeForLLVMExportPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect a set of patterns to lower ArmSVE ops to ops that map to LLVM intrinsics. More... | |
void | configureArmSVELegalizeForExportTarget (LLVMConversionTarget &target) |
Configure the target to support lowering ArmSVE ops to ops that map to LLVM intrinsics. More... | |
std::unique_ptr< Pass > | createAsyncParallelForPass () |
std::unique_ptr< Pass > | createAsyncParallelForPass (bool asyncDispatch, int32_t numWorkerThreads, int32_t minTaskSize) |
std::unique_ptr< OperationPass< ModuleOp > > | createAsyncToAsyncRuntimePass () |
std::unique_ptr< Pass > | createAsyncRuntimeRefCountingPass () |
std::unique_ptr< Pass > | createAsyncRuntimeRefCountingOptPass () |
std::unique_ptr< Pass > | createAsyncRuntimePolicyBasedRefCountingPass () |
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref<ElementValueT(ElementValueT, ElementValueT)>> | |
Attribute | constFoldBinaryOp (ArrayRef< Attribute > operands, const CalculationT &calculate) |
Performs constant folding calculate with element-wise behavior on the two attributes in operands and returns the result if possible. More... | |
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref<ElementValueT(ElementValueT)>> | |
Attribute | constFoldUnaryOp (ArrayRef< Attribute > operands, const CalculationT &&calculate) |
Performs constant folding calculate with element-wise behavior on the one attributes in operands and returns the result if possible. More... | |
template<class AttrElementT , class TargetAttrElementT , class ElementValueT = typename AttrElementT::ValueType, class TargetElementValueT = typename TargetAttrElementT::ValueType, class CalculationT = function_ref<TargetElementValueT(ElementValueT, bool)>> | |
Attribute | constFoldCastOp (ArrayRef< Attribute > operands, Type resType, const CalculationT &calculate) |
void | populateDecomposeCallGraphTypesPatterns (MLIRContext *context, TypeConverter &typeConverter, ValueDecomposer &decomposer, RewritePatternSet &patterns) |
Populates the patterns needed to drive the conversion process for decomposing call graph types with the given ValueDecomposer . More... | |
void | populateCallOpTypeConversionPattern (RewritePatternSet &patterns, TypeConverter &converter) |
Add a pattern to the given pattern list to convert the operand and result types of a CallOp with the given type converter. More... | |
void | populateBranchOpInterfaceTypeConversionPattern (RewritePatternSet &patterns, TypeConverter &converter, function_ref< bool(BranchOpInterface branchOp, int idx)> shouldConvertBranchOperand=nullptr) |
Add a pattern to the given pattern list to rewrite branch operations to use operands that have been legalized by the conversion framework. More... | |
bool | isLegalForBranchOpInterfaceTypeConversionPattern (Operation *op, TypeConverter &converter) |
Return true if op is a BranchOpInterface op whose operands are all legal according to converter. More... | |
void | populateReturnOpTypeConversionPattern (RewritePatternSet &patterns, TypeConverter &converter) |
Add a pattern to the given pattern list to rewrite return ops to use operands that have been legalized by the conversion framework. More... | |
bool | isLegalForReturnOpTypeConversionPattern (Operation *op, TypeConverter &converter, bool returnOpAlwaysLegal=false) |
For ReturnLike ops (except return ), return True. More... | |
bool | isNotBranchOpInterfaceOrReturnLikeOp (Operation *op) |
Return true if op is neither BranchOpInterface nor ReturnLike. More... | |
void | promoteToWorkgroupMemory (gpu::GPUFuncOp op, unsigned arg) |
Promotes a function argument to workgroup memory in the given function. More... | |
void | greedilyMapParallelSCFToGPU (Region ®ion) |
Maps the parallel loops found in the given function to workgroups. More... | |
std::unique_ptr< Pass > | createGpuLauchSinkIndexComputationsPass () |
Pass that moves ops which are likely an index computation into gpu.launch body. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createGpuKernelOutliningPass (StringRef dataLayoutStr=StringRef()) |
Replaces gpu.launch with gpu.launch_func by moving the region into a separate kernel function. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createGpuAsyncRegionPass () |
Rewrites a function region so that GPU ops execute asynchronously. More... | |
void | populateGpuAllReducePatterns (RewritePatternSet &patterns) |
Collect a set of patterns to rewrite all-reduce ops within the GPU dialect. More... | |
void | populateGpuRewritePatterns (RewritePatternSet &patterns) |
Collect all patterns to rewrite ops within the GPU dialect. More... | |
void | registerGpuSerializeToCubinPass () |
Register pass to serialize GPU kernel functions to a CUBIN binary annotation. More... | |
void | registerGpuSerializeToHsacoPass () |
Register pass to serialize GPU kernel functions to a HSAco binary annotation. More... | |
std::unique_ptr< Pass > | createGpuSerializeToHsacoPass (StringRef triple, StringRef arch, StringRef features, int optLevel) |
Create an instance of the GPU kernel function to HSAco binary serialization pass. More... | |
gpu::GPUFuncOp | outlineKernelFunc (gpu::LaunchOp launchOp, StringRef kernelFnName, SmallVectorImpl< Value > &operands) |
Get a gpu.func created from outlining the region of a gpu.launch op with the given kernelFnName . More... | |
LogicalResult | sinkOperationsIntoLaunchOp (gpu::LaunchOp launchOp, llvm::function_ref< bool(Operation *)> isSinkingBeneficiary) |
Sink operations into the launchOp to reduce the number of values that are used within the region of the operation, but defined outside of the region. More... | |
std::unique_ptr< Pass > | createConvertElementwiseToLinalgPass () |
std::unique_ptr< Pass > | createLinalgFoldUnitExtentDimsPass () |
std::unique_ptr< Pass > | createLinalgElementwiseOpFusionPass () |
std::unique_ptr< Pass > | createFoldReshapeOpsByLinearizationPass () |
std::unique_ptr< Pass > | createLinalgNamedOpConversionPass () |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgTilingPass (ArrayRef< int64_t > tileSizes={}, linalg::LinalgTilingLoopType loopType=linalg::LinalgTilingLoopType::Loops) |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgPromotionPass (bool dynamicBuffers, bool useAlloca) |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgPromotionPass () |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgInlineScalarOperandsPass () |
std::unique_ptr< OperationPass< func::FuncOp > > | createConvertLinalgToLoopsPass () |
Create a pass to convert Linalg operations to scf.for loops and memref.load/memref.store accesses. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createConvertLinalgToParallelLoopsPass () |
Create a pass to convert Linalg operations to scf.parallel loops and memref.load/memref.store accesses. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createConvertLinalgToAffineLoopsPass () |
Create a pass to convert Linalg operations to affine.for loops and affine_load/affine_store accesses. More... | |
std::unique_ptr< Pass > | createLinalgInitTensorToAllocTensorPass () |
Create a pass that rewrites init_tensor to alloc_tensor. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgBufferizePass () |
Create a pass to convert Linalg operations which work on tensors to use buffers instead. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgGeneralizationPass () |
Create a pass to convert named Linalg operations to Linalg generic operations. More... | |
std::unique_ptr< Pass > | createLinalgDetensorizePass () |
Create a pass to convert Linalg operations to equivalent operations that work on primitive types, if possible. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyTileAndFusePass (StringRef opName="", const linalg::LinalgTilingAndFusionOptions &opt={}, const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Linalg strategy passes. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyTilePass (StringRef opName="", const linalg::LinalgTilingOptions &opt=linalg::LinalgTilingOptions(), const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Create a LinalgStrategyTilePass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyPadPass (StringRef opName="", const linalg::LinalgPaddingOptions &opt=linalg::LinalgPaddingOptions(), const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Create a LinalgStrategyPadPass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyPromotePass (StringRef opName="", const linalg::LinalgPromotionOptions &opt=linalg::LinalgPromotionOptions(), const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Create a LinalgStrategyPromotePass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyGeneralizePass (StringRef opName="", const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Create a LinalgStrategyGeneralizePass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyDecomposePass (const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Create a LinalgStrategyDecomposePass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyInterchangePass (ArrayRef< int64_t > iteratorInterchange={}, const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Create a LinalgStrategyInterchangePass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyVectorizePass (StringRef opName="", linalg::LinalgVectorizationOptions opt=linalg::LinalgVectorizationOptions(), const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter(), bool padVectorize=false) |
Create a LinalgStrategyVectorizePass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyEnablePass (linalg::LinalgEnablingOptions opt=linalg::LinalgEnablingOptions(), const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Create a LinalgStrategyEnablePass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyLowerVectorsPass (linalg::LinalgVectorLoweringOptions opt=linalg::LinalgVectorLoweringOptions(), const linalg::LinalgTransformationFilter &filter=linalg::LinalgTransformationFilter()) |
Create a LinalgStrategyLowerVectorsPass. More... | |
std::unique_ptr< OperationPass< func::FuncOp > > | createLinalgStrategyRemoveMarkersPass () |
Create a LinalgStrategyRemoveMarkersPass. More... | |
void | populateExpandTanhPattern (RewritePatternSet &patterns) |
void | populateMathAlgebraicSimplificationPatterns (RewritePatternSet &patterns) |
void | populateMathPolynomialApproximationPatterns (RewritePatternSet &patterns, const MathPolynomialApproximationOptions &options={}) |
raw_ostream & | operator<< (raw_ostream &os, const Range &range) |
SmallVector< Range, 8 > | getOrCreateRanges (OffsetSizeAndStrideOpInterface op, OpBuilder &b, Location loc) |
Return the list of Range (i.e. More... | |
std::unique_ptr< Pass > | createSCFBufferizePass () |
Creates a pass that bufferizes the SCF dialect. More... | |
std::unique_ptr< Pass > | createForLoopSpecializationPass () |
Creates a pass that specializes for loop for unrolling and vectorization. More... | |
std::unique_ptr< Pass > | createForLoopPeelingPass () |
Creates a pass that peels for loops at their upper bounds for better vectorization. More... | |
std::unique_ptr< Pass > | createSCFForLoopCanonicalizationPass () |
Creates a pass that canonicalizes affine.min and affine.max operations inside of scf.for loops with known lower and upper bounds. More... | |
std::unique_ptr< Pass > | createParallelLoopCollapsingPass () |
Creates a pass that transforms a single ParallelLoop over N induction variables into another ParallelLoop over less than N induction variables. More... | |
std::unique_ptr< Pass > | createParallelLoopFusionPass () |
Creates a loop fusion pass which fuses parallel loops. More... | |
std::unique_ptr< Pass > | createParallelLoopSpecializationPass () |
Creates a pass that specializes parallel loop for unrolling and vectorization. More... | |
std::unique_ptr< Pass > | createParallelLoopTilingPass (llvm::ArrayRef< int64_t > tileSize={}, bool noMinMaxBounds=false) |
Creates a pass which tiles innermost parallel loops. More... | |
std::unique_ptr< Pass > | createForLoopRangeFoldingPass () |
Creates a pass which folds arith ops on induction variable into loop range. More... | |
std::unique_ptr< Pass > | createForToWhileLoopPass () |
scf::ForOp | replaceLoopWithNewYields (OpBuilder &builder, scf::ForOp loop, ValueRange newIterOperands, const NewYieldValueFn &newYieldValuesFn) |
FailureOr< func::FuncOp > | outlineSingleBlockRegion (RewriterBase &rewriter, Location loc, Region ®ion, StringRef funcName) |
Outline a region with a single block into a new FuncOp. More... | |
LogicalResult | outlineIfOp (RewriterBase &b, scf::IfOp ifOp, func::FuncOp *thenFn, StringRef thenFnName, func::FuncOp *elseFn, StringRef elseFnName) |
Outline the then and/or else regions of ifOp as follows: More... | |
bool | getInnermostParallelLoops (Operation *rootOp, SmallVectorImpl< scf::ParallelOp > &result) |
Get a list of innermost parallel loops contained in rootOp . More... | |
Optional< std::pair< AffineExpr, AffineExpr > > | getSCFMinMaxExpr (Value value, SmallVectorImpl< Value > &dims, SmallVectorImpl< Value > &symbols, llvm::function_ref< bool(Operation *)> loopFilter=nullptr) |
Return the min/max expressions for value if it is an induction variable from scf.for or scf.parallel loop. More... | |
void | coalesceLoops (MutableArrayRef< scf::ForOp > loops) |
Replace a perfect nest of "for" loops with a single linearized loop. More... | |
void | collapseParallelLoops (scf::ParallelOp loops, ArrayRef< std::vector< unsigned >> combinedDimensions) |
Take the ParallelLoop and for each set of dimension indices, combine them into a single dimension. More... | |
LogicalResult | promoteIfSingleIteration (scf::ForOp forOp) |
Promotes the loop body of a scf::ForOp to its containing block if the loop was known to have a single iteration. More... | |
LogicalResult | loopUnrollByFactor (scf::ForOp forOp, uint64_t unrollFactor, function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn=nullptr) |
Unrolls this for operation by the specified unroll factor. More... | |
TileLoops | extractFixedOuterLoops (scf::ForOp rootFOrOp, ArrayRef< int64_t > sizes) |
SmallVector< Loops, 8 > | tile (ArrayRef< scf::ForOp > forOps, ArrayRef< Value > sizes, ArrayRef< scf::ForOp > targets) |
Performs tiling fo imperfectly nested loops (with interchange) by strip-mining the forOps by sizes and sinking them, in their order of occurrence in forOps , under each of the targets . More... | |
Loops | tile (ArrayRef< scf::ForOp > forOps, ArrayRef< Value > sizes, scf::ForOp target) |
Performs tiling (with interchange) by strip-mining the forOps by sizes and sinking them, in their order of occurrence in forOps , under target . More... | |
Loops | tilePerfectlyNested (scf::ForOp rootForOp, ArrayRef< Value > sizes) |
Tile a nest of scf::ForOp loops rooted at rootForOp with the given (parametric) sizes. More... | |
void | getPerfectlyNestedLoops (SmallVectorImpl< scf::ForOp > &nestedLoops, scf::ForOp root) |
Get perfectly nested sequence of loops starting at root of loop nest (the first op being another AffineFor, and the second op - a terminator). More... | |
std::unique_ptr< Pass > | createShapeToShapeLowering () |
Creates an instance of the ShapeToShapeLowering pass that legalizes Shape dialect to be convertible to Arithmetic. More... | |
void | populateShapeRewritePatterns (RewritePatternSet &patterns) |
Collects a set of patterns to rewrite ops within the Shape dialect. More... | |
void | populateRemoveShapeConstraintsPatterns (RewritePatternSet &patterns) |
std::unique_ptr< OperationPass< func::FuncOp > > | createRemoveShapeConstraintsPass () |
std::unique_ptr< OperationPass< func::FuncOp > > | createShapeBufferizePass () |
SparseParallelizationStrategy | sparseParallelizationStrategy (int32_t flag) |
Converts command-line parallelization flag to the strategy enum. More... | |
SparseVectorizationStrategy | sparseVectorizationStrategy (int32_t flag) |
Converts command-line vectorization flag to the strategy enum. More... | |
void | populateSparsificationPatterns (RewritePatternSet &patterns, const SparsificationOptions &options=SparsificationOptions()) |
Sets up sparsification rewriting rules with the given options. More... | |
std::unique_ptr< Pass > | createSparsificationPass () |
std::unique_ptr< Pass > | createSparsificationPass (const SparsificationOptions &options) |
SparseToSparseConversionStrategy | sparseToSparseConversionStrategy (int32_t flag) |
Converts command-line sparse2sparse flag to the strategy enum. More... | |
void | populateSparseTensorConversionPatterns (TypeConverter &typeConverter, RewritePatternSet &patterns, const SparseTensorConversionOptions &options=SparseTensorConversionOptions()) |
Sets up sparse tensor conversion rules. More... | |
std::unique_ptr< Pass > | createSparseTensorConversionPass () |
std::unique_ptr< Pass > | createSparseTensorConversionPass (const SparseTensorConversionOptions &options) |
template<typename EnumClass , typename ParserType > | |
static ParseResult | parseEnumKeywordAttr (EnumClass &value, ParserType &parser, StringRef attrName=spirv::attributeName< EnumClass >()) |
Parses the next keyword in parser as an enumerant of the given EnumClass . More... | |
void | populateBuiltinFuncToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) |
Appends to a pattern list additional patterns for translating the builtin func op to the SPIR-V dialect. More... | |
std::unique_ptr< Pass > | createTensorBufferizePass () |
Creates an instance of tensor dialect bufferization pass. More... | |
int64_t | linearize (ArrayRef< int64_t > offsets, ArrayRef< int64_t > basis) |
Computes and returns the linearized index of 'offsets' w.r.t. 'basis'. More... | |
SmallVector< int64_t, 4 > | delinearize (ArrayRef< int64_t > strides, int64_t linearIndex) |
Given the strides together with a linear index in the dimension space, returns the vector-space offsets in each dimension for a de-linearized index. More... | |
template<typename T , unsigned N> | |
void | applyPermutationToVector (SmallVector< T, N > &inVec, ArrayRef< int64_t > permutation) |
Apply the permutation defined by permutation to inVec . More... | |
SmallVector< int64_t, 4 > | getI64SubArray (ArrayAttr arrayAttr, unsigned dropFront=0, unsigned dropBack=0) |
Helper that returns a subset of arrayAttr as a vector of int64_t. More... | |
constexpr StringRef | getReassociationAttrName () |
Attribute name for the ArrayAttr which encodes reassociation indices. More... | |
Optional< SmallVector< ReassociationIndices > > | composeReassociationIndices (ArrayRef< ReassociationIndices > producerReassociations, ArrayRef< ReassociationIndices > consumerReassociations, MLIRContext *context) |
Compose reassociation maps that are used in pair of reshape ops where one is a producer and other is the consumer. More... | |
SmallVector< SmallVector< AffineExpr, 2 >, 2 > | convertReassociationIndicesToExprs (MLIRContext *context, ArrayRef< ReassociationIndices > reassociationIndices) |
Convert reassociation indices to affine expressions. More... | |
SmallVector< AffineMap, 4 > | getSymbolLessAffineMaps (ArrayRef< ReassociationExprs > reassociation) |
Constructs affine maps out of Array<Array<AffineExpr>>. More... | |
ArrayAttr | getReassociationIndicesAttribute (OpBuilder &b, ArrayRef< ReassociationIndices > reassociation) |
Wraps a list of reassociations in an ArrayAttr. More... | |
SmallVector< ReassociationIndices, 2 > | convertReassociationMapsToIndices (OpBuilder &b, ArrayRef< ReassociationExprs > reassociationExprs) |
Convert Array<Array<AffineExpr>> to Array<Array<int64_t>>. More... | |
Optional< SmallVector< ReassociationIndices > > | getReassociationIndicesForReshape (ShapedType sourceType, ShapedType targetType) |
Return the reassociations maps to use to reshape given the source type and the target type when possible. More... | |
Optional< SmallVector< ReassociationIndices > > | getReassociationIndicesForCollapse (ArrayRef< int64_t > sourceShape, ArrayRef< int64_t > targetShape) |
Returns the reassociation maps to collapse sourceShape to targetShape if possible. More... | |
bool | isReassociationValid (ArrayRef< AffineMap > reassociation, int *invalidIndex=nullptr) |
Return true if the reassociation specification is valid, false otherwise. More... | |
template<typename ReshapeOpTy , typename InverseReshapeOpTy > | |
static OpFoldResult | foldReshapeOp (ReshapeOpTy reshapeOp, ArrayRef< Attribute > operands) |
template<typename Op , typename T > | |
static LogicalResult | verifyReshapeLikeTypes (Op op, T expandedType, T collapsedType, bool isExpansion) |
Common verifier for reshape-like types. More... | |
LogicalResult | reshapeLikeShapesAreCompatible (function_ref< LogicalResult(const Twine &)> emitError, ArrayRef< int64_t > collapsedShape, ArrayRef< int64_t > expandedShape, ArrayRef< ReassociationIndices > reassociationMaps, bool isExpandingReshape) |
Verify that shapes of the reshaped types using following rules 1) if a dimension in the collapsed type is static, then the corresponding dimensions in the expanded shape should be a) static b) the product should be same as the collaped shape. More... | |
template<typename OpTy > | |
static LogicalResult | verifyReshapeLikeShapes (OpTy op, ShapedType collapsedType, ShapedType expandedType, bool isExpandingReshape) |
bool | hasNonIdentityLayout (Type type) |
Returns true iff the type is a MemRefType and has a non-identity layout. More... | |
void | dispatchIndexOpFoldResult (OpFoldResult ofr, SmallVectorImpl< Value > &dynamicVec, SmallVectorImpl< int64_t > &staticVec, int64_t sentinel) |
Helper function to dispatch an OpFoldResult into staticVec if: a) it is an IntegerAttr In other cases, the OpFoldResult is dispached to the dynamicVec . More... | |
void | dispatchIndexOpFoldResults (ArrayRef< OpFoldResult > ofrs, SmallVectorImpl< Value > &dynamicVec, SmallVectorImpl< int64_t > &staticVec, int64_t sentinel) |
Helper function to dispatch multiple OpFoldResults according to the behavior of dispatchIndexOpFoldResult(OpFoldResult ofr for a single OpFoldResult. More... | |
SmallVector< int64_t, 4 > | extractFromI64ArrayAttr (Attribute attr) |
Extract int64_t values from the assumed ArrayAttr of IntegerAttr. More... | |
OpFoldResult | getAsOpFoldResult (Value val) |
Given a value, try to extract a constant Attribute. More... | |
SmallVector< OpFoldResult > | getAsOpFoldResult (ArrayRef< Value > values) |
Given an array of values, try to extract a constant Attribute from each value. More... | |
Optional< int64_t > | getConstantIntValue (OpFoldResult ofr) |
If ofr is a constant integer or an IntegerAttr, return the integer. More... | |
bool | isConstantIntValue (OpFoldResult ofr, int64_t value) |
Return true if ofr is constant integer equal to value . More... | |
bool | isEqualConstantIntOrValue (OpFoldResult ofr1, OpFoldResult ofr2) |
Return true if ofr1 and ofr2 are the same integer constant attribute values or the same SSA value. More... | |
bool | isRowMajorMatmul (ArrayAttr indexingMaps) |
Tests whether the given maps describe a row major matmul. More... | |
bool | isColumnMajorMatmul (ArrayAttr indexingMaps) |
Tests whether the given maps describe a column major matmul. More... | |
bool | isRowMajorBatchMatmul (ArrayAttr indexingMaps) |
Tests whether the given maps describe a row major batch matmul. More... | |
constexpr StringRef | getIndexingMapsAttrName () |
Attribute name for the AffineArrayAttr which encodes the relationship between a structured op iterators' and its operands. More... | |
constexpr StringRef | getIteratorTypesAttrName () |
Attribute name for the StrArrayAttr which encodes the type of a structured op's iterators. More... | |
constexpr StringRef | getDistributionTypesAttrName () |
Attribute name for the StrArrayAttr which encodes the distribution type for linalg.tiled_loop . More... | |
constexpr StringRef | getDocAttrName () |
Attribute name for the StringAttr which encodes an optional documentation string of the structured op. More... | |
constexpr StringRef | getLibraryCallAttrName () |
Attribute name for the StrArrayAttr which encodes the external library function that implements the structured op. More... | |
constexpr StringRef | getStridesAttrName () |
Attribute name for the StrArrayAttr which encodes the value of strides. More... | |
constexpr StringRef | getDilationsAttrName () |
Attribute name for the StrArrayAttr which encodes the value of dilations. More... | |
constexpr StringRef | getPaddingAttrName () |
Attribute name for the StrArrayAttr which encodes the value of paddings. More... | |
constexpr StringRef | getParallelIteratorTypeName () |
Use to encode that a particular iterator type has parallel semantics. More... | |
bool | isParallelIterator (Attribute attr) |
constexpr StringRef | getReductionIteratorTypeName () |
Use to encode that a particular iterator type has reduction semantics. More... | |
bool | isReductionIterator (Attribute attr) |
constexpr StringRef | getWindowIteratorTypeName () |
Use to encode that a particular iterator type has window semantics. More... | |
bool | isWindowIterator (Attribute attr) |
ArrayRef< StringRef > | getAllIteratorTypeNames () |
Use to encode that a particular iterator type has window semantics. More... | |
unsigned | getNumIterators (StringRef name, ArrayAttr iteratorTypes) |
Returns the iterator of a certain type. More... | |
unsigned | getNumIterators (ArrayAttr iteratorTypes) |
StringRef | toString (IteratorType t) |
int64_t | computeMaxLinearIndex (ArrayRef< int64_t > basis) |
Return the number of elements of basis, 0 if empty. More... | |
SmallVector< int64_t, 4 > | computeStrides (ArrayRef< int64_t > shape, ArrayRef< int64_t > sizes) |
Given the shape and sizes of a vector, returns the corresponding strides for each dimension. More... | |
SmallVector< int64_t, 4 > | computeElementOffsetsFromVectorSliceOffsets (ArrayRef< int64_t > sizes, ArrayRef< int64_t > vectorOffsets) |
Given the target sizes of a vector, together with vector-space offsets, returns the element-space offsets for each dimension. More... | |
Optional< SmallVector< int64_t, 4 > > | shapeRatio (ArrayRef< int64_t > superShape, ArrayRef< int64_t > subShape) |
Computes and returns the multi-dimensional ratio of superShape to subShape . More... | |
Optional< SmallVector< int64_t, 4 > > | shapeRatio (VectorType superVectorType, VectorType subVectorType) |
Computes and returns the multi-dimensional ratio of the shapes of superVector to subVector . More... | |
void | populateX86VectorLegalizeForLLVMExportPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Collect a set of patterns to lower X86Vector ops to ops that map to LLVM intrinsics. More... | |
void | configureX86VectorLegalizeForExportTarget (LLVMConversionTarget &target) |
Configure the target to support lowering X86Vector ops to ops that map to LLVM intrinsics. More... | |
int | JitRunnerMain (int argc, char **argv, const DialectRegistry ®istry, JitRunnerConfig config={}) |
Entry point for all CPU runners. More... | |
void | registerAllDialects (DialectRegistry ®istry) |
Add all the MLIR dialects to the provided registry. More... | |
void | registerAllDialects (MLIRContext &context) |
Append all the MLIR dialects to the registry contained in the given context. More... | |
void | registerAllPasses () |
void | registerFromLLVMIRTranslation () |
void | registerFromSPIRVTranslation () |
void | registerToCppTranslation () |
void | registerToLLVMIRTranslation () |
void | registerToSPIRVTranslation () |
void | registerAllTranslations () |
bool | insideMutuallyExclusiveRegions (Operation *a, Operation *b) |
Return true if a and b are in mutually exclusive regions as per RegionBranchOpInterface. More... | |
Region * | getEnclosingRepetitiveRegion (Operation *op) |
Return the first enclosing region of the given op that may be executed repetitively as per RegionBranchOpInterface or nullptr if no such region exists. More... | |
Region * | getEnclosingRepetitiveRegion (Value value) |
Return the first enclosing region of the given Value that may be executed repetitively as per RegionBranchOpInterface or nullptr if no such region exists. More... | |
bool | isRegionReturnLike (Operation *operation) |
Returns true if the given operation is either annotated with the ReturnLike trait or implements the RegionBranchTerminatorOpInterface . More... | |
Optional< MutableOperandRange > | getMutableRegionBranchSuccessorOperands (Operation *operation, Optional< unsigned > regionIndex) |
Returns the mutable operands that are passed to the region with the given regionIndex . More... | |
Optional< OperandRange > | getRegionBranchSuccessorOperands (Operation *operation, Optional< unsigned > regionIndex) |
Returns the read only operands that are passed to the region with the given regionIndex . More... | |
template<typename EffectTy > | |
bool | hasSingleEffect (Operation *op, Value value) |
Returns true if this operation only has the given effect on value . More... | |
bool | isOpTriviallyDead (Operation *op) |
Return true if the given operation is unused, and has no side effects on memory that prevent erasing. More... | |
bool | wouldOpBeTriviallyDead (Operation *op) |
Return true if the given operation would be dead if unused, and has no side effects on memory that would prevent erasing. More... | |
SmallVector< OpFoldResult, 4 > | getMixedOffsets (OffsetSizeAndStrideOpInterface op, ArrayAttr staticOffsets, ValueRange offsets) |
Return a vector of all the static or dynamic offsets of the op from provided external static and dynamic offsets. More... | |
SmallVector< OpFoldResult, 4 > | getMixedSizes (OffsetSizeAndStrideOpInterface op, ArrayAttr staticSizes, ValueRange sizes) |
Return a vector of all the static or dynamic sizes of the op from provided external static and dynamic sizes. More... | |
SmallVector< OpFoldResult, 4 > | getMixedStrides (OffsetSizeAndStrideOpInterface op, ArrayAttr staticStrides, ValueRange strides) |
Return a vector of all the static or dynamic strides of the op from provided external static and dynamic strides. More... | |
void | printOperandsOrIntegersOffsetsOrStridesList (OpAsmPrinter &printer, Operation *op, OperandRange values, ArrayAttr integers) |
Printer hook for custom directive in assemblyFormat. More... | |
void | printOperandsOrIntegersSizesList (OpAsmPrinter &printer, Operation *op, OperandRange values, ArrayAttr integers) |
Printer hook for custom directive in assemblyFormat. More... | |
ParseResult | parseOperandsOrIntegersOffsetsOrStridesList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &values, ArrayAttr &integers) |
Pasrer hook for custom directive in assemblyFormat. More... | |
ParseResult | parseOperandsOrIntegersSizesList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &values, ArrayAttr &integers) |
Pasrer hook for custom directive in assemblyFormat. More... | |
LogicalResult | verifyListOfOperandsOrIntegers (Operation *op, StringRef name, unsigned expectedNumElements, ArrayAttr attr, ValueRange values, llvm::function_ref< bool(int64_t)> isDynamic) |
Verify that a the values has as many elements as the number of entries in attr for which isDynamic evaluates to true. More... | |
inline ::llvm::hash_code | hash_value (AffineExpr arg) |
Make AffineExpr hashable. More... | |
AffineExpr | operator+ (int64_t val, AffineExpr expr) |
AffineExpr | operator* (int64_t val, AffineExpr expr) |
AffineExpr | operator- (int64_t val, AffineExpr expr) |
AffineExpr | getAffineDimExpr (unsigned position, MLIRContext *context) |
These free functions allow clients of the API to not use classes in detail. More... | |
AffineExpr | getAffineSymbolExpr (unsigned position, MLIRContext *context) |
AffineExpr | getAffineConstantExpr (int64_t constant, MLIRContext *context) |
AffineExpr | getAffineBinaryOpExpr (AffineExprKind kind, AffineExpr lhs, AffineExpr rhs) |
AffineExpr | getAffineExprFromFlatForm (ArrayRef< int64_t > flatExprs, unsigned numDims, unsigned numSymbols, ArrayRef< AffineExpr > localExprs, MLIRContext *context) |
Constructs an affine expression from a flat ArrayRef. More... | |
raw_ostream & | operator<< (raw_ostream &os, AffineExpr expr) |
AffineExpr | simplifyAffineExpr (AffineExpr expr, unsigned numDims, unsigned numSymbols) |
Simplify an affine expression by flattening and some amount of simple analysis. More... | |
template<typename... AffineExprTy> | |
void | bindDims (MLIRContext *ctx, AffineExprTy &...exprs) |
Bind a list of AffineExpr references to DimExpr at positions: [0 . More... | |
template<typename... AffineExprTy> | |
void | bindSymbols (MLIRContext *ctx, AffineExprTy &...exprs) |
Bind a list of AffineExpr references to SymbolExpr at positions: [0 . More... | |
inline ::llvm::hash_code | hash_value (AffineMap arg) |
AffineMap | simplifyAffineMap (AffineMap map) |
Simplifies an affine map by simplifying its underlying AffineExpr results. More... | |
AffineMap | compressUnusedDims (AffineMap map) |
Drop the dims that are not used. More... | |
SmallVector< AffineMap > | compressUnusedDims (ArrayRef< AffineMap > maps) |
Drop the dims that are not used by any of the individual maps in maps . More... | |
AffineMap | compressDims (AffineMap map, const llvm::SmallBitVector &unusedDims) |
Drop the dims that are not listed in unusedDims . More... | |
AffineMap | compressUnusedSymbols (AffineMap map) |
Drop the symbols that are not used. More... | |
SmallVector< AffineMap > | compressUnusedSymbols (ArrayRef< AffineMap > maps) |
Drop the symbols that are not used by any of the individual maps in maps . More... | |
AffineMap | compressSymbols (AffineMap map, const llvm::SmallBitVector &unusedSymbols) |
Drop the symbols that are not listed in unusedSymbols . More... | |
AffineMap | removeDuplicateExprs (AffineMap map) |
Returns a map with the same dimension and symbol count as map , but whose results are the unique affine expressions of map . More... | |
AffineMap | inversePermutation (AffineMap map) |
Returns a map of codomain to domain dimensions such that the first codomain dimension for a particular domain dimension is selected. More... | |
AffineMap | inverseAndBroadcastProjectedPermutation (AffineMap map) |
Return the reverse map of a projected permutation where the projected dimensions are transformed into 0s. More... | |
AffineMap | concatAffineMaps (ArrayRef< AffineMap > maps) |
Concatenates a list of maps into a single AffineMap, stepping over potentially empty maps. More... | |
AffineMap | getProjectedMap (AffineMap map, const llvm::SmallBitVector &projectedDimensions) |
Returns the map that results from projecting out the dimensions specified in projectedDimensions . More... | |
template<typename T > | |
SmallVector< T > | applyPermutationMap (AffineMap map, llvm::ArrayRef< T > source) |
Apply a permutation from map to source and return the result. More... | |
template<typename AffineExprContainer > | |
static void | getMaxDimAndSymbol (ArrayRef< AffineExprContainer > exprsList, int64_t &maxDim, int64_t &maxSym) |
Calculates maxmimum dimension and symbol positions from the expressions in exprsLists and stores them in maxDim and maxSym respectively. More... | |
raw_ostream & | operator<< (raw_ostream &os, AffineMap map) |
void | registerAsmPrinterCLOptions () |
Register a set of useful command-line options that can be used to configure various flags within the AsmPrinter. More... | |
raw_ostream & | operator<< (raw_ostream &os, Attribute attr) |
inline ::llvm::hash_code | hash_value (Attribute arg) |
inline ::llvm::hash_code | hash_value (const NamedAttribute &arg) |
bool | operator== (StringAttr lhs, std::nullptr_t) |
Define comparisons for StringAttr against nullptr and itself to avoid the StringRef overloads from being chosen when not desirable. More... | |
bool | operator!= (StringAttr lhs, std::nullptr_t) |
bool | operator== (StringAttr lhs, StringAttr rhs) |
bool | operator!= (StringAttr lhs, StringAttr rhs) |
bool | operator== (StringAttr lhs, StringRef rhs) |
Allow direct comparison with StringRef. More... | |
bool | operator!= (StringAttr lhs, StringRef rhs) |
bool | operator== (StringRef lhs, StringAttr rhs) |
bool | operator!= (StringRef lhs, StringAttr rhs) |
llvm::Optional< llvm::SmallDenseSet< unsigned > > | computeRankReductionMask (ArrayRef< int64_t > originalShape, ArrayRef< int64_t > reducedShape) |
Given an originalShape and a reducedShape assumed to be a subset of originalShape with some 1 entries erased, return the set of indices that specifies which of the entries of originalShape are dropped to obtain reducedShape . More... | |
SliceVerificationResult | isRankReducedType (ShapedType originalType, ShapedType candidateReducedType) |
Check if originalType can be rank reduced to candidateReducedType type by dropping some dimensions with static size 1 . More... | |
LogicalResult | getStridesAndOffset (MemRefType t, SmallVectorImpl< int64_t > &strides, int64_t &offset) |
Returns the strides of the MemRef if the layout map is in strided form. More... | |
LogicalResult | getStridesAndOffset (MemRefType t, SmallVectorImpl< AffineExpr > &strides, AffineExpr &offset) |
AffineMap | makeStridedLinearLayoutMap (ArrayRef< int64_t > strides, int64_t offset, MLIRContext *context) |
Given a list of strides (in which MemRefType::getDynamicStrideOrOffset() represents a dynamic value), return the single result AffineMap which represents the linearized strided layout map. More... | |
MemRefType | canonicalizeStridedLayout (MemRefType t) |
Return a version of t with identity layout if it can be determined statically that the layout is the canonical contiguous strided layout. More... | |
MemRefType | eraseStridedLayout (MemRefType t) |
Return a version of t with a layout that has all dynamic offset and strides. More... | |
AffineExpr | makeCanonicalStridedLayoutExpr (ArrayRef< int64_t > sizes, ArrayRef< AffineExpr > exprs, MLIRContext *context) |
Given MemRef sizes that are either static or dynamic, returns the canonical "contiguous" strides AffineExpr. More... | |
AffineExpr | makeCanonicalStridedLayoutExpr (ArrayRef< int64_t > sizes, MLIRContext *context) |
Return the result of makeCanonicalStrudedLayoutExpr for the common case where exprs is {d0, d1, .., d_(sizes.size()-1)}. More... | |
bool | isStrided (MemRefType t) |
Return true if the layout for t is compatible with strided semantics. More... | |
AffineMap | getStridedLinearLayoutMap (MemRefType t) |
Return the layout map in strided linear layout AffineMap form. More... | |
bool | isStaticShapeAndContiguousRowMajor (MemRefType memrefType) |
Helper determining if a memref is static-shape and contiguous-row-major layout, while still allowing for an arbitrary offset (any static or dynamic value). More... | |
raw_ostream & | operator<< (raw_ostream &os, const DiagnosticArgument &arg) |
raw_ostream & | operator<< (raw_ostream &os, const Diagnostic &diag) |
InFlightDiagnostic | emitError (Location loc) |
Utility method to emit an error message using this location. More... | |
InFlightDiagnostic | emitError (Location loc, const Twine &message) |
InFlightDiagnostic | emitWarning (Location loc) |
Utility method to emit a warning message using this location. More... | |
InFlightDiagnostic | emitWarning (Location loc, const Twine &message) |
InFlightDiagnostic | emitRemark (Location loc) |
Utility method to emit a remark message using this location. More... | |
InFlightDiagnostic | emitRemark (Location loc, const Twine &message) |
template<typename... Args> | |
LogicalResult | emitOptionalError (Optional< Location > loc, Args &&... args) |
Overloads of the above emission functions that take an optionally null location. More... | |
template<typename... Args> | |
LogicalResult | emitOptionalWarning (Optional< Location > loc, Args &&... args) |
template<typename... Args> | |
LogicalResult | emitOptionalRemark (Optional< Location > loc, Args &&... args) |
inline ::llvm::hash_code | hash_value (IntegerSet arg) |
raw_ostream & | operator<< (raw_ostream &os, const Location &loc) |
inline ::llvm::hash_code | hash_value (Location arg) |
detail::constant_op_matcher | m_Constant () |
Matches a constant foldable operation. More... | |
template<typename AttrT > | |
detail::constant_op_binder< AttrT > | m_Constant (AttrT *bind_value) |
Matches a value from a constant foldable operation and writes the value to bind_value. More... | |
detail::constant_float_predicate_matcher | m_AnyZeroFloat () |
Matches a constant scalar / vector splat / tensor splat float (both positive and negative) zero. More... | |
detail::constant_float_predicate_matcher | m_PosZeroFloat () |
Matches a constant scalar / vector splat / tensor splat float positive zero. More... | |
detail::constant_float_predicate_matcher | m_NegZeroFloat () |
Matches a constant scalar / vector splat / tensor splat float negative zero. More... | |
detail::constant_float_predicate_matcher | m_OneFloat () |
Matches a constant scalar / vector splat / tensor splat float ones. More... | |
detail::constant_float_predicate_matcher | m_PosInfFloat () |
Matches a constant scalar / vector splat / tensor splat float positive infinity. More... | |
detail::constant_float_predicate_matcher | m_NegInfFloat () |
Matches a constant scalar / vector splat / tensor splat float negative infinity. More... | |
detail::constant_int_predicate_matcher | m_Zero () |
Matches a constant scalar / vector splat / tensor splat integer zero. More... | |
detail::constant_int_predicate_matcher | m_NonZero () |
Matches a constant scalar / vector splat / tensor splat integer that is any non-zero value. More... | |
detail::constant_int_predicate_matcher | m_One () |
Matches a constant scalar / vector splat / tensor splat integer one. More... | |
template<typename OpClass > | |
detail::op_matcher< OpClass > | m_Op () |
Matches the given OpClass. More... | |
template<typename Pattern > | |
bool | matchPattern (Value value, const Pattern &pattern) |
Entry point for matching a pattern over a Value. More... | |
template<typename Pattern > | |
bool | matchPattern (Operation *op, const Pattern &pattern) |
Entry point for matching a pattern over an Operation. More... | |
detail::constant_float_op_binder | m_ConstantFloat (FloatAttr::ValueType *bind_value) |
Matches a constant holding a scalar/vector/tensor float (splat) and writes the float value to bind_value. More... | |
detail::constant_int_op_binder | m_ConstantInt (IntegerAttr::ValueType *bind_value) |
Matches a constant holding a scalar/vector/tensor integer (splat) and writes the integer value to bind_value. More... | |
template<typename OpType , typename... Matchers> | |
auto | m_Op (Matchers... matchers) |
void | registerMLIRContextCLOptions () |
Register a set of useful command-line options that can be used to configure various flags within the MLIRContext. More... | |
bool | operator== (OpState lhs, OpState rhs) |
bool | operator!= (OpState lhs, OpState rhs) |
raw_ostream & | operator<< (raw_ostream &os, OpFoldResult ofr) |
Allow printing to a stream. More... | |
raw_ostream & | operator<< (raw_ostream &os, OpState op) |
Allow printing to a stream. More... | |
raw_ostream & | operator<< (raw_ostream &os, const Operation &op) |
raw_ostream & | operator<< (raw_ostream &os, OperationName info) |
llvm::hash_code | hash_value (OperationName arg) |
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE () | |
Enable Bitmask enums for OperationEquivalence::Flags. More... | |
template<typename AsmPrinterT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, Type type) |
template<typename AsmPrinterT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, Attribute attr) |
template<typename AsmPrinterT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, const APFloat &value) |
template<typename AsmPrinterT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, float value) |
template<typename AsmPrinterT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, double value) |
template<typename AsmPrinterT , typename T , typename std::enable_if<!std::is_convertible< T &, Value &>::value &&!std::is_convertible< T &, Type &>::value &&!std::is_convertible< T &, Attribute &>::value &&!std::is_convertible< T &, ValueRange >::value &&!std::is_convertible< T &, APFloat &>::value &&!llvm::is_one_of< T, bool, float, double >::value, T >::type * = nullptr> | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, const T &other) |
template<typename AsmPrinterT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, bool value) |
template<typename AsmPrinterT , typename ValueRangeT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, const ValueTypeRange< ValueRangeT > &types) |
template<typename AsmPrinterT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, const TypeRange &types) |
template<typename AsmPrinterT , typename ElementT > | |
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > | operator<< (AsmPrinterT &p, ArrayRef< ElementT > types) |
OpAsmPrinter & | operator<< (OpAsmPrinter &p, Value value) |
template<typename T , typename std::enable_if< std::is_convertible< T &, ValueRange >::value &&!std::is_convertible< T &, Value &>::value, T >::type * = nullptr> | |
OpAsmPrinter & | operator<< (OpAsmPrinter &p, const T &values) |
OpAsmPrinter & | operator<< (OpAsmPrinter &p, Block *value) |
raw_ostream & | operator<< (raw_ostream &os, PDLValue value) |
raw_ostream & | operator<< (raw_ostream &os, PDLValue::Kind kind) |
raw_ostream & | operator<< (raw_ostream &os, SymbolTable::Visibility visibility) |
template<typename IteratorT , typename FuncT > | |
LogicalResult | failableParallelForEach (MLIRContext *context, IteratorT begin, IteratorT end, FuncT &&func) |
Invoke the given function on the elements between [begin, end) asynchronously. More... | |
template<typename RangeT , typename FuncT > | |
LogicalResult | failableParallelForEach (MLIRContext *context, RangeT &&range, FuncT &&func) |
Invoke the given function on the elements in the provided range asynchronously. More... | |
template<typename FuncT > | |
LogicalResult | failableParallelForEachN (MLIRContext *context, size_t begin, size_t end, FuncT &&func) |
Invoke the given function on the elements between [begin, end) asynchronously. More... | |
template<typename IteratorT , typename FuncT > | |
void | parallelForEach (MLIRContext *context, IteratorT begin, IteratorT end, FuncT &&func) |
Invoke the given function on the elements between [begin, end) asynchronously. More... | |
template<typename RangeT , typename FuncT > | |
void | parallelForEach (MLIRContext *context, RangeT &&range, FuncT &&func) |
Invoke the given function on the elements in the provided range asynchronously. More... | |
template<typename FuncT > | |
void | parallelForEachN (MLIRContext *context, size_t begin, size_t end, FuncT &&func) |
Invoke the given function on the elements between [begin, end) asynchronously. More... | |
inline ::llvm::hash_code | hash_value (TypeRange arg) |
Make TypeRange hashable. More... | |
raw_ostream & | operator<< (raw_ostream &os, const TypeRange &types) |
Emit a type range to the given output stream. More... | |
template<typename RangeT > | |
bool | operator== (ArrayRef< Type > lhs, const ValueTypeRange< RangeT > &rhs) |
raw_ostream & | operator<< (raw_ostream &os, Type type) |
inline ::llvm::hash_code | hash_value (Type arg) |
Type | getElementTypeOrSelf (Type type) |
Return the element type or return the type itself. More... | |
Type | getElementTypeOrSelf (Attribute attr) |
Return the element type or return the type itself. More... | |
Type | getElementTypeOrSelf (Value val) |
SmallVector< Type, 10 > | getFlattenedTypes (TupleType t) |
Get the types within a nested Tuple. More... | |
bool | isOpaqueTypeWithName (Type type, StringRef dialect, StringRef typeData) |
Return true if the specified type is an opaque type with the specified dialect and typeData. More... | |
LogicalResult | verifyCompatibleShape (ArrayRef< int64_t > shape1, ArrayRef< int64_t > shape2) |
Returns success if the given two shapes are compatible. More... | |
LogicalResult | verifyCompatibleShape (Type type1, Type type2) |
Returns success if the given two types have compatible shape. More... | |
LogicalResult | verifyCompatibleShapes (TypeRange types1, TypeRange types2) |
Returns success if the given two arrays have the same number of elements and each pair wise entries have compatible shape. More... | |
LogicalResult | verifyCompatibleShapes (TypeRange types) |
Returns success if all given types have compatible shapes. More... | |
LogicalResult | verifyCompatibleDims (ArrayRef< int64_t > dims) |
Dimensions are compatible if all non-dynamic dims are equal. More... | |
raw_ostream & | operator<< (raw_ostream &os, Value value) |
inline ::llvm::hash_code | hash_value (Value arg) |
Make Value hashable. More... | |
LogicalResult | verify (Operation *op, bool verifyRecursively=true) |
Perform (potentially expensive) checks of invariants, used to detect compiler bugs, on this operation and any nested operations. More... | |
LogicalResult | parseSourceFile (const llvm::SourceMgr &sourceMgr, Block *block, MLIRContext *context, LocationAttr *sourceFileLoc=nullptr, AsmParserState *asmState=nullptr) |
This parses the file specified by the indicated SourceMgr and appends parsed operations to the given block. More... | |
LogicalResult | parseSourceFile (llvm::StringRef filename, Block *block, MLIRContext *context, LocationAttr *sourceFileLoc=nullptr) |
This parses the file specified by the indicated filename and appends parsed operations to the given block. More... | |
LogicalResult | parseSourceFile (llvm::StringRef filename, llvm::SourceMgr &sourceMgr, Block *block, MLIRContext *context, LocationAttr *sourceFileLoc=nullptr, AsmParserState *asmState=nullptr) |
This parses the file specified by the indicated filename using the provided SourceMgr and appends parsed operations to the given block. More... | |
LogicalResult | parseSourceString (llvm::StringRef sourceStr, Block *block, MLIRContext *context, LocationAttr *sourceFileLoc=nullptr) |
This parses the IR string and appends parsed operations to the given block. More... | |
template<typename ContainerOpT > | |
OwningOpRef< ContainerOpT > | parseSourceFile (const llvm::SourceMgr &sourceMgr, MLIRContext *context) |
This parses the file specified by the indicated SourceMgr. More... | |
template<typename ContainerOpT > | |
OwningOpRef< ContainerOpT > | parseSourceFile (llvm::StringRef filename, MLIRContext *context) |
This parses the file specified by the indicated filename. More... | |
template<typename ContainerOpT > | |
OwningOpRef< ContainerOpT > | parseSourceFile (llvm::StringRef filename, llvm::SourceMgr &sourceMgr, MLIRContext *context) |
This parses the file specified by the indicated filename using the provided SourceMgr. More... | |
template<typename ContainerOpT > | |
OwningOpRef< ContainerOpT > | parseSourceString (llvm::StringRef sourceStr, MLIRContext *context) |
This parses the provided string containing MLIR. More... | |
Attribute | parseAttribute (llvm::StringRef attrStr, MLIRContext *context) |
This parses a single MLIR attribute to an MLIR context if it was valid. More... | |
Attribute | parseAttribute (llvm::StringRef attrStr, Type type) |
Attribute | parseAttribute (llvm::StringRef attrStr, MLIRContext *context, size_t &numRead) |
This parses a single MLIR attribute to an MLIR context if it was valid. More... | |
Attribute | parseAttribute (llvm::StringRef attrStr, Type type, size_t &numRead) |
Type | parseType (llvm::StringRef typeStr, MLIRContext *context) |
This parses a single MLIR type to an MLIR context if it was valid. More... | |
Type | parseType (llvm::StringRef typeStr, MLIRContext *context, size_t &numRead) |
This parses a single MLIR type to an MLIR context if it was valid. More... | |
IntegerSet | parseIntegerSet (llvm::StringRef str, MLIRContext *context, bool printDiagnosticInfo=true) |
This parses a single IntegerSet to an MLIR context if it was valid. More... | |
void | registerPassManagerCLOptions () |
Register a set of useful command-line options that can be used to configure a pass manager. More... | |
void | applyPassManagerCLOptions (PassManager &pm) |
Apply any values provided to the pass manager options that were registered with 'registerPassManagerOptions'. More... | |
void | applyDefaultTimingPassManagerCLOptions (PassManager &pm) |
Apply any values provided to the timing manager options that were registered with registerDefaultTimingManagerOptions . More... | |
void | registerPassPipeline (StringRef arg, StringRef description, const PassRegistryFunction &function, std::function< void(function_ref< void(const detail::PassOptions &)>)> optHandler) |
Register a specific dialect pipeline registry function with the system, typically used through the PassPipelineRegistration template. More... | |
void | registerPass (const PassAllocatorFunction &function) |
Register a specific dialect pass allocator function with the system, typically used through the PassRegistration template. More... | |
LogicalResult | parsePassPipeline (StringRef pipeline, OpPassManager &pm, raw_ostream &errorStream=llvm::errs()) |
Parse the textual representation of a pass pipeline, adding the result to 'pm' on success. More... | |
FailureOr< OpPassManager > | parsePassPipeline (StringRef pipeline, raw_ostream &errorStream=llvm::errs()) |
Parse the given textual representation of a pass pipeline, and return the parsed pipeline on success. More... | |
std::unique_ptr< Pass > | createReductionTreePass () |
std::unique_ptr< Pass > | createOptReductionPass () |
template<typename T > | |
static std::string | debugString (T &&op) |
std::unique_ptr< llvm::MemoryBuffer > | openInputFile (llvm::StringRef inputFilename, std::string *errorMessage=nullptr) |
Open the file specified by its name for reading. More... | |
std::unique_ptr< llvm::ToolOutputFile > | openOutputFile (llvm::StringRef outputFilename, std::string *errorMessage=nullptr) |
Open the file specified by its name for writing. More... | |
LogicalResult | success (bool isSuccess=true) |
Utility function to generate a LogicalResult. More... | |
LogicalResult | failure (bool isFailure=true) |
Utility function to generate a LogicalResult. More... | |
bool | succeeded (LogicalResult result) |
Utility function that returns true if the provided LogicalResult corresponds to a success value. More... | |
bool | failed (LogicalResult result) |
Utility function that returns true if the provided LogicalResult corresponds to a failure value. More... | |
int64_t | ceilDiv (int64_t lhs, int64_t rhs) |
Returns the result of MLIR's ceildiv operation on constants. More... | |
int64_t | floorDiv (int64_t lhs, int64_t rhs) |
Returns the result of MLIR's floordiv operation on constants. More... | |
int64_t | mod (int64_t lhs, int64_t rhs) |
Returns MLIR's mod operation on constants. More... | |
int64_t | lcm (int64_t a, int64_t b) |
Returns the least common multiple of 'a' and 'b'. More... | |
void | registerDefaultTimingManagerCLOptions () |
Register a set of useful command-line options that can be used to configure a DefaultTimingManager . More... | |
void | applyDefaultTimingManagerCLOptions (DefaultTimingManager &tm) |
Apply any values that were registered with 'registerDefaultTimingManagerOptions' to a DefaultTimingManager . More... | |
LogicalResult | splitAndProcessBuffer (std::unique_ptr< llvm::MemoryBuffer > originalBuffer, ChunkBufferHandler processChunkBuffer, raw_ostream &os) |
Splits the specified buffer on a marker (// ----- ), processes each chunk independently according to the normal processChunkBuffer logic, and writes all results to os . More... | |
inline ::llvm::hash_code | hash_value (TypeID id) |
Enable hashing TypeID. More... | |
static void | registerAllToLLVMIRTranslations (DialectRegistry ®istry) |
Registers all dialects that can be translated to LLVM IR and the corresponding translation interfaces. More... | |
void | registerAMXDialectTranslation (DialectRegistry ®istry) |
Register the AMX dialect and the translation from it to the LLVM IR in the given registry;. More... | |
void | registerAMXDialectTranslation (MLIRContext &context) |
Register the AMX dialect and the translation from it in the registry associated with the given context. More... | |
void | registerArmNeonDialectTranslation (DialectRegistry ®istry) |
Register the ArmNeon dialect and the translation from it to the LLVM IR in the given registry;. More... | |
void | registerArmNeonDialectTranslation (MLIRContext &context) |
Register the ArmNeon dialect and the translation from it in the registry associated with the given context. More... | |
void | registerArmSVEDialectTranslation (DialectRegistry ®istry) |
Register the ArmSVE dialect and the translation from it to the LLVM IR in the given registry;. More... | |
void | registerArmSVEDialectTranslation (MLIRContext &context) |
Register the ArmSVE dialect and the translation from it in the registry associated with the given context. More... | |
void | registerLLVMDialectTranslation (DialectRegistry ®istry) |
Register the LLVM dialect and the translation from it to the LLVM IR in the given registry;. More... | |
void | registerLLVMDialectTranslation (MLIRContext &context) |
Register the LLVM dialect and the translation from it in the registry associated with the given context. More... | |
void | registerNVVMDialectTranslation (DialectRegistry ®istry) |
Register the NVVM dialect and the translation from it to the LLVM IR in the given registry;. More... | |
void | registerNVVMDialectTranslation (MLIRContext &context) |
Register the NVVM dialect and the translation from it in the registry associated with the given context. More... | |
void | registerOpenACCDialectTranslation (DialectRegistry ®istry) |
Register the OpenACC dialect and the translation to the LLVM IR in the given registry;. More... | |
void | registerOpenACCDialectTranslation (MLIRContext &context) |
Register the OpenACC dialect and the translation in the registry associated with the given context. More... | |
void | registerOpenMPDialectTranslation (DialectRegistry ®istry) |
Register the OpenMP dialect and the translation from it to the LLVM IR in the given registry;. More... | |
void | registerOpenMPDialectTranslation (MLIRContext &context) |
Register the OpenMP dialect and the translation from it in the registry associated with the given context. More... | |
void | registerROCDLDialectTranslation (DialectRegistry ®istry) |
Register the ROCDL dialect and the translation from it to the LLVM IR in the given registry;. More... | |
void | registerROCDLDialectTranslation (MLIRContext &context) |
Register the ROCDL dialect and the translation from it in the registry associated with the given context. More... | |
void | registerX86VectorDialectTranslation (DialectRegistry ®istry) |
Register the X86Vector dialect and the translation from it to the LLVM IR in the given registry;. More... | |
void | registerX86VectorDialectTranslation (MLIRContext &context) |
Register the X86Vector dialect and the translation from it in the registry associated with the given context. More... | |
std::unique_ptr< llvm::Module > | translateModuleToLLVMIR (Operation *module, llvm::LLVMContext &llvmContext, llvm::StringRef name="LLVMDialectModule") |
Translate operation that satisfies LLVM dialect module requirements into an LLVM IR module living in the given context. More... | |
OwningOpRef< ModuleOp > | translateLLVMIRToModule (std::unique_ptr< llvm::Module > llvmModule, MLIRContext *context) |
Convert the given LLVM module into MLIR's LLVM dialect. More... | |
DataLayoutSpecInterface | translateDataLayout (const llvm::DataLayout &dataLayout, MLIRContext *context) |
Translate the given LLVM data layout into an MLIR equivalent using the DLTI dialect. More... | |
LogicalResult | MlirLspServerMain (int argc, char **argv, DialectRegistry ®istry) |
Implementation for tools like mlir-lsp-server . More... | |
LogicalResult | MlirOptMain (llvm::raw_ostream &outputStream, std::unique_ptr< llvm::MemoryBuffer > buffer, const PassPipelineCLParser &passPipeline, DialectRegistry ®istry, bool splitInputFile, bool verifyDiagnostics, bool verifyPasses, bool allowUnregisteredDialects, bool preloadDialectsInContext=false) |
Perform the core processing behind mlir-opt : More... | |
LogicalResult | MlirOptMain (llvm::raw_ostream &outputStream, std::unique_ptr< llvm::MemoryBuffer > buffer, PassPipelineFn passManagerSetupFn, DialectRegistry ®istry, bool splitInputFile, bool verifyDiagnostics, bool verifyPasses, bool allowUnregisteredDialects, bool preloadDialectsInContext=false) |
Support a callback to setup the pass manager. More... | |
LogicalResult | MlirOptMain (int argc, char **argv, llvm::StringRef toolName, DialectRegistry ®istry, bool preloadDialectsInContext=false) |
Implementation for tools like mlir-opt . More... | |
LogicalResult | MlirPdllLspServerMain (int argc, char **argv) |
Implementation for tools like mlir-pdll-lsp-server . More... | |
LogicalResult | mlirReduceMain (int argc, char **argv, MLIRContext &context) |
LogicalResult | mlirTranslateMain (int argc, char **argv, StringRef toolName) |
Translate to/from an MLIR module from/to an external representation (e.g. More... | |
LogicalResult | TableGenLspServerMain (int argc, char **argv) |
Implementation for tools like tblgen-lsp-server . More... | |
size_t | controlFlowSink (RegionRange regions, DominanceInfo &domInfo, function_ref< bool(Operation *, Region *)> shouldMoveIntoRegion, function_ref< void(Operation *, Region *)> moveIntoRegion) |
Given a list of regions, perform control flow sinking on them. More... | |
void | getSinglyExecutedRegionsToSink (RegionBranchOpInterface branch, SmallVectorImpl< Region *> ®ions) |
Populates regions with regions of the provided region branch op that are executed at most once at that are reachable given the current operands of the op. More... | |
void | populateFunctionOpInterfaceTypeConversionPattern (StringRef functionLikeOpName, RewritePatternSet &patterns, TypeConverter &converter) |
Add a pattern to the given pattern list to convert the signature of a FunctionOpInterface op with the given type converter. More... | |
template<typename FuncOpT > | |
void | populateFunctionOpInterfaceTypeConversionPattern (RewritePatternSet &patterns, TypeConverter &converter) |
LogicalResult | applyPartialConversion (ArrayRef< Operation *> ops, ConversionTarget &target, const FrozenRewritePatternSet &patterns, DenseSet< Operation *> *unconvertedOps=nullptr) |
Below we define several entry points for operation conversion. More... | |
LogicalResult | applyPartialConversion (Operation *op, ConversionTarget &target, const FrozenRewritePatternSet &patterns, DenseSet< Operation *> *unconvertedOps=nullptr) |
LogicalResult | applyFullConversion (ArrayRef< Operation *> ops, ConversionTarget &target, const FrozenRewritePatternSet &patterns) |
Apply a complete conversion on the given operations, and all nested operations. More... | |
LogicalResult | applyFullConversion (Operation *op, ConversionTarget &target, const FrozenRewritePatternSet &patterns) |
LogicalResult | applyAnalysisConversion (ArrayRef< Operation *> ops, ConversionTarget &target, const FrozenRewritePatternSet &patterns, DenseSet< Operation *> &convertedOps, function_ref< void(Diagnostic &)> notifyCallback=nullptr) |
Apply an analysis conversion on the given operations, and all nested operations. More... | |
LogicalResult | applyAnalysisConversion (Operation *op, ConversionTarget &target, const FrozenRewritePatternSet &patterns, DenseSet< Operation *> &convertedOps, function_ref< void(Diagnostic &)> notifyCallback=nullptr) |
LogicalResult | applyPatternsAndFoldGreedily (MutableArrayRef< Region > regions, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig()) |
Rewrite the regions of the specified operation, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy work-list driven manner. More... | |
LogicalResult | applyPatternsAndFoldGreedily (Operation *op, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig()) |
Rewrite the given regions, which must be isolated from above. More... | |
LogicalResult | applyOpPatternsAndFold (Operation *op, const FrozenRewritePatternSet &patterns, bool *erased=nullptr) |
Applies the specified patterns on op alone while also trying to fold it, by selecting the highest benefits patterns in a greedy manner. More... | |
bool | applyOpPatternsAndFold (ArrayRef< Operation *> ops, const FrozenRewritePatternSet &patterns, bool strict) |
Applies the specified rewrite patterns on ops while also trying to fold these ops as well as any other ops that were in turn created due to such rewrites. More... | |
LogicalResult | inlineRegion (InlinerInterface &interface, Region *src, Operation *inlinePoint, BlockAndValueMapping &mapper, ValueRange resultsToReplace, TypeRange regionResultTypes, Optional< Location > inlineLoc=llvm::None, bool shouldCloneInlinedRegion=true) |
This function inlines a region, 'src', into another. More... | |
LogicalResult | inlineRegion (InlinerInterface &interface, Region *src, Block *inlineBlock, Block::iterator inlinePoint, BlockAndValueMapping &mapper, ValueRange resultsToReplace, TypeRange regionResultTypes, Optional< Location > inlineLoc=llvm::None, bool shouldCloneInlinedRegion=true) |
LogicalResult | inlineRegion (InlinerInterface &interface, Region *src, Operation *inlinePoint, ValueRange inlinedOperands, ValueRange resultsToReplace, Optional< Location > inlineLoc=llvm::None, bool shouldCloneInlinedRegion=true) |
This function is an overload of the above 'inlineRegion' that allows for providing the set of operands ('inlinedOperands') that should be used in-favor of the region arguments when inlining. More... | |
LogicalResult | inlineRegion (InlinerInterface &interface, Region *src, Block *inlineBlock, Block::iterator inlinePoint, ValueRange inlinedOperands, ValueRange resultsToReplace, Optional< Location > inlineLoc=llvm::None, bool shouldCloneInlinedRegion=true) |
LogicalResult | inlineCall (InlinerInterface &interface, CallOpInterface call, CallableOpInterface callable, Region *src, bool shouldCloneInlinedRegion=true) |
This function inlines a given region, 'src', of a callable operation, 'callable', into the location defined by the given call operation. More... | |
void | generateLocationsFromIR (raw_ostream &os, StringRef fileName, Operation *op, OpPrintingFlags flags) |
This function generates new locations from the given IR by snapshotting the IR to the given stream, and using the printed locations within that stream. More... | |
LogicalResult | generateLocationsFromIR (StringRef fileName, Operation *op, OpPrintingFlags flags) |
This function generates new locations from the given IR by snapshotting the IR to the given file, and using the printed locations within that file. More... | |
void | generateLocationsFromIR (raw_ostream &os, StringRef fileName, StringRef tag, Operation *op, OpPrintingFlags flags) |
This function generates new locations from the given IR by snapshotting the IR to the given stream, and using the printed locations within that stream. More... | |
LogicalResult | generateLocationsFromIR (StringRef fileName, StringRef tag, Operation *op, OpPrintingFlags flags) |
This function generates new locations from the given IR by snapshotting the IR to the given file, and using the printed locations within that file. More... | |
std::unique_ptr< Pass > | createLocationSnapshotPass (OpPrintingFlags flags, StringRef fileName="", StringRef tag="") |
Create a pass to generate new locations by snapshotting the IR to the given file, and using the printed locations within that file. More... | |
std::unique_ptr< Pass > | createLocationSnapshotPass () |
Overload utilizing pass options for initialization. More... | |
size_t | moveLoopInvariantCode (RegionRange regions, function_ref< bool(Value, Region *)> isDefinedOutsideRegion, function_ref< bool(Operation *, Region *)> shouldMoveOutOfRegion, function_ref< void(Operation *, Region *)> moveOutOfRegion) |
Given a list of regions, perform loop-invariant code motion. More... | |
size_t | moveLoopInvariantCode (LoopLikeOpInterface loopLike) |
Move side-effect free loop invariant code out of a loop-like op using methods provided by the interface. More... | |
std::unique_ptr< Pass > | createCanonicalizerPass () |
Creates an instance of the Canonicalizer pass, configured with default settings (which can be overridden by pass options on the command line). More... | |
std::unique_ptr< Pass > | createCanonicalizerPass (const GreedyRewriteConfig &config, ArrayRef< std::string > disabledPatterns=llvm::None, ArrayRef< std::string > enabledPatterns=llvm::None) |
Creates an instance of the Canonicalizer pass with the specified config. More... | |
std::unique_ptr< Pass > | createControlFlowSinkPass () |
Creates a pass to perform control-flow sinking. More... | |
std::unique_ptr< Pass > | createCSEPass () |
Creates a pass to perform common sub expression elimination. More... | |
std::unique_ptr< Pass > | createLoopInvariantCodeMotionPass () |
Creates a loop invariant code motion pass that hoists loop invariant instructions out of the loop. More... | |
std::unique_ptr< Pass > | createStripDebugInfoPass () |
Creates a pass to strip debug information from a function. More... | |
std::unique_ptr< Pass > | createPrintOpStatsPass () |
Creates a pass which prints the list of ops and the number of occurrences in the module. More... | |
std::unique_ptr< Pass > | createInlinerPass () |
Creates a pass which inlines calls and callable operations as defined by the CallGraph. More... | |
std::unique_ptr< Pass > | createInlinerPass (llvm::StringMap< OpPassManager > opPipelines) |
Creates an instance of the inliner pass, and use the provided pass managers when optimizing callable operations with names matching the key type. More... | |
std::unique_ptr< Pass > | createInlinerPass (llvm::StringMap< OpPassManager > opPipelines, std::function< void(OpPassManager &)> defaultPipelineBuilder) |
Creates an instance of the inliner pass, and use the provided pass managers when optimizing callable operations with names matching the key type. More... | |
std::unique_ptr< Pass > | createSCCPPass () |
Creates a pass which performs sparse conditional constant propagation over nested operations. More... | |
std::unique_ptr< Pass > | createSymbolDCEPass () |
Creates a pass which delete symbol operations that are unreachable. More... | |
std::unique_ptr< Pass > | createSymbolPrivatizePass (ArrayRef< std::string > excludeSymbols={}) |
Creates a pass which marks top-level symbol operations as private unless listed in excludeSymbols . More... | |
std::unique_ptr< Pass > | createTopologicalSortPass () |
Creates a pass that recursively sorts nested regions without SSA dominance topologically such that, as much as possible, users of values appear after their producers. More... | |
template<typename Range > | |
bool | areValuesDefinedAbove (Range values, Region &limit) |
Check if all values in the provided range are defined above the limit region. More... | |
void | replaceAllUsesInRegionWith (Value orig, Value replacement, Region ®ion) |
Replace all uses of orig within the given region with replacement . More... | |
void | visitUsedValuesDefinedAbove (Region ®ion, Region &limit, function_ref< void(OpOperand *)> callback) |
Calls callback for each use of a value within region or its descendants that was defined at the ancestors of the limit . More... | |
void | visitUsedValuesDefinedAbove (MutableArrayRef< Region > regions, function_ref< void(OpOperand *)> callback) |
Calls callback for each use of a value within any of the regions provided that was defined in one of the ancestors. More... | |
void | getUsedValuesDefinedAbove (Region ®ion, Region &limit, SetVector< Value > &values) |
Fill values with a list of values defined at the ancestors of the limit region and used within region or its descendants. More... | |
void | getUsedValuesDefinedAbove (MutableArrayRef< Region > regions, SetVector< Value > &values) |
Fill values with a list of values used within any of the regions provided but defined in one of the ancestors. More... | |
LogicalResult | simplifyRegions (RewriterBase &rewriter, MutableArrayRef< Region > regions) |
Run a set of structural simplifications over the given regions. More... | |
LogicalResult | eraseUnreachableBlocks (RewriterBase &rewriter, MutableArrayRef< Region > regions) |
Erase the unreachable blocks within the provided regions. More... | |
LogicalResult | runRegionDCE (RewriterBase &rewriter, MutableArrayRef< Region > regions) |
This function returns success if any operations or arguments were deleted, failure otherwise. More... | |
bool | isSideEffectFree (Operation *op) |
Returns true if the given operation is side-effect free. More... | |
bool | sortTopologically (Block *block, iterator_range< Block::iterator > ops, function_ref< bool(Value, Operation *)> isOperandReady=nullptr) |
Given a block, sort a range operations in said block in topological order. More... | |
bool | sortTopologically (Block *block, function_ref< bool(Value, Operation *)> isOperandReady=nullptr) |
Given a block, sort its operations in topological order, excluding its terminator if it has one. More... | |
std::unique_ptr< Pass > | createPrintOpGraphPass (raw_ostream &os=llvm::errs()) |
Creates a pass to print op graphs. More... | |
template<typename ConcreteDialect > | |
void | registerDialect (DialectRegistry ®istry) |
void | vectorizeAffineLoops (Operation *parentOp, DenseSet< Operation *> &loops, ArrayRef< int64_t > vectorSizes, ArrayRef< int64_t > fastestVaryingPattern, const ReductionLoopMap &reductionLoops) |
External utility to vectorize affine loops in 'loops' using the n-D vectorization factors in 'vectorSizes'. More... | |
void | registerTestRoundtripSPIRV () |
void | registerTestRoundtripDebugSPIRV () |
Variables | |
static constexpr unsigned | kDeriveIndexBitwidthFromDataLayout = 0 |
Value to pass as bitwidth for the index type when the converter is expected to derive the bitwidth from the LLVM data layout. More... | |
static constexpr unsigned | kPtrBasePosInDataDescriptor = 0 |
static constexpr unsigned | kPtrPosInDataDescriptor = 1 |
static constexpr unsigned | kSizePosInDataDescriptor = 2 |
std::function< llvm::Error(llvm::Module *)> | makeOptimizingTransformer (unsigned optLevel, unsigned sizeLevel, llvm::TargetMachine *targetMachine) |
Create a module transformer function for MLIR ExecutionEngine that runs LLVM IR passes corresponding to the given speed and size optimization levels (e.g. More... | |
Include the generated interface declarations.
using mlir::AllocFunType = typedef llvm::function_ref<void *(size_t)> |
Definition at line 36 of file MemRefUtils.h.
using mlir::AttributeStorageAllocator = typedef StorageUniquer::StorageAllocator |
Definition at line 179 of file AttributeSupport.h.
using mlir::BlobGenerator = typedef std::function<OwnedBlob(const std::string &, Location, StringRef)> |
Definition at line 43 of file GPUCommonPass.h.
using mlir::ChunkBufferHandler = typedef function_ref<LogicalResult( std::unique_ptr<llvm::MemoryBuffer> chunkBuffer, raw_ostream &os)> |
Definition at line 28 of file ToolUtilities.h.
using mlir::DataLayoutEntryKey = typedef llvm::PointerUnion<Type, StringAttr> |
Definition at line 25 of file DataLayoutInterfaces.h.
using mlir::DataLayoutEntryList = typedef llvm::SmallVector<DataLayoutEntryInterface, 4> |
Definition at line 28 of file DataLayoutInterfaces.h.
using mlir::DataLayoutEntryListRef = typedef llvm::ArrayRef<DataLayoutEntryInterface> |
Definition at line 29 of file DataLayoutInterfaces.h.
using mlir::DefaultAttributeStorage = typedef AttributeStorage |
Default storage type for attributes that require no additional initialization or storage.
Definition at line 171 of file AttributeSupport.h.
using mlir::DefaultTypeStorage = typedef TypeStorage |
Default storage type for types that require no additional initialization or storage.
Definition at line 149 of file TypeSupport.h.
using mlir::DenseMap = typedef llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT> |
using mlir::DenseMapInfo = typedef llvm::DenseMapInfo<T, Enable> |
using mlir::DenseSet = typedef llvm::DenseSet<ValueT, ValueInfoT> |
using mlir::DialectAllocatorFunction = typedef std::function<Dialect *(MLIRContext *)> |
Definition at line 27 of file DialectRegistry.h.
using mlir::DialectAllocatorFunctionRef = typedef function_ref<Dialect *(MLIRContext *)> |
Definition at line 28 of file DialectRegistry.h.
using mlir::DominanceInfoNode = typedef llvm::DomTreeNodeBase<Block> |
Definition at line 29 of file Dominance.h.
using mlir::ElementWiseVisitor = typedef llvm::function_ref<void(T &ptr, ArrayRef<int64_t>)> |
Convenient callback to "visit" a memref element by element.
This takes a reference to an individual element as well as the coordinates. It can be used in conjuction with a StridedMemrefIterator.
Definition at line 129 of file MemRefUtils.h.
using mlir::FilterFunctionType = typedef std::function<bool(Operation &)> |
A NestedPattern is a nested operation walker that:
Nested patterns are meant to capture imperfectly nested loops while matching properties over the whole loop nest. For instance, in vectorization we are interested in capturing all the imperfectly nested loops of a certain type and such that all the load and stores have certain access patterns along the loops' induction variables). Such NestedMatches are first captured using the match
function and are later processed to analyze properties and apply transformations in a non-greedy way.
The NestedMatches captured in the IR can grow large, especially after aggressive unrolling. As experience has shown, it is generally better to use a plain walk over operations to match flat patterns but the current implementation is competitive nonetheless.
Definition at line 90 of file NestedMatcher.h.
using mlir::function_ref = typedef llvm::function_ref<Fn> |
using mlir::GenFunction = typedef std::function<bool(const llvm::RecordKeeper &recordKeeper, raw_ostream &os)> |
using mlir::Loops = typedef SmallVector<scf::ForOp, 8> |
using mlir::LoweringCallback = typedef std::function<std::unique_ptr<llvm::Module>( Operation *, llvm::LLVMContext &, StringRef)> |
Definition at line 45 of file GPUCommonPass.h.
using mlir::NewYieldValueFn = typedef std::function<SmallVector<Value>( OpBuilder &b, Location loc, ArrayRef<BlockArgument> newBBArgs)> |
Replace the loop
with newIterOperands
added as new initialization values.
newYieldValuesFn
is a callback that can be used to specify the additional values to be yielded by the loop. The number of values returned by the callback should match the number of new initialization values. This function
loop
to the newly created looploop
with the new loop.loop
isnt erased, but is left in a "no-op" state where the body of the loop just yields the basic block arguments that correspond to the initialization values of a loop. The loop is dead after this method.newIterOperands
within the generated new loop are replaced with the corresponding BlockArgument
in the loop body. using mlir::OpAsmSetBlockNameFn = typedef function_ref<void(Block *, StringRef)> |
A functor used to set the name of blocks in regions directly nested under an operation.
Definition at line 1322 of file OpImplementation.h.
using mlir::OpAsmSetValueNameFn = typedef function_ref<void(Value, StringRef)> |
A functor used to set the name of the start of a result group of an operation.
See 'getAsmResultNames' below for more details.
Definition at line 1318 of file OpImplementation.h.
using mlir::OperandElementTypeRange = typedef iterator_range<OperandElementTypeIterator> |
Definition at line 85 of file TypeUtilities.h.
using mlir::OwnedBlob = typedef std::unique_ptr<std::vector<char> > |
Definition at line 41 of file GPUCommonPass.h.
using mlir::PassAllocatorFunction = typedef std::function<std::unique_ptr<Pass>()> |
Definition at line 38 of file PassRegistry.h.
using mlir::PassPipelineFn = typedef llvm::function_ref<LogicalResult(PassManager &pm)> |
This defines the function type used to setup the pass manager.
This can be used to pass in a callback to setup a default pass pipeline to be applied on the loaded IR.
Definition at line 35 of file MlirOptMain.h.
using mlir::PassRegistryFunction = typedef std::function<LogicalResult( OpPassManager &, StringRef options, function_ref<LogicalResult(const Twine &)> errorHandler)> |
A registry function that adds passes to the given pass manager.
This should also parse options and return success() if parsing succeeded. errorHandler
is a functor used to emit errors during parsing. parameter corresponds to the raw location within the pipeline string. This should always return failure.
Definition at line 37 of file PassRegistry.h.
using mlir::PDLConstraintFunction = typedef std::function<LogicalResult(PatternRewriter &, ArrayRef<PDLValue>)> |
A generic PDL pattern constraint function.
This function applies a constraint to a given set of opaque PDLValue entities. Returns success if the constraint successfully held, failure otherwise.
Definition at line 806 of file PatternMatch.h.
using mlir::PDLRewriteFunction = typedef std::function<void(PatternRewriter &, PDLResultList &, ArrayRef<PDLValue>)> |
A native PDL rewrite function.
This function performs a rewrite on the given set of values. Any results from this rewrite that should be passed back to PDL should be added to the provided result list. This method is only invoked when the corresponding match was successful.
Definition at line 812 of file PatternMatch.h.
using mlir::ReassociationExprs = typedef SmallVector<AffineExpr, 2> |
Definition at line 26 of file ReshapeOpsUtils.h.
using mlir::ReassociationIndices = typedef SmallVector<int64_t, 2> |
Definition at line 24 of file ReshapeOpsUtils.h.
using mlir::ReassociationIndicesRef = typedef ArrayRef<int64_t> |
Definition at line 25 of file ReshapeOpsUtils.h.
using mlir::ReductionLoopMap = typedef DenseMap<Operation *, SmallVector<LoopReduction, 2> > |
using mlir::ReifiedRankedShapedTypeDims = typedef SmallVector<SmallVector<Value> > |
Definition at line 29 of file InferTypeOpInterface.h.
using mlir::ResultElementTypeRange = typedef iterator_range<ResultElementTypeIterator> |
Definition at line 98 of file TypeUtilities.h.
using mlir::SetVector = typedef llvm::SetVector<T, Vector, Set> |
using mlir::StringSet = typedef llvm::StringSet<AllocatorTy> |
using mlir::StringSwitch = typedef llvm::StringSwitch<T, R> |
using mlir::TileLoops = typedef std::pair<Loops, Loops> |
using mlir::TransitiveFilter = typedef llvm::function_ref<bool(Operation *)> |
Type of the condition to limit the propagation of transitive use-defs.
This can be used in particular to limit the propagation to a given Scope or to avoid passing through certain types of operation in a configurable manner.
Definition at line 28 of file SliceAnalysis.h.
using mlir::TranslateFromMLIRFunction = typedef std::function<LogicalResult(ModuleOp, llvm::raw_ostream &output)> |
Interface of the function that translates MLIR to a different format and outputs the result to a stream.
It is allowed to modify the module.
Definition at line 49 of file Translation.h.
using mlir::TranslateFunction = typedef std::function<LogicalResult( llvm::SourceMgr &sourceMgr, llvm::raw_ostream &output, MLIRContext *)> |
Interface of the function that performs file-to-file translation involving MLIR.
The input file is held in the given MemoryBuffer; the output file should be written to the given raw_ostream. The implementation should create all MLIR constructs needed during the process inside the given context. This can be used for round-tripping external formats through the MLIR system.
Definition at line 57 of file Translation.h.
using mlir::TranslateSourceMgrToMLIRFunction = typedef std::function<OwningOpRef<ModuleOp>( llvm::SourceMgr &sourceMgr, MLIRContext *)> |
Interface of the function that translates the sources managed by sourceMgr
to MLIR.
The source manager has at least one buffer. The implementation should create a new MLIR ModuleOp in the given context and return a pointer to it, or a nullptr in case of any error.
Definition at line 37 of file Translation.h.
using mlir::TranslateStringRefToMLIRFunction = typedef std::function<OwningOpRef<ModuleOp>(llvm::StringRef, MLIRContext *)> |
Interface of the function that translates the given string to MLIR.
The implementation should create a new MLIR ModuleOp in the given context. If source-related error reporting is required from within the function, use TranslateSourceMgrToMLIRFunction instead.
Definition at line 44 of file Translation.h.
using mlir::TypeRangeRangeIterator = typedef llvm::mapped_iterator<llvm::iota_range<unsigned>::iterator, std::function<TypeRange(unsigned)> > |
Definition at line 97 of file TypeRange.h.
using mlir::TypeStorageAllocator = typedef StorageUniquer::StorageAllocator |
This is a utility allocator used to allocate memory for instances of derived Types.
Definition at line 157 of file TypeSupport.h.
using mlir::TypeSwitch = typedef llvm::TypeSwitch<T, ResultT> |
using mlir::VectorizableLoopFun = typedef std::function<bool(AffineForOp)> |
Definition at line 62 of file LoopAnalysis.h.
|
strong |
Definition at line 40 of file AffineExpr.h.
|
strong |
A result type used to indicate if a change happened.
Boolean operations on ChangeResult behave as though Change
is truthy.
Enumerator | |
---|---|
NoChange | |
Change |
Definition at line 38 of file DataFlowAnalysis.h.
|
strong |
Defines the different supported severity of a diagnostic.
Enumerator | |
---|---|
Note | |
Warning | |
Error | |
Remark |
Definition at line 40 of file Diagnostics.h.
enum mlir::FusionMode |
|
strong |
Typed representation for loop type strings.
Enumerator | |
---|---|
Parallel | |
Reduction |
Definition at line 126 of file StructuredOpsUtils.h.
|
strong |
An enum describing the different display modes for the information within the pass manager.
Enumerator | |
---|---|
List | |
Pipeline |
Definition at line 196 of file PassManager.h.
|
strong |
The kinds of regions contained in an operation.
SSACFG regions require the SSA-Dominance property to hold. Graph regions do not require SSA-Dominance. If a registered operation does not implement RegionKindInterface, then any regions it contains are assumed to be SSACFG regions.
Enumerator | |
---|---|
SSACFG | |
Graph |
Definition at line 26 of file RegionKindInterface.h.
|
strong |
Enum that captures information related to verifier error conditions on slice insert/extract type of ops.
Enumerator | |
---|---|
Success | |
RankTooLarge | |
SizeMismatch | |
ElemTypeMismatch | |
MemSpaceMismatch | |
LayoutMismatch |
Definition at line 338 of file BuiltinTypes.h.
|
strong |
Defines a parallelization strategy.
Any independent loop is a candidate for parallelization. The loop is made parallel if (1) allowed by the strategy (e.g., AnyStorageOuterLoop considers either a dense or sparse outermost loop only), and (2) the generated code is an actual for-loop (and not a co-iterating while-loop).
Enumerator | |
---|---|
kNone | |
kDenseOuterLoop | |
kAnyStorageOuterLoop | |
kDenseAnyLoop | |
kAnyStorageAnyLoop |
|
strong |
Defines a strategy for implementing sparse-to-sparse conversion.
kAuto
leaves it up to the compiler to automatically determine the method used. kViaCOO
converts the source tensor to COO and then converts the COO to the target format. kDirect
converts directly via the algorithm in https://arxiv.org/abs/2001.02609; however, beware that there are many formats not supported by this conversion method.
The presence of the kAuto
option violates our usual goal of keeping policy completely separated from mechanism. The reason it exists is because (at present) this strategy can only be specified on a per-file basis. To see why this is a problem, note that kDirect
cannot support certain conversions; so if there is no kAuto
setting, then whenever a file contains a single non-kDirect
-able conversion the user would be forced to use kViaCOO
for all conversions in that file! In the future, instead of using this enum as a Pass
option, we could instead move it to being an attribute on the conversion op; at which point kAuto
would no longer be necessary.
Enumerator | |
---|---|
kAuto | |
kViaCOO | |
kDirect |
|
strong |
Defines a vectorization strategy.
Any inner loop is a candidate (full SIMD for parallel loops and horizontal SIMD for reduction loops). A loop is actually vectorized if (1) allowed by the strategy, and (2) the emitted code is an actual for-loop (and not a co-iterating while-loop).
Enumerator | |
---|---|
kNone | |
kDenseInnerLoop | |
kAnyStorageInnerLoop |
enum mlir::TraversalMode |
Defines the traversal method options to be used in the reduction tree traversal.
Enumerator | |
---|---|
SinglePath | |
Backtrack | |
MultiPath |
Definition at line 37 of file ReductionNode.h.
|
strong |
Traversal order for region, block and operation walk utilities.
Enumerator | |
---|---|
PreOrder | |
PostOrder |
Definition at line 62 of file Visitors.h.
LogicalResult mlir::affineDataCopyGenerate | ( | Block::iterator | begin, |
Block::iterator | end, | ||
const AffineCopyOptions & | copyOptions, | ||
Optional< Value > | filterMemRef, | ||
DenseSet< Operation *> & | copyNests | ||
) |
Performs explicit copying for the contiguous sequence of operations in the block iterator range [`begin', `end'), where `end' can't be past the terminator of the block (since additional operations are potentially inserted right before end
.
copyOptions
provides various parameters, and the output argument copyNests
is the set of all copy nests inserted, each represented by its root affine.for. Since we generate alloc's and dealloc's for all fast buffers (before and after the range of operations resp. or at a hoisted position), all of the fast memory capacity is assumed to be available for processing this block range. When 'filterMemRef' is specified, copies are only generated for the provided MemRef. Returns success if the explicit copying succeeded for all memrefs on which affine load/stores were encountered.
Definition at line 2374 of file LoopUtils.cpp.
References mlir::Operation::emitError(), failed(), failure(), mlir::AffineCopyOptions::fastMemCapacityBytes, findHighestBlockForPlacement(), generateCopy(), getFullMemRefAsRegion(), mlir::Operation::getLoc(), getNestingDepth(), mlir::AffineCopyOptions::slowMemorySpace, succeeded(), and success().
Referenced by affineDataCopyGenerate(), and createAffineDataCopyGenerationPass().
LogicalResult mlir::affineDataCopyGenerate | ( | AffineForOp | forOp, |
const AffineCopyOptions & | copyOptions, | ||
Optional< Value > | filterMemRef, | ||
DenseSet< Operation *> & | copyNests | ||
) |
A convenience version of affineDataCopyGenerate for all ops in the body of an AffineForOp.
Definition at line 2564 of file LoopUtils.cpp.
References affineDataCopyGenerate().
LogicalResult mlir::affineForOpBodySkew | ( | AffineForOp | forOp, |
ArrayRef< uint64_t > | shifts, | ||
bool | unrollPrologueEpilogue = false |
||
) |
Skew the operations in an affine.for's body with the specified operation-wise shifts.
The shifts are with respect to the original execution order, and are multiplied by the loop 'step' before being applied. If unrollPrologueEpilogue
is set, fully unroll the prologue and epilogue loops when possible.
Definition at line 236 of file LoopUtils.cpp.
References getConstantTripCount(), isOpwiseShiftValid(), and success().
Referenced by findMatchingStartFinishInsts().
LogicalResult mlir::affineParallelize | ( | AffineForOp | forOp, |
ArrayRef< LoopReduction > | parallelReductions = {} |
||
) |
Replaces a parallel affine.for op with a 1-d affine.parallel op.
forOp
's body is taken by the affine.parallel op and the former is erased. (mlir::isLoopParallel can be used to detect a parallel affine.for op.) The reductions specified in parallelReductions
are also parallelized. Parallelization will fail in the presence of loop iteration arguments that are not listed in parallelReductions
.
Definition at line 348 of file Utils.cpp.
References mlir::OpBuilder::create(), failure(), mlir::Value::getDefiningOp(), mlir::OpBuilder::getInsertionBlock(), mlir::OpBuilder::getInsertionPoint(), mlir::Operation::getOperand(), mlir::Block::getOperations(), mlir::Operation::getResult(), mlir::ValueRange::getTypes(), mlir::LoopReduction::kind, mlir::Operation::setOperands(), success(), and mlir::LoopReduction::value.
void mlir::affineScalarReplace | ( | func::FuncOp | f, |
DominanceInfo & | domInfo, | ||
PostDominanceInfo & | postDomInfo | ||
) |
Replace affine store and load accesses by scalars by forwarding stores to loads and eliminate invariant affine loads; consequently, eliminate dead allocs.
Definition at line 1024 of file Utils.cpp.
References mlir::Operation::erase(), failed(), findUnusedStore(), forwardStoreToLoad(), and loadCSE().
Referenced by createAffineScalarReplacementPass().
AffineMap mlir::alignAffineMapWithValues | ( | AffineMap | map, |
ValueRange | operands, | ||
ValueRange | dims, | ||
ValueRange | syms, | ||
SmallVector< Value > * | newSyms = nullptr |
||
) |
Re-indexes the dimensions and symbols of an affine map with given operands
values to align with dims
and syms
values.
Each dimension/symbol of the map, bound to an operand o
, is replaced with dimension i
, where i
is the position of o
within dims
. If o
is not in dims
, replace it with symbol i
, where i
is the position of o
within syms
. If o
is not in syms
either, replace it with a new symbol.
Note: If a value appears multiple times as a dimension/symbol (or both), all corresponding dim/sym expressions are replaced with the first dimension bound to that value (or first symbol if no such dimension exists).
The resulting affine map has dims.size()
many dimensions and at least syms.size()
many symbols.
The SSA values of the symbols of the resulting map are optionally returned via newSyms
. This is a concatenation of syms
with the SSA values of the newly added symbols.
Note: As part of this re-indexing, dimensions may turn into symbols, or vice versa.
Definition at line 1573 of file AffineStructures.cpp.
References mlir::detail::enumerate(), mlir::Builder::getAffineDimExpr(), mlir::Builder::getAffineSymbolExpr(), mlir::AffineMap::getContext(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumSymbols(), and mlir::AffineMap::replaceDimsAndSymbols().
Referenced by alignAndAddBound(), and mlir::FlatAffineValueConstraints::computeAlignedMap().
LogicalResult mlir::applyAnalysisConversion | ( | ArrayRef< Operation *> | ops, |
ConversionTarget & | target, | ||
const FrozenRewritePatternSet & | patterns, | ||
DenseSet< Operation *> & | convertedOps, | ||
function_ref< void(Diagnostic &)> | notifyCallback = nullptr |
||
) |
Apply an analysis conversion on the given operations, and all nested operations.
This method analyzes which operations would be successfully converted to the target if a conversion was applied. All operations that were found to be legalizable to the given 'target' are placed within the provided 'convertedOps' set; note that no actual rewrites are applied to the operations on success and only pre-existing operations are added to the set. This method only returns failure if there are unreachable blocks in any of the regions nested within 'ops'. There's an additional argument notifyCallback
which is used for collecting match failure diagnostics generated during the conversion. Diagnostics are only reported to this callback may only be available in debug mode.
Definition at line 3299 of file DialectConversion.cpp.
Referenced by mlir::ConversionTarget::addIllegalDialect(), and applyAnalysisConversion().
LogicalResult mlir::applyAnalysisConversion | ( | Operation * | op, |
ConversionTarget & | target, | ||
const FrozenRewritePatternSet & | patterns, | ||
DenseSet< Operation *> & | convertedOps, | ||
function_ref< void(Diagnostic &)> | notifyCallback = nullptr |
||
) |
Definition at line 3309 of file DialectConversion.cpp.
References applyAnalysisConversion().
void mlir::applyDefaultTimingManagerCLOptions | ( | DefaultTimingManager & | tm | ) |
Apply any values that were registered with 'registerDefaultTimingManagerOptions' to a DefaultTimingManager
.
Definition at line 561 of file Timing.cpp.
References mlir::DefaultTimingManager::setDisplayMode(), and mlir::DefaultTimingManager::setEnabled().
Referenced by applyDefaultTimingPassManagerCLOptions(), and performActions().
void mlir::applyDefaultTimingPassManagerCLOptions | ( | PassManager & | pm | ) |
Apply any values provided to the timing manager options that were registered with registerDefaultTimingManagerOptions
.
This is a handy helper function if you do not want to bother creating your own timing manager and passing it to the pass manager.
Definition at line 150 of file PassManagerOptions.cpp.
References applyDefaultTimingManagerCLOptions(), and mlir::PassManager::enableTiming().
Referenced by mlir::PassManager::IRPrinterConfig::getOpPrintingFlags().
LogicalResult mlir::applyFullConversion | ( | ArrayRef< Operation *> | ops, |
ConversionTarget & | target, | ||
const FrozenRewritePatternSet & | patterns | ||
) |
Apply a complete conversion on the given operations, and all nested operations.
This method returns failure if the conversion of any operation fails, or if there are unreachable blocks in any of the regions nested within 'ops'.
Definition at line 3284 of file DialectConversion.cpp.
Referenced by mlir::ConversionTarget::addIllegalDialect(), applyFullConversion(), mlir::bufferization::populateEliminateBufferizeMaterializationsPatterns(), mlir::linalg::populateLinalgToStandardConversionPatterns(), populateSPIRVLayoutInfoPatterns(), and sourceMaterializationCallback().
LogicalResult mlir::applyFullConversion | ( | Operation * | op, |
ConversionTarget & | target, | ||
const FrozenRewritePatternSet & | patterns | ||
) |
Definition at line 3290 of file DialectConversion.cpp.
References applyFullConversion().
SmallVector< Value, 4 > mlir::applyMapToValues | ( | OpBuilder & | b, |
Location | loc, | ||
AffineMap | map, | ||
ValueRange | values | ||
) |
Returns the values obtained by applying map
to the list of values.
Definition at line 736 of file AffineOps.cpp.
Referenced by foldMemRefCast(), getCollapsedOutputDimFromInputShape(), getExpandedOutputDimFromInputShape(), mlir::linalg::makeTiledLoopRanges(), mlir::linalg::makeTiledShape(), ReifyExpandOrCollapseShapeOp< OpTy >::reifyResultShapes(), mlir::linalg::LinalgTilingOptions::scalarizeDynamicDims(), mlir::AffineDmaWaitOp::verifyInvariants(), and HasAffineDimExprVisitor::visitSymbolExpr().
LogicalResult mlir::applyOpPatternsAndFold | ( | Operation * | op, |
const FrozenRewritePatternSet & | patterns, | ||
bool * | erased = nullptr |
||
) |
Applies the specified patterns on op
alone while also trying to fold it, by selecting the highest benefits patterns in a greedy manner.
Rewrites only op
using the supplied canonicalization patterns and folding.
Returns success if no more patterns can be matched. erased
is set to true if op
was folded away or erased as a result of becoming dead. Note: This does not apply any patterns recursively to the regions of op
.
erased
is set to true if the op is erased as a result of being folded, replaced, or dead.
Definition at line 659 of file GreedyPatternRewriteDriver.cpp.
References failed(), mlir::Operation::getContext(), and mlir::GreedyRewriteConfig::maxIterations.
Referenced by applyPatterns(), applyPatternsAndFoldGreedily(), createAffineDataCopyGenerationPass(), createSimplifyAffineStructuresPass(), and hoistAffineIfOp().
bool mlir::applyOpPatternsAndFold | ( | ArrayRef< Operation *> | ops, |
const FrozenRewritePatternSet & | patterns, | ||
bool | strict | ||
) |
Applies the specified rewrite patterns on ops
while also trying to fold these ops as well as any other ops that were in turn created due to such rewrites.
Furthermore, any pre-existing ops in the IR outside of ops
remain completely unmodified if strict
is set to true. If strict
is false, other operations that use results of rewritten ops or supply operands to such ops are in turn simplified; any other ops still remain unmodified (i.e., regardless of strict
). Note that ops in ops
could be erased as a result of folding, becoming dead, or via pattern rewrites. If more far reaching simplification is desired, applyPatternsAndFoldGreedily should be used. Returns true if at all any IR was rewritten.
Definition at line 676 of file GreedyPatternRewriteDriver.cpp.
LogicalResult mlir::applyPartialConversion | ( | ArrayRef< Operation *> | ops, |
ConversionTarget & | target, | ||
const FrozenRewritePatternSet & | patterns, | ||
DenseSet< Operation *> * | unconvertedOps = nullptr |
||
) |
Below we define several entry points for operation conversion.
It is important to note that the patterns provided to the conversion framework may have additional constraints. See the PatternRewriter Hooks
section of the ConversionPatternRewriter, to see what additional constraints are imposed on the use of the PatternRewriter. Apply a partial conversion on the given operations and all nested operations. This method converts as many operations to the target as possible, ignoring operations that failed to legalize. This method only returns failure if there ops explicitly marked as illegal. If an unconvertedOps
set is provided, all operations that are found not to be legalizable to the given target
are placed within that set. (Note that if there is an op explicitly marked as illegal, the conversion terminates and the unconvertedOps
set will not necessarily be complete.)
Definition at line 3264 of file DialectConversion.cpp.
Referenced by mlir::ConversionTarget::addIllegalDialect(), addResumeFunction(), applyPartialConversion(), convertCmpPredicate(), createI32Constant(), encodeKernelName(), funcsToCoroutines(), lowerEntryPointABIAttr(), ConvertStore::matchAndRewrite(), populateAffineToVectorConversionPatterns(), mlir::arith::populateArithmeticToSPIRVPatterns(), populateBufferizationToMemRefConversionPatterns(), populateComplexToLibmConversionPatterns(), populateComplexToLLVMConversionPatterns(), populateComplexToStandardConversionPatterns(), mlir::cf::populateControlFlowToLLVMConversionPatterns(), mlir::linalg::populateElementwiseToLinalgConversionPatterns(), populateFuncToLLVMConversionPatterns(), populateLinalgToLLVMConversionPatterns(), populateMathToLibmConversionPatterns(), populateMemRefToLLVMConversionPatterns(), populateOpenACCToLLVMConversionPatterns(), populateOpenACCToSCFConversionPatterns(), populateOpenMPToLLVMConversionPatterns(), populateSCFToControlFlowConversionPatterns(), populateVectorToROCDLConversionPatterns(), and unpackOperandVector().
LogicalResult mlir::applyPartialConversion | ( | Operation * | op, |
ConversionTarget & | target, | ||
const FrozenRewritePatternSet & | patterns, | ||
DenseSet< Operation *> * | unconvertedOps = nullptr |
||
) |
Definition at line 3273 of file DialectConversion.cpp.
References applyPartialConversion().
void mlir::applyPassManagerCLOptions | ( | PassManager & | pm | ) |
Apply any values provided to the pass manager options that were registered with 'registerPassManagerOptions'.
Definition at line 133 of file PassManagerOptions.cpp.
References mlir::PassManager::enableCrashReproducerGeneration(), and mlir::PassManager::enableStatistics().
Referenced by mlir::PassManager::IRPrinterConfig::getOpPrintingFlags(), and performActions().
LogicalResult mlir::applyPatternsAndFoldGreedily | ( | MutableArrayRef< Region > | regions, |
const FrozenRewritePatternSet & | patterns, | ||
GreedyRewriteConfig | config = GreedyRewriteConfig() |
||
) |
Rewrite the regions of the specified operation, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy work-list driven manner.
This variant may stop after a predefined number of iterations, see the alternative below to provide a specific number of iterations before stopping in absence of convergence.
Return success if the iterative process converged and no more patterns can be matched in the result operation regions.
Note: This does not apply patterns to the top-level operation itself. These methods also perform folding and simple dead-code elimination before attempting to match any of the provided patterns.
You may configure several aspects of this with GreedyRewriteConfig.
Return success if no more patterns can be matched in the result operation regions. Note: This does not apply patterns to the top-level operation itself.
Definition at line 388 of file GreedyPatternRewriteDriver.cpp.
References mlir::Operation::erase(), failure(), mlir::Operation::getResults(), mlir::Operation::getUsers(), isOpTriviallyDead(), mlir::GreedyRewriteConfig::kNoIterationLimit, mlir::GreedyRewriteConfig::maxIterations, mlir::Operation::operand_begin(), mlir::Operation::operand_end(), succeeded(), and success().
Referenced by applyExtractSliceOfPadTensorSwapPattern(), applyPatternsAndFoldGreedily(), mlir::linalg::applyStagedPatterns(), convertVectorToNVVMCompatibleMMASync(), doSequentialDispatch(), mlir::linalg::generalizeNamedOp(), hoistAffineIfOp(), mlir::linalg::hoistRedundantVectorTransfersOnTensor(), isShapePreserving(), linalgOpToLoopsImpl(), matchAndReplaceDepthwiseConv(), populateConvertShapeConstraintsConversionPatterns(), mlir::linalg::populateElementwiseOpsFusionPatterns(), mlir::memref::populateFoldSubViewOpPatterns(), mlir::linalg::populateFoldUnitExtentDimsPatterns(), mlir::linalg::populateInlineConstantOperandsPatterns(), mlir::memref::populateResolveShapedTypeResultDimsPatterns(), populateVectorToSCFConversionPatterns(), reshapeLowerToHigher(), and sourceMaterializationCallback().
|
inline |
Rewrite the given regions, which must be isolated from above.
Definition at line 68 of file GreedyPatternRewriteDriver.h.
References applyOpPatternsAndFold(), applyPatternsAndFoldGreedily(), and mlir::Operation::getRegions().
SmallVector<T> mlir::applyPermutationMap | ( | AffineMap | map, |
llvm::ArrayRef< T > | source | ||
) |
Apply a permutation from map
to source
and return the result.
Definition at line 531 of file AffineMap.h.
References mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getResults(), and mlir::AffineMap::isProjectedPermutation().
Referenced by buildVectorWrite(), and foldTransferInBoundsAttribute().
void mlir::applyPermutationToVector | ( | SmallVector< T, N > & | inVec, |
ArrayRef< int64_t > | permutation | ||
) |
Apply the permutation defined by permutation
to inVec
.
Element i
in inVec
is mapped to location j = permutation[i]
. E.g.: for an input vector `inVec = ['a', 'b', 'c']and a permutation vector
permutation = [2, 0, 1], this function leaves
inVec = ['c', 'a', 'b']`.
Definition at line 38 of file IndexingUtils.h.
References dropFront(), mlir::detail::enumerate(), and getI64SubArray().
Referenced by computeTransposedType(), getDimPosition(), mlir::linalg::interchangeGenericOp(), mlir::linalg::tileConsumerAndFuseProducers(), and tileLinalgOpImpl().
Check if all values in the provided range are defined above the limit
region.
That is, if they are defined in a region that is a proper ancestor of limit
.
Definition at line 24 of file RegionUtils.h.
References eraseUnreachableBlocks(), getUsedValuesDefinedAbove(), replaceAllUsesInRegionWith(), runRegionDCE(), simplifyRegions(), and visitUsedValuesDefinedAbove().
Referenced by checkAffineLoopNestMappableImpl().
LogicalResult mlir::barePtrFuncArgTypeConverter | ( | LLVMTypeConverter & | converter, |
Type | type, | ||
SmallVectorImpl< Type > & | result | ||
) |
Callback to convert function argument types.
It converts MemRef function arguments to bare pointers to the MemRef element type.
Definition at line 562 of file TypeConverter.cpp.
References mlir::LLVMTypeConverter::convertCallingConventionType(), failure(), and success().
Referenced by mlir::LLVMTypeConverter::convertFunctionSignature().
void mlir::bindDims | ( | MLIRContext * | ctx, |
AffineExprTy &... | exprs | ||
) |
Bind a list of AffineExpr references to DimExpr at positions: [0 .
. sizeof...(exprs)]
Definition at line 328 of file AffineExpr.h.
Referenced by mlir::linalg::addTileLoopIvsToIndexOpResults(), mlir::tensor::bubbleUpPadSlice(), buildLoopIterationCount(), contractSupportsMMAMatrixType(), mlir::tensor::createPadHighOp(), createSubViewIntersection(), mlir::nvgpu::getLaneIdAndValueIdToOperandCoord(), HoistingAnalysis::getPackedTensorSizes(), mlir::linalg::makeComposedExtractSliceOp(), mlir::linalg::makeTiledShape(), mlir::vector::ContractionOpToMatmulOpLowering::matchAndRewrite(), mlir::linalg::updateBoundsForCyclicDistribution(), and updateExpandedGenericOpRegion().
void mlir::bindSymbols | ( | MLIRContext * | ctx, |
AffineExprTy &... | exprs | ||
) |
Bind a list of AffineExpr references to SymbolExpr at positions: [0 .
. sizeof...(exprs)]
Definition at line 335 of file AffineExpr.h.
Referenced by buildLoopIterationCount(), foldMemRefCast(), HoistingAnalysis::getPackedTensorSizes(), and peelForLoop().
LogicalResult mlir::boundCheckLoadOrStoreOp | ( | LoadOrStoreOpPointer | loadOrStoreOp, |
bool | emitError = true |
||
) |
Checks a load or store op for an out of bound access; returns failure if the access is out of bounds along any of the dimensions, success otherwise.
Emits a diagnostic error (with location information) if emitError is true.
Referenced by getMemRefSizeInBytes().
void mlir::buildAffineLoopNest | ( | OpBuilder & | builder, |
Location | loc, | ||
ArrayRef< int64_t > | lbs, | ||
ArrayRef< int64_t > | ubs, | ||
ArrayRef< int64_t > | steps, | ||
function_ref< void(OpBuilder &, Location, ValueRange)> | bodyBuilderFn = nullptr |
||
) |
Builds a perfect nest of affine.for loops, i.e., each loop except the innermost one contains only another loop and a terminator.
The loops iterate from "lbs" to "ubs" with "steps". The body of the innermost loop is populated by calling "bodyBuilderFn" and providing it with an OpBuilder, a Location and a list of loop induction variables.
Definition at line 2032 of file AffineOps.cpp.
References buildAffineLoopFromConstants(), and buildAffineLoopNestImpl().
Referenced by mlir::linalg::GenerateLoopNest< LoopTy >::doit().
void mlir::buildAffineLoopNest | ( | OpBuilder & | builder, |
Location | loc, | ||
ValueRange | lbs, | ||
ValueRange | ubs, | ||
ArrayRef< int64_t > | steps, | ||
function_ref< void(OpBuilder &, Location, ValueRange)> | bodyBuilderFn = nullptr |
||
) |
Definition at line 2040 of file AffineOps.cpp.
References buildAffineLoopFromValues(), and buildAffineLoopNestImpl().
bool mlir::buildSliceTripCountMap | ( | const ComputationSliceState & | slice, |
llvm::SmallDenseMap< Operation *, uint64_t, 8 > * | tripCountMap | ||
) |
Builds a map 'tripCountMap' from AffineForOp to constant trip count for loop nest surrounding represented by slice loop bounds in 'slice'.
Returns true on success, false otherwise (if a non-constant trip count was encountered).
Definition at line 993 of file Utils.cpp.
References getConstantTripCount(), getConstDifference(), getForInductionVarOwner(), mlir::AffineMap::getNumResults(), mlir::ComputationSliceState::ivs, mlir::ComputationSliceState::lbs, and mlir::ComputationSliceState::ubs.
Referenced by fuseLoops(), getComputationSliceState(), getFusionComputeCost(), and mlir::ComputationSliceState::isEmpty().
FusionResult mlir::canFuseLoops | ( | AffineForOp | srcForOp, |
AffineForOp | dstForOp, | ||
unsigned | dstLoopDepth, | ||
ComputationSliceState * | srcSlice, | ||
FusionStrategy | fusionStrategy = FusionStrategy::Generic |
||
) |
Checks the feasibility of fusing the loop nest rooted at 'srcForOp' into the loop nest rooted at 'dstForOp' at 'dstLoopDepth'.
Returns FusionResult 'Success' if fusion of the src/dst loop nests is feasible (i.e. they are in the same block and dependences would not be violated). Otherwise returns a FusionResult explaining why fusion is not feasible. NOTE: This function is not feature complete and should only be used in testing. TODO: Update comments when this function is fully implemented.
Definition at line 260 of file LoopFusionUtils.cpp.
References computeSliceUnion(), mlir::FusionResult::FailBlockDependence, mlir::FusionResult::FailFusionDependence, mlir::FusionResult::FailIncorrectSlice, mlir::FusionResult::FailPrecondition, gatherLoadsAndStores(), mlir::FusionStrategy::Generic, mlir::SliceComputationResult::GenericFailure, getFusedLoopNestInsertionPoint(), getMaxLoopDepth(), getNumCommonSurroundingLoops(), mlir::FusionStrategy::getSiblingFusionMemRef(), mlir::FusionStrategy::getStrategy(), mlir::SliceComputationResult::IncorrectSliceFailure, mlir::FusionStrategy::ProducerConsumer, mlir::FusionStrategy::Sibling, mlir::FusionResult::Success, and mlir::SliceComputationResult::value.
Referenced by mlir::FusionStrategy::getSiblingFusionMemRef(), and isFusionProfitable().
void mlir::canonicalizeMapAndOperands | ( | AffineMap * | map, |
SmallVectorImpl< Value > * | operands | ||
) |
Modifies both map
and operands
in-place so as to:
Definition at line 873 of file AffineOps.cpp.
Referenced by mlir::FlatAffineValueConstraints::addBound(), augmentMapAndBounds(), canonicalizeLoopBounds(), canonicalizeMinMaxOp(), canonicalizeSetAndOperands(), composeAffineMapAndOperands(), createCanonicalizedAffineForOp(), createFoldedComposedAffineApply(), mlir::linalg::fullyComposeAndAffineApply(), fuseLoops(), generatePointWiseCopy(), mlir::MemRefAccess::getAccessMap(), getCleanupLoopLowerBound(), mlir::linalg::getUpperBoundForIndex(), mlir::linalg::makeTiledShape(), normalizeAffineFor(), replaceAllMemRefUsesWith(), and mlir::AffineDmaWaitOp::verifyInvariants().
void mlir::canonicalizeSetAndOperands | ( | IntegerSet * | set, |
SmallVectorImpl< Value > * | operands | ||
) |
Canonicalizes an integer set the same way canonicalizeMapAndOperands does for affine maps.
Definition at line 878 of file AffineOps.cpp.
References mlir::RewritePatternSet::add(), canonicalizeMapAndOperands(), composeAffineMapAndOperands(), failure(), mlir::RewriterBase::replaceOpWithNewOp(), and success().
Referenced by createSeparationCondition(), replaceForOpWithNewYields(), and mlir::AffineDmaWaitOp::verifyInvariants().
MemRefType mlir::canonicalizeStridedLayout | ( | MemRefType | t | ) |
Return a version of t
with identity layout if it can be determined statically that the layout is the canonical contiguous strided layout.
Otherwise pass t
's layout into simplifyAffineMap
and return a copy of t
with simplified layout.
Otherwise pass t
's layout into simplifyAffineMap
and return a copy of t
with simplified layout. If t
has multiple layout maps or a multi-result layout, just return t
.
Definition at line 907 of file BuiltinTypes.cpp.
References mlir::AffineExpr::dyn_cast(), mlir::AffineMap::get(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), mlir::AffineMap::getResult(), mlir::AffineMap::isIdentity(), makeCanonicalStridedLayoutExpr(), mlir::MemRefType::Builder::setLayout(), and simplifyAffineExpr().
Referenced by mlir::TensorType::classof(), computeCollapsedType(), computeExpandedType(), findAncestorOpInRegion(), and isStaticShapeAndContiguousRowMajor().
void mlir::canonicalizeSubViewPart | ( | SmallVectorImpl< OpFoldResult > & | values, |
function_ref< bool(int64_t)> | isDynamic | ||
) |
Detects the values
produced by a ConstantIndexOp and places the new constant in place of the corresponding sentinel value.
Referenced by foldInsertAfterInsertSlice(), mlir::OpWithOffsetSizesAndStridesConstantArgumentFolder< OpType, ResultTypeFunc, CastOpFunc >::matchAndRewrite(), and matchConstantIndex().
|
inline |
Returns the result of MLIR's ceildiv operation on constants.
The RHS is expected to be non-zero.
Definition at line 23 of file MathExtras.h.
Referenced by buildLoopIterationCount(), mlir::presburger::ceil(), mlir::presburger::IntegerRelation::computeConstantLowerOrUpperBound(), mlir::UnrankedMemRefDescriptor::computeSizes(), computeStrides(), mlir::python::PyAffineExpr::get(), mlir::presburger::IntegerRelation::getConstantBoundOnDimSize(), getTripCountMapAndOperands(), loopUnrollByFactor(), normalizeAffineFor(), mlir::AffineExpr::operator!(), processParallelLoop(), promoteIfSingleIteration(), and setInterTileBoundsParametric().
DependenceResult mlir::checkMemrefAccessDependence | ( | const MemRefAccess & | srcAccess, |
const MemRefAccess & | dstAccess, | ||
unsigned | loopDepth, | ||
FlatAffineValueConstraints * | dependenceConstraints, | ||
SmallVector< DependenceComponent, 2 > * | dependenceComponents, | ||
bool | allowRAR = false |
||
) |
Definition at line 598 of file AffineAnalysis.cpp.
References addOrderingConstraints(), mlir::FlatAffineRelation::compose(), computeDirectionVector(), mlir::Operation::dump(), mlir::presburger::IntegerRelation::dump(), failed(), mlir::DependenceResult::Failure, mlir::MemRefAccess::getAccessRelation(), mlir::FlatAffineRelation::getDomainSet(), getNumCommonLoops(), mlir::DependenceResult::HasDependence, mlir::FlatAffineRelation::inverse(), mlir::presburger::IntegerRelation::isEmpty(), mlir::MemRefAccess::memref, mlir::DependenceResult::NoDependence, mlir::MemRefAccess::opInst, and srcAppearsBeforeDstInAncestralBlock().
Referenced by checkTilingLegalityImpl(), computeSliceUnion(), mlir::DependenceResult::DependenceResult(), getDependenceComponents(), getMaxLoopDepth(), hasNoInterveningEffect(), and isLoopMemoryParallel().
void mlir::coalesceLoops | ( | MutableArrayRef< scf::ForOp > | loops | ) |
Replace a perfect nest of "for" loops with a single linearized loop.
Assumes loops
contains a list of perfectly nested loops with bounds and steps independent of any loop induction variable involved in the nest.
Definition at line 582 of file Utils.cpp.
References mlir::OpBuilder::create(), normalizeLoop(), replaceAllUsesInRegionWith(), and mlir::OpBuilder::setInsertionPointToStart().
LogicalResult mlir::coalesceLoops | ( | MutableArrayRef< AffineForOp > | loops | ) |
Replace a perfect nest of "for" loops with a single linearized loop.
Assumes loops
contains a list of perfectly nested loops outermost to innermost that are normalized (step one and lower bound of zero) and with bounds and steps independent of any loop induction variable involved in the nest. Coalescing affine.for loops is not always possible, i.e., the result may not be representable using affine.for.
Definition at line 1720 of file LoopUtils.cpp.
References mlir::OpBuilder::create(), failure(), mlir::AffineExpr::floorDiv(), mlir::AffineMap::get(), mlir::Builder::getAffineDimExpr(), mlir::Builder::getAffineSymbolExpr(), mlir::Builder::getContext(), mlir::AffineBound::getMap(), mlir::AffineBound::getOperands(), mlir::AffineMap::getResults(), replaceAllUsesInRegionWith(), mlir::OpBuilder::setInsertionPointToStart(), and success().
void mlir::collapseParallelLoops | ( | scf::ParallelOp | loops, |
ArrayRef< std::vector< unsigned >> | combinedDimensions | ||
) |
Take the ParallelLoop and for each set of dimension indices, combine them into a single dimension.
combinedDimensions must contain each index into loops exactly once.
Definition at line 638 of file Utils.cpp.
References mlir::OpBuilder::atBlockBegin(), mlir::OpBuilder::create(), mlir::Operation::erase(), normalizeLoop(), and replaceAllUsesInRegionWith().
Optional< SmallVector< ReassociationIndices > > mlir::composeReassociationIndices | ( | ArrayRef< ReassociationIndices > | producerReassociations, |
ArrayRef< ReassociationIndices > | consumerReassociations, | ||
MLIRContext * | context | ||
) |
Compose reassociation maps that are used in pair of reshape ops where one is a producer and other is the consumer.
Only valid to use this method when both the producer and consumer are collapsing dimensions or both are expanding dimensions.
For example, producerReassociation = [[0, 1], [2], [3, 4]] consumerReassociation = [[0, 1], [2]]
is folded into
result = [[0, 1, 2], [3, 4]].
Definition at line 96 of file ReshapeOpsUtils.cpp.
Referenced by getReassociationAttrName(), and mlir::ComposeReassociativeReshapeOps< ReshapeOpTy >::matchAndRewrite().
Drop the dims that are not listed in unusedDims
.
Definition at line 543 of file AffineMap.cpp.
References mlir::AffineMap::get(), getAffineConstantExpr(), getAffineDimExpr(), mlir::AffineMap::getContext(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), and mlir::AffineMap::getResults().
Referenced by compressUnusedDims(), mlir::MutableAffineMap::getContext(), and getProjectedMap().
Drop the symbols that are not listed in unusedSymbols
.
Definition at line 606 of file AffineMap.cpp.
References mlir::AffineMap::get(), getAffineConstantExpr(), getAffineSymbolExpr(), mlir::AffineMap::getContext(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), and mlir::AffineMap::getResults().
Referenced by compressUnusedSymbols(), and mlir::MutableAffineMap::getContext().
Drop the dims that are not used.
Definition at line 562 of file AffineMap.cpp.
References compressDims(), mlir::AffineExpr::dyn_cast(), mlir::AffineMap::getNumDims(), and mlir::AffineMap::walkExprs().
Referenced by compressUnusedDims(), TransferReadPermutationLowering::matchAndRewrite(), and TransferWritePermutationLowering::matchAndRewrite().
SmallVector< AffineMap > mlir::compressUnusedDims | ( | ArrayRef< AffineMap > | maps | ) |
Drop the dims that are not used by any of the individual maps in maps
.
Asserts that all maps in maps
are normalized to the same number of dims and symbols.
Definition at line 601 of file AffineMap.cpp.
References compressUnusedDims(), and compressUnusedImpl().
Referenced by mlir::MutableAffineMap::getContext().
Drop the symbols that are not used.
Definition at line 625 of file AffineMap.cpp.
References compressSymbols(), mlir::AffineExpr::dyn_cast(), mlir::AffineMap::getNumSymbols(), and mlir::AffineMap::walkExprs().
Referenced by compressUnusedSymbols(), and getProjectedMap().
SmallVector< AffineMap > mlir::compressUnusedSymbols | ( | ArrayRef< AffineMap > | maps | ) |
Drop the symbols that are not used by any of the individual maps in maps
.
Asserts that all maps in maps
are normalized to the same number of dims and symbols.
Definition at line 634 of file AffineMap.cpp.
References compressUnusedImpl(), and compressUnusedSymbols().
Referenced by mlir::MutableAffineMap::getContext().
SmallVector< int64_t, 4 > mlir::computeElementOffsetsFromVectorSliceOffsets | ( | ArrayRef< int64_t > | sizes, |
ArrayRef< int64_t > | vectorOffsets | ||
) |
Given the target sizes of a vector, together with vector-space offsets, returns the element-space offsets for each dimension.
Definition at line 119 of file VectorUtils.cpp.
Referenced by getVectorOffset().
int64_t mlir::computeMaxLinearIndex | ( | ArrayRef< int64_t > | basis | ) |
Return the number of elements of basis, 0
if empty.
Definition at line 97 of file VectorUtils.cpp.
Referenced by getTargetShape(), and handleMultidimensionalVectors().
llvm::Optional< llvm::SmallDenseSet< unsigned > > mlir::computeRankReductionMask | ( | ArrayRef< int64_t > | originalShape, |
ArrayRef< int64_t > | reducedShape | ||
) |
Given an originalShape
and a reducedShape
assumed to be a subset of originalShape
with some 1
entries erased, return the set of indices that specifies which of the entries of originalShape
are dropped to obtain reducedShape
.
The returned mask can be applied as a projection to originalShape
to obtain the reducedShape
. This mask is useful to track which dimensions must be kept when e.g. compute MemRef strides under rank-reducing operations. Return None if reducedShape cannot be obtained by dropping only 1
entries in originalShape
.
Definition at line 415 of file BuiltinTypes.cpp.
Referenced by isRankReducedType(), joinShapes(), and mlir::VectorType::Builder::operator Type().
SliceComputationResult mlir::computeSliceUnion | ( | ArrayRef< Operation *> | opsA, |
ArrayRef< Operation *> | opsB, | ||
unsigned | loopDepth, | ||
unsigned | numCommonLoops, | ||
bool | isBackwardSlice, | ||
ComputationSliceState * | sliceUnion | ||
) |
Computes in 'sliceUnion' the union of all slice bounds computed at 'loopDepth' between all dependent pairs of ops in 'opsA' and 'opsB', and then verifies if it is valid.
The parameter 'numCommonLoops' is the number of loops common to the operations in 'opsA' and 'opsB'. If 'isBackwardSlice' is true, computes slice bounds for loop nest surrounding ops in 'opsA', as a function of IVs and symbols of loop nest surrounding ops in 'opsB' at 'loopDepth'. If 'isBackwardSlice' is false, computes slice bounds for loop nest surrounding ops in 'opsB', as a function of IVs and symbols of loop nest surrounding ops in 'opsA' at 'loopDepth'. Returns 'SliceComputationResult::Success' if union was computed correctly, an appropriate 'failure' otherwise.
Returns 'SliceComputationResult::Success' if union was computed correctly, an appropriate failure otherwise.
Definition at line 811 of file Utils.cpp.
References addMissingLoopIVBounds(), mlir::FlatAffineValueConstraints::areIdsAlignedWithOther(), checkMemrefAccessDependence(), mlir::ComputationSliceState::clearBounds(), mlir::FlatAffineValueConstraints::convertLoopIVSymbolsToDims(), failed(), mlir::DependenceResult::Failure, mlir::SliceComputationResult::GenericFailure, mlir::ComputationSliceState::getAsConstraints(), getComputationSliceState(), getInnermostCommonLoopDepth(), getNestingDepth(), mlir::presburger::IntegerRelation::getNumDimAndSymbolIds(), mlir::presburger::IntegerRelation::getNumDimIds(), mlir::presburger::IntegerRelation::getNumLocalIds(), mlir::FlatAffineValueConstraints::getSliceBounds(), mlir::FlatAffineValueConstraints::getValue(), mlir::FlatAffineValueConstraints::getValues(), mlir::SliceComputationResult::IncorrectSliceFailure, mlir::ComputationSliceState::insertPoint, mlir::ComputationSliceState::isSliceValid(), mlir::ComputationSliceState::ivs, mlir::ComputationSliceState::lbOperands, mlir::ComputationSliceState::lbs, mlir::MemRefAccess::memref, mlir::FlatAffineValueConstraints::mergeAndAlignIdsWithOther(), mlir::DependenceResult::NoDependence, mlir::MemRefAccess::opInst, mlir::SliceComputationResult::Success, mlir::ComputationSliceState::ubOperands, mlir::ComputationSliceState::ubs, mlir::FlatAffineValueConstraints::unionBoundingBox(), and mlir::DependenceResult::value.
Referenced by canFuseLoops(), and mlir::ComputationSliceState::isEmpty().
SmallVector< int64_t, 4 > mlir::computeStrides | ( | ArrayRef< int64_t > | shape, |
ArrayRef< int64_t > | sizes | ||
) |
Given the shape and sizes of a vector, returns the corresponding strides for each dimension.
TODO: needs better doc of how it is used.
Definition at line 104 of file VectorUtils.cpp.
References ceilDiv().
Referenced by getDimPosition(), getVectorOffset(), and handleMultidimensionalVectors().
Concatenates a list of maps
into a single AffineMap, stepping over potentially empty maps.
Assumes each of the underlying map has 0 symbols. The resulting map has a number of dims equal to the max of maps
' dims and the concatenated results as its results. Returns an empty map if all input maps
are empty.
Example: When applied to the following list of 3 affine maps,
Returns the map:
Definition at line 703 of file AffineMap.cpp.
Referenced by mlir::linalg::detail::canOpOperandsBeDroppedImpl(), collapseGenericOpIterationDims(), mlir::MutableAffineMap::getContext(), replaceUnitDimIndexOps(), replaceUnitDims(), and replaceUnitExtents().
void mlir::configureAMXLegalizeForExportTarget | ( | LLVMConversionTarget & | target | ) |
Configure the target to support lowering AMX ops to ops that map to LLVM intrinsics.
Definition at line 220 of file LegalizeForLLVMExport.cpp.
References mlir::ConversionTarget::addIllegalOp(), and mlir::ConversionTarget::addLegalOp().
void mlir::configureArmSVELegalizeForExportTarget | ( | LLVMConversionTarget & | target | ) |
Configure the target to support lowering ArmSVE ops to ops that map to LLVM intrinsics.
Definition at line 95 of file LegalizeForLLVMExport.cpp.
References mlir::ConversionTarget::addIllegalOp(), and mlir::ConversionTarget::addLegalOp().
void mlir::configureGpuToNVVMConversionLegality | ( | ConversionTarget & | target | ) |
Configure target to convert from the GPU dialect to NVVM.
Definition at line 216 of file LowerGpuOpsToNVVMOps.cpp.
References mlir::ConversionTarget::addIllegalDialect(), mlir::ConversionTarget::addIllegalOp(), mlir::ConversionTarget::addLegalDialect(), and mlir::ConversionTarget::addLegalOp().
void mlir::configureGpuToROCDLConversionLegality | ( | ConversionTarget & | target | ) |
Configure target to convert from the GPU dialect to ROCDL.
Definition at line 99 of file LowerGpuOpsToROCDLOps.cpp.
References mlir::ConversionTarget::addIllegalDialect(), mlir::ConversionTarget::addIllegalOp(), mlir::ConversionTarget::addLegalDialect(), and mlir::ConversionTarget::addLegalOp().
void mlir::configureOpenMPToLLVMConversionLegality | ( | ConversionTarget & | target, |
LLVMTypeConverter & | typeConverter | ||
) |
Configure dynamic conversion legality of regionless operations from OpenMP to LLVM.
Definition at line 79 of file OpenMPToLLVM.cpp.
References mlir::ConversionTarget::addDynamicallyLegalOp(), and mlir::TypeConverter::isLegal().
Referenced by populateOpenMPToLLVMConversionPatterns().
void mlir::configureParallelLoopToGPULegality | ( | ConversionTarget & | target | ) |
Configures the rewrite target such that only scf.parallel
operations that are not rewritten by the provided patterns are legal.
Definition at line 673 of file SCFToGPU.cpp.
References mlir::ConversionTarget::addDynamicallyLegalOp(), mlir::ConversionTarget::addLegalDialect(), mlir::gpu::getMappingAttrName(), and kVisitedAttrName.
void mlir::configureX86VectorLegalizeForExportTarget | ( | LLVMConversionTarget & | target | ) |
Configure the target to support lowering X86Vector ops to ops that map to LLVM intrinsics.
Definition at line 168 of file LegalizeForLLVMExport.cpp.
References mlir::ConversionTarget::addIllegalOp(), and mlir::ConversionTarget::addLegalOp().
Referenced by mlir::x86vector::avx2::LoweringOptions::setTransposeOptions().