MLIR  14.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
mlir Namespace Reference

Include the generated interface declarations. More...

Namespaces

 acc
 
 arith
 
 arm_neon
 
 async
 
 AttributeTrait
 
 bufferization
 
 complex
 
 detail
 
 emitc
 
 
 gpu
 
 impl
 Attribute collections provide a dictionary-like interface.
 
 linalg
 
 LLVM
 
 lsp
 
 matcher
 
 matchers
 
 math
 
 MemoryEffects
 
 memref
 
 MemRefType
 
 NVVM
 
 omp
 
 op_definition_impl
 
 OpTrait
 
 pdl
 
 pdl_interp
 
 pdl_to_pdl_interp
 
 python
 
 quant
 
 RankedTensorType
 
 ROCDL
 
 runtime
 
 scf
 
 shape
 
 SideEffects
 
 sparse_tensor
 
 spirv
 
 tblgen
 
 tensor
 
 tosa
 
 TypeTrait
 
 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
 Base MemRef for Ranked and Unranked variants. More...
 
class  Block
 Block represents an ordered list of Operations. More...
 
class  BlockAndValueMapping
 
class  BlockArgument
 This class represents an argument of a Block. More...
 
class  BlockNumberOfExecutionsInfo
 Represents number of block executions information. 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  BufferizeTypeConverter
 A helper type converter class that automatically populates the relevant materializations and type conversions for bufferization. More...
 
class  BufferPlacementAllocs
 A simple analysis that detects allocation operations. More...
 
class  BufferPlacementTransformationBase
 The base class for all BufferPlacement transformations. 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...
 
struct  CollapseMixedReshapeOps
 Pattern to collapse producer/consumer reshape ops that are both collapsing dimensions or are both expanding dimensions. More...
 
struct  CollapseReshapeOps
 Pattern to collapse producer/consumer reshape ops that are both collapsing dimensions or are both expanding dimensions. More...
 
class  ComplexStructBuilder
 
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  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...
 
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...
 
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 a type. More...
 
class  FilteredValueUseIterator
 
class  FlatAffineConstraints
 A flat list of affine equalities and inequalities in the form. More...
 
class  FlatAffineRelation
 A FlatAffineRelation represents a set of ordered pairs (domain -> range) where "domain" and "range" are tuples of identifiers. More...
 
class  FlatAffineValueConstraints
 An extension of FlatAffineConstraints in which dimensions and symbols can optionally be associated with an SSA value. 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...
 
struct  Fraction
 A class to represent fractions. More...
 
class  FrozenRewritePatternSet
 This class represents a frozen set of patterns that can be processed by a pattern applicator. More...
 
class  FunctionPass
 A model for providing function pass specific utilities. More...
 
struct  FusionResult
 
class  FusionStrategy
 Describes the fusion strategy to be used in the Affine loop fusion utilities. More...
 
class  GBRSimplex
 Given a simplex for a polytope, construct a new simplex whose variables are identified with a pair of points (x, y) in the original polytope. 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...
 
class  GlobalCreator
 
struct  GPUFuncOpLowering
 
struct  GPUIndexIntrinsicOpLowering
 
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  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  LinearTransform
 
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 in the Standard dialect 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 Standard dialect to LLVM lowering. More...
 
struct  LowerVectorToLLVMOptions
 Options to control Vector to LLVM lowering. More...
 
struct  MathPolynomialApproximationOptions
 
class  Matrix
 This is a class to represent a resizable matrix. More...
 
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  NumberOfExecutions
 Represents an analysis for computing how many times a block or an operation within a region is executed each time that region is entered. 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 a specific operation type. 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  OwningModuleRef
 This class acts as an owning reference to a module, and will automatically destroy the held module on destruction if the held module is valid. 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 operation parsing. 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  PresburgerSet
 This class can represent a union of FlatAffineConstraints, with support for union, intersection, subtraction and complement operations, as well as sampling. 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  ShapeAdaptor
 Adaptor class to abstract the differences between whether value is from a ShapedType or ShapedTypeComponents or DenseIntElementsAttribute. More...
 
class  ShapedType
 This is a common base class between Vector, UnrankedTensor, RankedTensor, and MemRef types because they share behavior and semantics around shape, rank, and fixed element type. 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  Simplex
 This class implements a version of the Simplex and Generalized Basis Reduction algorithms, which can perform analysis of integer sets with affine inequalities and equalities. 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  SparsificationOptions
 Sparsification options. 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  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 SymbolTables. 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  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...
 

Typedefs

using VectorizableLoopFun = std::function< bool(AffineForOp)>
 
using FilterFunctionType = std::function< bool(Operation &)>
 A NestedPattern is a nested operation walker that: More...
 
using TransitiveFilter = llvm::function_ref< bool(Operation *)>
 Type of the condition to limit the propagation of transitive use-defs. More...
 
using OwningRewritePatternList = RewritePatternSet
 
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 ReductionLoopMap = DenseMap< Operation *, SmallVector< LoopReduction, 2 > >
 
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 Identifier = StringAttr
 NOTICE: Identifier is deprecated and usages of it should be replaced with StringAttr. More...
 
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 DialectInterfaceAllocatorFunction = std::function< std::unique_ptr< DialectInterface >(Dialect *)>
 
using ObjectInterfaceAllocatorFunction = std::function< void(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 PDLConstraintFunction = std::function< LogicalResult(ArrayRef< PDLValue >, ArrayAttr, PatternRewriter &)>
 A generic PDL pattern constraint function. More...
 
using PDLRewriteFunction = std::function< void(ArrayRef< PDLValue >, ArrayAttr, PatternRewriter &, PDLResultList &)>
 A native PDL rewrite function. More...
 
using PDLSingleEntityConstraintFunction = std::function< LogicalResult(PDLValue, ArrayAttr, PatternRewriter &)>
 A generic PDL pattern constraint 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 PassPipelineFn = llvm::function_ref< LogicalResult(PassManager &pm)>
 This defines the function type used to setup the pass manager. More...
 
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 Loops = SmallVector< scf::ForOp, 8 >
 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...
 
using TileLoops = std::pair< Loops, Loops >
 
using TranslateSourceMgrToMLIRFunction = std::function< OwningModuleRef(llvm::SourceMgr &sourceMgr, MLIRContext *)>
 Interface of the function that translates the sources managed by sourceMgr to MLIR. More...
 
using TranslateStringRefToMLIRFunction = std::function< OwningModuleRef(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...
 
using Direction = Simplex::Direction
 

Enumerations

enum  ChangeResult { ChangeResult::NoChange, ChangeResult::Change }
 A result type used to indicate if a change happened. More...
 
enum  SparseParallelizationStrategy {
  SparseParallelizationStrategy::kNone, SparseParallelizationStrategy::kDenseOuterLoop, SparseParallelizationStrategy::kAnyStorageOuterLoop, SparseParallelizationStrategy::kDenseAnyLoop,
  SparseParallelizationStrategy::kAnyStorageAnyLoop
}
 Defines a parallelization strategy. More...
 
enum  SparseVectorizationStrategy { SparseVectorizationStrategy::kNone, SparseVectorizationStrategy::kDenseInnerLoop, SparseVectorizationStrategy::kAnyStorageInnerLoop }
 Defines a vectorization strategy. More...
 
enum  IteratorType { IteratorType::Parallel, IteratorType::Reduction }
 Typed representation for loop type strings. More...
 
enum  AffineExprKind {
  AffineExprKind::Add, AffineExprKind::Mul, AffineExprKind::Mod, AffineExprKind::FloorDiv,
  AffineExprKind::CeilDiv, AffineExprKind::LAST_AFFINE_BINARY_OP = CeilDiv, AffineExprKind::Constant, AffineExprKind::DimId,
  AffineExprKind::SymbolId
}
 
enum  DiagnosticSeverity { DiagnosticSeverity::Note, DiagnosticSeverity::Warning, DiagnosticSeverity::Error, DiagnosticSeverity::Remark }
 Defines the different supported severity of a diagnostic. More...
 
enum  RegionKind { RegionKind::SSACFG, RegionKind::Graph }
 The kinds of regions contained in an operation. More...
 
enum  WalkOrder { WalkOrder::PreOrder, WalkOrder::PostOrder }
 Traversal order for region, block and operation walk utilities. More...
 
enum  PassDisplayMode { PassDisplayMode::List, PassDisplayMode::Pipeline }
 An enum describing the different display modes for the information within the pass manager. More...
 
enum  TraversalMode { SinglePath, Backtrack, MultiPath }
 Defines the traversal method options to be used in the reduction tree traversal. More...
 
enum  FusionMode { Greedy, ProducerConsumer, Sibling }
 Fusion mode to attempt. More...
 

Functions

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, FlatAffineConstraints *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, FlatAffineConstraints *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, FlatAffineConstraints *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)
 
raw_ostream & operator<< (raw_ostream &os, const AliasResult &result)
 
raw_ostream & operator<< (raw_ostream &os, const ModRefResult &result)
 
ChangeResult operator| (ChangeResult lhs, ChangeResult rhs)
 
ChangeResultoperator|= (ChangeResult &lhs, ChangeResult rhs)
 
ChangeResult operator & (ChangeResult lhs, ChangeResult rhs)
 
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...
 
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...
 
bool defaultFilterFunction (Operation &)
 
int compare (Fraction x, Fraction y)
 Three-way comparison between two fractions. More...
 
int64_t floor (Fraction f)
 
int64_t ceil (Fraction f)
 
Fraction operator- (Fraction x)
 
bool operator< (Fraction x, Fraction y)
 
bool operator<= (Fraction x, Fraction y)
 
bool operator== (Fraction x, Fraction y)
 
bool operator!= (Fraction x, Fraction y)
 
bool operator> (Fraction x, Fraction y)
 
bool operator>= (Fraction x, Fraction y)
 
Fraction operator* (Fraction x, Fraction y)
 
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...
 
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...
 
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 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< PasscreateLowerAffinePass ()
 Lowers affine control flow operations (ForStmt, IfStmt and AffineApplyOp) to equivalent lower-level constructs (flow of basic blocks and arithmetic primitives). More...
 
void populateConvertArmNeon2dToIntrPatterns (RewritePatternSet &patterns)
 Populates patterns for the lowering of Arm NEON 2D ops to intrinsics. More...
 
std::unique_ptr< OperationPass< FuncOp > > 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 populateComplexToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Populate the given list with patterns that convert from Complex to LLVM. More...
 
std::unique_ptr< OperationPass< ModuleOp > > 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< OperationPass< FuncOp > > createConvertComplexToStandardPass ()
 Create a pass to convert Complex operations to the Standard dialect. 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, OwningRewritePatternList &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)
 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)
 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< PasscreateConvertMathToLLVMPass ()
 
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< PasscreateMemRefToLLVMPass ()
 
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 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 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< PasscreateReconcileUnrealizedCastsPass ()
 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...
 
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< OperationPass< FuncOp > > createAffineForToGPUPass (unsigned numBlockDims, unsigned numThreadDims)
 Create a pass that converts loop nests into GPU kernels. More...
 
std::unique_ptr< OperationPass< FuncOp > > createAffineForToGPUPass ()
 
std::unique_ptr< PasscreateParallelLoopToGpuPass ()
 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 populateLoopToStdConversionPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to lower from scf.for, scf.if, and loop.terminator to CFG operations within the Standard dialect, in particular convert structured control flow into CFG branch-based control flow. More...
 
std::unique_ptr< PasscreateLowerToCFGPass ()
 Creates a pass to convert scf.for, scf.if and loop.terminator ops to CFG. More...
 
void populateShapeToStandardConversionPatterns (RewritePatternSet &patterns)
 
std::unique_ptr< OperationPass< ModuleOp > > createConvertShapeToStandardPass ()
 
void populateConvertShapeConstraintsConversionPatterns (RewritePatternSet &patterns)
 
std::unique_ptr< OperationPass< FuncOp > > 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 populateStdToLLVMFuncOpConversionPattern (LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Collect the default pattern to convert a FuncOp to the LLVM dialect. More...
 
void populateStdToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Collect the patterns to convert from the Standard dialect to LLVM. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createLowerToLLVMPass ()
 Creates a pass to convert the Standard dialect into the LLVMIR dialect. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createLowerToLLVMPass (const LowerToLLVMOptions &options)
 
void populateStandardToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating standard ops to SPIR-V 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 > > createConvertStandardToSPIRVPass ()
 Creates a pass to convert standard ops to SPIR-V ops. More...
 
void populatePrepareVectorToMMAPatterns (RewritePatternSet &patterns)
 Patterns to transform vector ops into a canonical form to convert to MMA matrix operations. More...
 
void convertVectorToMMAOps (FuncOp funcOp)
 Convert vector ops to MMA matrix operations. More...
 
std::unique_ptr< PasscreateConvertVectorToGPUPass ()
 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)
 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 + std. More...
 
std::unique_ptr< PasscreateConvertVectorToSCFPass (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...
 
bool isTopLevelValue (Value value)
 A utility function to check if a value is defined at the top level of an op with trait AffineScope or is a region argument for such an op. 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...
 
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...
 
std::unique_ptr< OperationPass< FuncOp > > createSimplifyAffineStructuresPass ()
 Creates a simplification pass for affine structures (maps and sets). More...
 
std::unique_ptr< OperationPass< FuncOp > > createAffineLoopInvariantCodeMotionPass ()
 Creates a loop invariant code motion pass that hoists loop invariant operations out of affine loops. More...
 
std::unique_ptr< OperationPass< FuncOp > > createAffineParallelizePass ()
 Creates a pass to convert all parallel affine.for's into 1-d affine.parallel ops. More...
 
std::unique_ptr< OperationPass< FuncOp > > createAffineLoopNormalizePass ()
 Apply normalization transformations to affine loop-like ops. More...
 
std::unique_ptr< OperationPass< 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< FuncOp > > createAffineDataCopyGenerationPass ()
 Overload relying on pass options for initialization. More...
 
std::unique_ptr< OperationPass< 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< FuncOp > > createLoopTilingPass (uint64_t cacheSizeBytes)
 Creates a pass to perform tiling on loop nests. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLoopTilingPass ()
 Overload relying on pass options for initialization. More...
 
std::unique_ptr< OperationPass< 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< FuncOp > > createLoopUnrollAndJamPass (int unrollJamFactor=-1)
 Creates a loop unroll jam pass to unroll jam by the specified factor. More...
 
std::unique_ptr< OperationPass< 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< 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 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...
 
void 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...
 
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...
 
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< PasscreateAsyncParallelForPass ()
 
std::unique_ptr< PasscreateAsyncParallelForPass (bool asyncDispatch, int32_t numWorkerThreads, int32_t targetBlockSize)
 
std::unique_ptr< OperationPass< ModuleOp > > createAsyncToAsyncRuntimePass ()
 
std::unique_ptr< PasscreateAsyncRuntimeRefCountingPass ()
 
std::unique_ptr< PasscreateAsyncRuntimeRefCountingOptPass ()
 
std::unique_ptr< PasscreateAsyncRuntimePolicyBasedRefCountingPass ()
 
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...
 
void promoteToWorkgroupMemory (gpu::GPUFuncOp op, unsigned arg)
 Promotes a function argument to workgroup memory in the given function. More...
 
void greedilyMapParallelSCFToGPU (Region &region)
 Maps the parallel loops found in the given function to workgroups. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createGpuKernelOutliningPass ()
 Replaces gpu.launch with gpu.launch_func by moving the region into a separate kernel function. More...
 
std::unique_ptr< OperationPass< 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...
 
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)
 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< OperationPass< FuncOp > > createConvertElementwiseToLinalgPass ()
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgFoldUnitExtentDimsPass ()
 
std::unique_ptr< PasscreateLinalgElementwiseOpFusionPass ()
 
std::unique_ptr< PasscreateFoldReshapeOpsByLinearizationPass ()
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgTilingPass (ArrayRef< int64_t > tileSizes={}, linalg::LinalgTilingLoopType loopType=linalg::LinalgTilingLoopType::Loops, ArrayRef< StringRef > distributionTypes={})
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgPromotionPass (bool dynamicBuffers, bool useAlloca)
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgPromotionPass ()
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgInlineScalarOperandsPass ()
 
std::unique_ptr< OperationPass< FuncOp > > createConvertLinalgTiledLoopsToSCFPass ()
 Create a pass to convert Linalg tiled loops to scf.for and scf.parallel loops and memref.load/memref.store accesses. More...
 
std::unique_ptr< OperationPass< FuncOp > > createConvertLinalgToLoopsPass ()
 Create a pass to convert Linalg operations to scf.for loops and memref.load/memref.store accesses. More...
 
std::unique_ptr< OperationPass< FuncOp > > createConvertLinalgToParallelLoopsPass ()
 Create a pass to convert Linalg operations to scf.parallel loops and memref.load/memref.store accesses. More...
 
std::unique_ptr< OperationPass< FuncOp > > createConvertLinalgToAffineLoopsPass ()
 Create a pass to convert Linalg operations to affine.for loops and affine_load/affine_store accesses. More...
 
std::unique_ptr< PasscreateLinalgComprehensiveModuleBufferizePass ()
 This pass implements a cross-dialect bufferization approach and performs an analysis to determine which op operands and results may be bufferized in the same buffers. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgBufferizePass ()
 Create a pass to convert Linalg operations which work on tensors to use buffers instead. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgGeneralizationPass ()
 Create a pass to convert named Linalg operations to Linalg generic operations. More...
 
std::unique_ptr< PasscreateLinalgDetensorizePass ()
 Create a pass to convert Linalg operations to equivalent operations that work on primitive types, if possible. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyTileAndFusePass (StringRef opName="", linalg::LinalgTilingAndFusionOptions opt={}, linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter())
 Linalg strategy passes. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyTilePass (StringRef opName="", linalg::LinalgTilingOptions opt=linalg::LinalgTilingOptions(), linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter())
 Create a LinalgStrategyTilePass. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyPadPass (StringRef opName="", linalg::LinalgPaddingOptions opt=linalg::LinalgPaddingOptions(), linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter())
 Create a LinalgStrategyPadPass. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyPromotePass (StringRef opName="", linalg::LinalgPromotionOptions opt=linalg::LinalgPromotionOptions(), linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter())
 Create a LinalgStrategyPromotePass. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyGeneralizePass (StringRef opName="", linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter())
 Create a LinalgStrategyGeneralizePass. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyDecomposePass ()
 Create a LinalgStrategyDecomposePass. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyInterchangePass (ArrayRef< int64_t > iteratorInterchange={}, linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter())
 Create a LinalgStrategyInterchangePass. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyVectorizePass (StringRef opName="", linalg::LinalgVectorizationOptions opt=linalg::LinalgVectorizationOptions(), linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter(), bool padVectorize=false)
 Create a LinalgStrategyVectorizePass. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyEnablePass (linalg::LinalgEnablingOptions opt=linalg::LinalgEnablingOptions(), linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter())
 Create a LinalgStrategyEnablePass. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLinalgStrategyLowerVectorsPass (linalg::LinalgVectorLoweringOptions opt=linalg::LinalgVectorLoweringOptions(), linalg::LinalgTransformationFilter filter=linalg::LinalgTransformationFilter())
 Create a LinalgStrategyLowerVectorsPass. More...
 
std::unique_ptr< OperationPass< 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...
 
llvm::Optional< Operation * > findDealloc (Value allocValue)
 Finds a single dealloc operation for the given allocated value. More...
 
std::unique_ptr< PasscreateSCFBufferizePass ()
 Creates a pass that bufferizes the SCF dialect. More...
 
std::unique_ptr< PasscreateForLoopSpecializationPass ()
 Creates a pass that specializes for loop for unrolling and vectorization. More...
 
std::unique_ptr< PasscreateForLoopPeelingPass ()
 Creates a pass that peels for loops at their upper bounds for better vectorization. More...
 
std::unique_ptr< PasscreateSCFForLoopCanonicalizationPass ()
 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< PasscreateParallelLoopFusionPass ()
 Creates a loop fusion pass which fuses parallel loops. More...
 
std::unique_ptr< PasscreateParallelLoopSpecializationPass ()
 Creates a pass that specializes parallel loop for unrolling and vectorization. More...
 
std::unique_ptr< PasscreateParallelLoopTilingPass (llvm::ArrayRef< int64_t > tileSize={}, bool noMinMaxBounds=false)
 Creates a pass which tiles innermost parallel loops. More...
 
std::unique_ptr< PasscreateForLoopRangeFoldingPass ()
 Creates a pass which folds arith ops on induction variable into loop range. More...
 
std::unique_ptr< PasscreateForToWhileLoopPass ()
 
scf::ForOp cloneWithNewYields (OpBuilder &b, scf::ForOp loop, ValueRange newIterOperands, ValueRange newYieldedValues, bool replaceLoopResults=true)
 Create a clone of loop with newIterOperands added as new initialization values and newYieldedValues added as new yielded values. More...
 
void outlineIfOp (OpBuilder &b, scf::IfOp ifOp, FuncOp *thenFn, StringRef thenFnName, 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...
 
std::unique_ptr< PasscreateShapeToShapeLowering ()
 Creates an instance of the ShapeToShapeLowering pass that legalizes Shape dialect to be convertible to Standard. 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< FunctionPasscreateRemoveShapeConstraintsPass ()
 
void populateShapeStructuralTypeConversionsAndLegality (TypeConverter &typeConverter, RewritePatternSet &patterns, ConversionTarget &target)
 Populates patterns for shape dialect structural type conversions and sets up the provided ConversionTarget with the appropriate legality configuration for the ops to get converted properly. More...
 
std::unique_ptr< FunctionPasscreateShapeBufferizePass ()
 
void populateSparsificationPatterns (RewritePatternSet &patterns, const SparsificationOptions &options=SparsificationOptions())
 Sets up sparsification rewriting rules with the given options. More...
 
void populateSparseTensorConversionPatterns (TypeConverter &typeConverter, RewritePatternSet &patterns)
 Sets up sparse tensor conversion rules. More...
 
std::unique_ptr< PasscreateSparsificationPass ()
 
std::unique_ptr< PasscreateSparseTensorConversionPass ()
 
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...
 
bool applyCmpPredicate (arith::CmpIPredicate predicate, const APInt &lhs, const APInt &rhs)
 Compute lhs pred rhs, where pred is one of the known integer comparison predicates. More...
 
bool applyCmpPredicate (arith::CmpFPredicate predicate, const APFloat &lhs, const APFloat &rhs)
 Compute lhs pred rhs, where pred is one of the known floating point comparison predicates. More...
 
Attribute getIdentityValueAttr (AtomicRMWKind kind, Type resultType, OpBuilder &builder, Location loc)
 Returns the identity value attribute associated with an AtomicRMWKind op. More...
 
Value getIdentityValue (AtomicRMWKind op, Type resultType, OpBuilder &builder, Location loc)
 Returns the identity value associated with an AtomicRMWKind op. More...
 
Value getReductionOp (AtomicRMWKind op, OpBuilder &builder, Location loc, Value lhs, Value rhs)
 Returns the value obtained by applying the reduction operation kind associated with a binary AtomicRMWKind op to lhs and rhs. More...
 
void populateComposeSubViewPatterns (OwningRewritePatternList &patterns, MLIRContext *context)
 
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 populateStdBufferizePatterns (BufferizeTypeConverter &typeConverter, RewritePatternSet &patterns)
 
std::unique_ptr< PasscreateStdBufferizePass ()
 Creates an instance of std bufferization pass. More...
 
std::unique_ptr< PasscreateFuncBufferizePass ()
 Creates an instance of func bufferization pass. More...
 
void populateTensorConstantBufferizePatterns (GlobalCreator &globalCreator, BufferizeTypeConverter &typeConverter, RewritePatternSet &patterns)
 Add patterns to bufferize tensor constants into global memrefs to the given pattern list. More...
 
std::unique_ptr< PasscreateTensorConstantBufferizePass (unsigned alignment=0)
 Creates an instance of tensor constant bufferization pass. More...
 
std::unique_ptr< PasscreateStdExpandOpsPass ()
 Creates an instance of the StdExpand pass that legalizes Std dialect ops to be convertible to LLVM. More...
 
void populateStdExpandOpsPatterns (RewritePatternSet &patterns)
 Collects a set of patterns to rewrite ops within the Std dialect. More...
 
detail::op_matcher< arith::ConstantIndexOpmatchConstantIndex ()
 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...
 
void getPositionsOfShapeOne (unsigned rank, ArrayRef< int64_t > shape, llvm::SmallDenseSet< unsigned > &dimsToProject)
 
Value getValueOrCreateConstantIndexOp (OpBuilder &b, Location loc, OpFoldResult ofr)
 Converts an OpFoldResult to a Value. More...
 
SmallVector< ValuegetValueOrCreateConstantIndexOp (OpBuilder &b, Location loc, ArrayRef< OpFoldResult > valueOrAttrVec)
 Similar to the other overload, but converts multiple OpFoldResults into Values. More...
 
void populateTensorBufferizePatterns (BufferizeTypeConverter &typeConverter, RewritePatternSet &patterns)
 
std::unique_ptr< PasscreateTensorBufferizePass ()
 Creates an instance of tensor dialect bufferization pass. 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...
 
bool isReassociationValid (ArrayRef< AffineMap > reassociation, int *invalidIndex=nullptr)
 Return true if the reassociation specification is valid, false otherwise. More...
 
ParseResult parseReshapeLikeOp (OpAsmParser &parser, OperationState &result)
 Parse a reshape-like op, i.e. More...
 
template<typename ReshapeLikeOp >
void printReshapeOp (OpAsmPrinter &p, ReshapeLikeOp op)
 Print a reshape-like op, i.e. 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...
 
template<typename OpTy >
static LogicalResult verifyReshapeLikeShapes (OpTy op, ShapedType collapsedType, ShapedType expandedType, 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...
 
void dispatchIndexOpFoldResult (OpFoldResult ofr, SmallVectorImpl< Value > &dynamicVec, SmallVectorImpl< int64_t > &staticVec, int64_t sentinel)
 Helper function to dispatch an OpFoldResult into either the dynamicVec if it is a Value or into staticVec if it is an IntegerAttr. More...
 
void dispatchIndexOpFoldResults (ArrayRef< OpFoldResult > ofrs, SmallVectorImpl< Value > &dynamicVec, SmallVectorImpl< int64_t > &staticVec, int64_t sentinel)
 Helper function to dispatch multiple OpFoldResults into either the dynamicVec (for Values) or into staticVec (for IntegerAttrs). 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< OpFoldResultgetAsOpFoldResult (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 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...
 
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...
 
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 &registry, JitRunnerConfig config={})
 Entry point for all CPU runners. More...
 
void initializeLLVMPasses ()
 Initialize LLVM passes that can be used when running MLIR code using ExecutionEngine. More...
 
void registerAllDialects (DialectRegistry &registry)
 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...
 
bool isRegionReturnLike (Operation *operation)
 Returns true if the given operation is either annotated with the ReturnLike trait or implements the RegionBranchTerminatorOpInterface. More...
 
Optional< MutableOperandRangegetMutableRegionBranchSuccessorOperands (Operation *operation, Optional< unsigned > regionIndex)
 Returns the mutable operands that are passed to the region with the given regionIndex. More...
 
Optional< OperandRangegetRegionBranchSuccessorOperands (Operation *operation, Optional< unsigned > regionIndex)
 Returns the read only operands that are passed to the region with the given regionIndex. 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...
 
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::OperandType > &values, ArrayAttr &integers)
 Pasrer hook for custom directive in assemblyFormat. More...
 
ParseResult parseOperandsOrIntegersSizesList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::OperandType > &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< AffineMapcompressUnusedDims (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::SmallDenseSet< unsigned > &unusedDims)
 Drop the dims that are not listed in unusedDims. More...
 
AffineMap compressUnusedSymbols (AffineMap map)
 Drop the symbols that are not used. More...
 
SmallVector< AffineMapcompressUnusedSymbols (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::SmallDenseSet< unsigned > &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 inverseAndBroadcastProjectedPermuation (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::SmallDenseSet< unsigned > &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...
 
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...
 
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_int_value_matcher< 1 > 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...
 
detail::constant_int_value_matcher< 0 > m_Zero ()
 Matches a constant scalar / vector splat / tensor splat integer zero. More...
 
detail::constant_int_not_value_matcher< 0 > m_NonZero ()
 Matches a constant scalar / vector splat / tensor splat integer that is any non-zero value. 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_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)
 
OpAsmPrinteroperator<< (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>
OpAsmPrinteroperator<< (OpAsmPrinter &p, const T &values)
 
OpAsmPrinteroperator<< (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)
 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())
 This function parses the textual representation of a pass pipeline, and adds the result to 'pm' on success. More...
 
std::unique_ptr< PasscreateReductionTreePass ()
 
std::unique_ptr< PasscreateOptReductionPass ()
 
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...
 
LogicalResult MlirOptMain (llvm::raw_ostream &outputStream, std::unique_ptr< llvm::MemoryBuffer > buffer, const PassPipelineCLParser &passPipeline, DialectRegistry &registry, 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 &registry, 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 &registry, bool preloadDialectsInContext=false)
 Implementation for tools like mlir-opt. 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 &registry)
 Registers all dialects that can be translated to LLVM IR and the corresponding translation interfaces. More...
 
void registerAMXDialectTranslation (DialectRegistry &registry)
 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 &registry)
 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 &registry)
 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 &registry)
 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 &registry)
 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 &registry)
 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 &registry)
 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 &registry)
 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 &registry)
 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...
 
OwningModuleRef translateLLVMIRToModule (std::unique_ptr< llvm::Module > llvmModule, MLIRContext *context)
 Convert the given LLVM module into MLIR's LLVM dialect. More...
 
LogicalResult MlirLspServerMain (int argc, char **argv, DialectRegistry &registry)
 Implementation for tools like mlir-lsp-server. More...
 
LogicalResult mlirReduceMain (int argc, char **argv, MLIRContext &context)
 
void populateBufferizeMaterializationLegality (ConversionTarget &target)
 Marks ops used by bufferization for type conversion materializations as "legal" in the given ConversionTarget. More...
 
void populateEliminateBufferizeMaterializationsPatterns (BufferizeTypeConverter &typeConverter, RewritePatternSet &patterns)
 Populate patterns to eliminate bufferize materializations. More...
 
void populateFunctionLikeTypeConversionPattern (StringRef functionLikeOpName, RewritePatternSet &patterns, TypeConverter &converter)
 Add a pattern to the given pattern list to convert the signature of a FunctionLike op with the given type converter. More...
 
template<typename FuncOpT >
void populateFunctionLikeTypeConversionPattern (RewritePatternSet &patterns, TypeConverter &converter)
 
void populateFuncOpTypeConversionPattern (RewritePatternSet &patterns, TypeConverter &converter)
 Add a pattern to the given pattern list to convert the signature of a FuncOp with the given type converter. More...
 
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)
 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)
 
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< PasscreateLocationSnapshotPass (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< PasscreateLocationSnapshotPass ()
 Overload utilizing pass options for initialization. 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 loopUnrollByFactor (scf::ForOp forOp, uint64_t unrollFactor, function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn=nullptr)
 Unrolls 'forOp' by 'unrollFactor', returns success if the loop is unrolled. 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...
 
void getPerfectlyNestedLoops (SmallVectorImpl< scf::ForOp > &nestedLoops, scf::ForOp root)
 
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/scf::ForOp to its containing block if the loop was known to have a single iteration. More...
 
LogicalResult promoteIfSingleIteration (scf::ForOp forOp)
 Promotes the loop body of a forOp to its containing block if the forOp it can be determined that the loop has a single iteration. More...
 
void promoteSingleIterationLoops (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 (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)
 
SmallVector< Loops, 8 > tile (ArrayRef< scf::ForOp > forOps, ArrayRef< Value > sizes, ArrayRef< scf::ForOp > targets)
 
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...
 
Loops tile (ArrayRef< scf::ForOp > forOps, ArrayRef< Value > sizes, scf::ForOp target)
 
Loops tilePerfectlyNested (scf::ForOp rootForOp, ArrayRef< Value > sizes)
 Tile a nest of scf::ForOp loops rooted at rootForOp with the given (parametric) sizes. More...
 
uint64_t 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. More...
 
uint64_t 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. More...
 
LogicalResult generateCopyForMemRegion (const MemRefRegion &memrefRegion, Operation *analyzedOp, const AffineCopyOptions &copyOptions, CopyGenerateResult &result)
 generateCopyForMemRegion is similar to affineDataCopyGenerate, but works with a single memref region. More...
 
TileLoops extractFixedOuterLoops (scf::ForOp rootFOrOp, ArrayRef< int64_t > sizes)
 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...
 
void coalesceLoops (MutableArrayRef< scf::ForOp > loops)
 Replace a perfect nest of "for" loops with a single linearized loop. More...
 
LogicalResult coalesceLoops (MutableArrayRef< AffineForOp > 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...
 
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 (FuncOp func, std::vector< SmallVector< AffineForOp, 2 >> &depthToLoops)
 Gathers all AffineForOps in 'builtin.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...
 
LogicalResult moveLoopInvariantCode (LoopLikeOpInterface looplike)
 Move loop invariant code out of looplike. More...
 
std::unique_ptr< PasscreateBufferDeallocationPass ()
 Creates an instance of the BufferDeallocation pass to free all allocated buffers. More...
 
std::unique_ptr< PasscreateBufferHoistingPass ()
 Creates a pass that moves allocations upwards to reduce the number of required copies that are inserted during the BufferDeallocation pass. More...
 
std::unique_ptr< PasscreateBufferLoopHoistingPass ()
 Creates a pass that moves allocations upwards out of loops. More...
 
std::unique_ptr< PasscreatePromoteBuffersToStackPass (unsigned maxAllocSizeInBytes=1024, unsigned bitwidthOfIndexType=64, unsigned maxRankOfAllocatedMemRef=1)
 Creates a pass that promotes heap-based allocations to stack-based ones. More...
 
std::unique_ptr< PasscreatePromoteBuffersToStackPass (std::function< bool(Value)> isSmallAlloc)
 Creates a pass that promotes heap-based allocations to stack-based ones. More...
 
std::unique_ptr< FunctionPasscreateFinalizingBufferizePass ()
 Creates a pass that finalizes a partial bufferization by removing remaining tensor_load and buffer_cast operations. More...
 
std::unique_ptr< PasscreateBufferResultsToOutParamsPass ()
 Creates a pass that converts memref function results to out-params. More...
 
std::unique_ptr< PasscreateCanonicalizerPass ()
 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< PasscreateCanonicalizerPass (const GreedyRewriteConfig &config)
 Creates an instance of the Canonicalizer pass with the specified config. More...
 
std::unique_ptr< PasscreateCSEPass ()
 Creates a pass to perform common sub expression elimination. More...
 
std::unique_ptr< OperationPass< 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< PasscreateLoopInvariantCodeMotionPass ()
 Creates a loop invariant code motion pass that hoists loop invariant instructions out of the loop. More...
 
std::unique_ptr< OperationPass< FuncOp > > createPipelineDataTransferPass ()
 Creates a pass to pipeline explicit movement of data across levels of the memory hierarchy. More...
 
std::unique_ptr< OperationPass< FuncOp > > createLoopCoalescingPass ()
 Creates a pass that transforms perfectly nested loops with independent bounds into a single loop. More...
 
std::unique_ptr< PasscreateParallelLoopCollapsingPass ()
 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< PasscreateStripDebugInfoPass ()
 Creates a pass to strip debug information from a function. More...
 
std::unique_ptr< PasscreatePrintOpStatsPass ()
 Creates a pass which prints the list of ops and the number of occurrences in the module. More...
 
std::unique_ptr< PasscreateInlinerPass ()
 Creates a pass which inlines calls and callable operations as defined by the CallGraph. More...
 
std::unique_ptr< PasscreateInlinerPass (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< PasscreateInlinerPass (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< PasscreateSCCPPass ()
 Creates a pass which performs sparse conditional constant propagation over nested operations. More...
 
std::unique_ptr< PasscreateSymbolDCEPass ()
 Creates a pass which delete symbol operations that are unreachable. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createNormalizeMemRefsPass ()
 Creates an interprocedural pass to normalize memrefs to have a trivial (identity) layout map. 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 &region)
 Replace all uses of orig within the given region with replacement. More...
 
void visitUsedValuesDefinedAbove (Region &region, 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 &region, 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...
 
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...
 
OperationcreateComposedAffineApplyOp (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...
 
std::unique_ptr< PasscreatePrintOpGraphPass (raw_ostream &os=llvm::errs())
 Creates a pass to print op graphs. More...
 
LogicalResult mlirTranslateMain (int argc, char **argv, llvm::StringRef toolName)
 Translate to/from an MLIR module from/to an external representation (e.g. More...
 
static void modEntryColumnOperation (Matrix &m, unsigned row, unsigned sourceCol, unsigned targetCol, Matrix &otherMatrix)
 
template<typename ConcreteDialect >
void registerDialect (DialectRegistry &registry)
 
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...
 
std::function< llvm::Error(llvm::Module *)> makeLLVMPassesTransformer (llvm::ArrayRef< const llvm::PassInfo *> llvmPasses, llvm::Optional< unsigned > mbOptLevel, llvm::TargetMachine *targetMachine, unsigned optPassesInsertPos=0)
 Create a module transformer function for MLIR ExecutionEngine that runs LLVM IR passes explicitly specified, plus an optional optimization level, Any optimization passes, if present, will be inserted before the pass at position optPassesInsertPos. More...
 
const int64_t kUnknownNumRegionInvocations = -1
 
const int nullIndex = std::numeric_limits<int>::max()
 

Detailed Description

Include the generated interface declarations.

Typedef Documentation

◆ AllocFunType

using mlir::AllocFunType = typedef llvm::function_ref<void *(size_t)>

Definition at line 36 of file MemRefUtils.h.

◆ AttributeStorageAllocator

Definition at line 168 of file AttributeSupport.h.

◆ BlobGenerator

using mlir::BlobGenerator = typedef std::function<OwnedBlob(const std::string &, Location, StringRef)>

Definition at line 43 of file GPUCommonPass.h.

◆ ChunkBufferHandler

using mlir::ChunkBufferHandler = typedef function_ref<LogicalResult( std::unique_ptr<llvm::MemoryBuffer> chunkBuffer, raw_ostream &os)>

Definition at line 28 of file ToolUtilities.h.

◆ DataLayoutEntryKey

using mlir::DataLayoutEntryKey = typedef llvm::PointerUnion<Type, StringAttr>

Definition at line 25 of file DataLayoutInterfaces.h.

◆ DataLayoutEntryList

using mlir::DataLayoutEntryList = typedef llvm::SmallVector<DataLayoutEntryInterface, 4>

Definition at line 28 of file DataLayoutInterfaces.h.

◆ DataLayoutEntryListRef

using mlir::DataLayoutEntryListRef = typedef llvm::ArrayRef<DataLayoutEntryInterface>

Definition at line 29 of file DataLayoutInterfaces.h.

◆ DefaultAttributeStorage

Default storage type for attributes that require no additional initialization or storage.

Definition at line 160 of file AttributeSupport.h.

◆ DefaultTypeStorage

Default storage type for types that require no additional initialization or storage.

Definition at line 149 of file TypeSupport.h.

◆ DenseMap

template<typename KeyT , typename ValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
using mlir::DenseMap = typedef llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>

Definition at line 99 of file LLVM.h.

◆ DenseMapInfo

template<typename T , typename Enable = void>
using mlir::DenseMapInfo = typedef llvm::DenseMapInfo<T, Enable>

Definition at line 95 of file LLVM.h.

◆ DenseSet

template<typename ValueT , typename ValueInfoT = DenseMapInfo<ValueT>>
using mlir::DenseSet = typedef llvm::DenseSet<ValueT, ValueInfoT>

Definition at line 101 of file LLVM.h.

◆ DialectAllocatorFunction

using mlir::DialectAllocatorFunction = typedef std::function<Dialect *(MLIRContext *)>

Definition at line 29 of file Dialect.h.

◆ DialectAllocatorFunctionRef

Definition at line 30 of file Dialect.h.

◆ DialectInterfaceAllocatorFunction

using mlir::DialectInterfaceAllocatorFunction = typedef std::function<std::unique_ptr<DialectInterface>(Dialect *)>

Definition at line 32 of file Dialect.h.

◆ Direction

Definition at line 15 of file Simplex.cpp.

◆ DominanceInfoNode

using mlir::DominanceInfoNode = typedef llvm::DomTreeNodeBase<Block>

Definition at line 29 of file Dominance.h.

◆ ElementWiseVisitor

template<typename T >
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.

◆ FilterFunctionType

using mlir::FilterFunctionType = typedef std::function<bool(Operation &)>

A NestedPattern is a nested operation walker that:

  1. recursively matches a substructure in the tree;
  2. uses a filter function to refine matches with extra semantic constraints (passed via a lambda of type FilterFunctionType);
  3. TODO: optionally applies actions (lambda).

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.

◆ function_ref

template<typename Fn >
using mlir::function_ref = typedef llvm::function_ref<Fn>

Definition at line 125 of file LLVM.h.

◆ GenFunction

using mlir::GenFunction = typedef std::function<bool(const llvm::RecordKeeper &recordKeeper, raw_ostream &os)>

Generator function to invoke.

Definition at line 24 of file GenInfo.h.

◆ Identifier

typedef StringAttr mlir::Identifier

NOTICE: Identifier is deprecated and usages of it should be replaced with StringAttr.

Definition at line 19 of file Attributes.h.

◆ Loops

using mlir::Loops = typedef SmallVector<scf::ForOp, 8>

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.

Returns the new AffineForOps, one per each of (forOps, targets) pair, nested immediately under each of targets.

Definition at line 149 of file LoopUtils.h.

◆ LoweringCallback

using mlir::LoweringCallback = typedef std::function<std::unique_ptr<llvm::Module>( Operation *, llvm::LLVMContext &, StringRef)>

Definition at line 45 of file GPUCommonPass.h.

◆ ObjectInterfaceAllocatorFunction

using mlir::ObjectInterfaceAllocatorFunction = typedef std::function<void(MLIRContext *)>

Definition at line 33 of file Dialect.h.

◆ OpAsmSetValueNameFn

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 1153 of file OpImplementation.h.

◆ OperandElementTypeRange

Definition at line 85 of file TypeUtilities.h.

◆ OwnedBlob

using mlir::OwnedBlob = typedef std::unique_ptr<std::vector<char> >

Definition at line 41 of file GPUCommonPass.h.

◆ OwningRewritePatternList

Definition at line 28 of file AffineToStandard.h.

◆ PassAllocatorFunction

using mlir::PassAllocatorFunction = typedef std::function<std::unique_ptr<Pass>()>

Definition at line 37 of file PassRegistry.h.

◆ PassPipelineFn

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.

◆ PassRegistryFunction

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 36 of file PassRegistry.h.

◆ PDLConstraintFunction

using mlir::PDLConstraintFunction = typedef std::function<LogicalResult( ArrayRef<PDLValue>, ArrayAttr, PatternRewriter &)>

A generic PDL pattern constraint function.

This function applies a constraint to a given set of opaque PDLValue entities. The second parameter is a set of constant value parameters specified in Attribute form. Returns success if the constraint successfully held, failure otherwise.

Definition at line 589 of file PatternMatch.h.

◆ PDLRewriteFunction

using mlir::PDLRewriteFunction = typedef std::function<void( ArrayRef<PDLValue>, ArrayAttr, PatternRewriter &, PDLResultList &)>

A native PDL rewrite function.

This function performs a rewrite on the given set of values and constant parameters. 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 596 of file PatternMatch.h.

◆ PDLSingleEntityConstraintFunction

using mlir::PDLSingleEntityConstraintFunction = typedef std::function<LogicalResult(PDLValue, ArrayAttr, PatternRewriter &)>

A generic PDL pattern constraint function.

This function applies a constraint to a given opaque PDLValue entity. The second parameter is a set of constant value parameters specified in Attribute form. Returns success if the constraint successfully held, failure otherwise.

Definition at line 602 of file PatternMatch.h.

◆ ReassociationExprs

Definition at line 26 of file ReshapeOpsUtils.h.

◆ ReassociationIndices

using mlir::ReassociationIndices = typedef SmallVector<int64_t, 2>

Definition at line 24 of file ReshapeOpsUtils.h.

◆ ReassociationIndicesRef

using mlir::ReassociationIndicesRef = typedef ArrayRef<int64_t>

Definition at line 25 of file ReshapeOpsUtils.h.

◆ ReductionLoopMap

Definition at line 31 of file Utils.h.

◆ ReifiedRankedShapedTypeDims

Definition at line 28 of file InferTypeOpInterface.h.

◆ ResultElementTypeRange

Definition at line 98 of file TypeUtilities.h.

◆ SetVector

template<typename T , typename Vector = std::vector<T>, typename Set = DenseSet<T>>
using mlir::SetVector = typedef llvm::SetVector<T, Vector, Set>

Definition at line 104 of file LLVM.h.

◆ StringSet

template<typename AllocatorTy = llvm::MallocAllocator>
using mlir::StringSet = typedef llvm::StringSet<AllocatorTy>

Definition at line 106 of file LLVM.h.

◆ StringSwitch

template<typename T , typename R = T>
using mlir::StringSwitch = typedef llvm::StringSwitch<T, R>

Definition at line 116 of file LLVM.h.

◆ TileLoops

using mlir::TileLoops = typedef std::pair<Loops, Loops>

Definition at line 150 of file LoopUtils.h.

◆ TransitiveFilter

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.

◆ TranslateFromMLIRFunction

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 47 of file Translation.h.

◆ TranslateFunction

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 55 of file Translation.h.

◆ TranslateSourceMgrToMLIRFunction

using mlir::TranslateSourceMgrToMLIRFunction = typedef std::function<OwningModuleRef(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 35 of file Translation.h.

◆ TranslateStringRefToMLIRFunction

using mlir::TranslateStringRefToMLIRFunction = typedef std::function<OwningModuleRef(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 42 of file Translation.h.

◆ TypeRangeRangeIterator

using mlir::TypeRangeRangeIterator = typedef llvm::mapped_iterator<llvm::iota_range<unsigned>::iterator, std::function<TypeRange(unsigned)> >

Definition at line 97 of file TypeRange.h.

◆ TypeStorageAllocator

This is a utility allocator used to allocate memory for instances of derived Types.

Definition at line 157 of file TypeSupport.h.

◆ TypeSwitch

template<typename T , typename ResultT = void>
using mlir::TypeSwitch = typedef llvm::TypeSwitch<T, ResultT>

Definition at line 119 of file LLVM.h.

◆ VectorizableLoopFun

using mlir::VectorizableLoopFun = typedef std::function<bool(AffineForOp)>

Definition at line 62 of file LoopAnalysis.h.

Enumeration Type Documentation

◆ AffineExprKind

enum mlir::AffineExprKind
strong
Enumerator
Add 
Mul 

RHS of mul is always a constant or a symbolic expression.

Mod 

RHS of mod is always a constant or a symbolic expression with a positive value.

FloorDiv 

RHS of floordiv is always a constant or a symbolic expression.

CeilDiv 

RHS of ceildiv is always a constant or a symbolic expression.

LAST_AFFINE_BINARY_OP 

This is a marker for the last affine binary op.

The range of binary op's is expected to be this element and earlier.

Constant 

Constant integer.

DimId 

Dimensional identifier.

SymbolId 

Symbolic identifier.

Definition at line 40 of file AffineExpr.h.

◆ ChangeResult

enum mlir::ChangeResult
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.

◆ DiagnosticSeverity

Defines the different supported severity of a diagnostic.

Enumerator
Note 
Warning 
Error 
Remark 

Definition at line 40 of file Diagnostics.h.

◆ FusionMode

Fusion mode to attempt.

The default mode Greedy does both producer-consumer and sibling fusion.

Enumerator
Greedy 
ProducerConsumer 
Sibling 

Definition at line 30 of file Passes.h.

◆ IteratorType

enum mlir::IteratorType
strong

Typed representation for loop type strings.

Enumerator
Parallel 
Reduction 

Definition at line 126 of file StructuredOpsUtils.h.

◆ PassDisplayMode

enum mlir::PassDisplayMode
strong

An enum describing the different display modes for the information within the pass manager.

Enumerator
List 
Pipeline 

Definition at line 160 of file PassManager.h.

◆ RegionKind

enum mlir::RegionKind
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.

◆ SparseParallelizationStrategy

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 

Definition at line 29 of file Passes.h.

◆ SparseVectorizationStrategy

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 

Definition at line 42 of file Passes.h.

◆ 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.

◆ WalkOrder

enum mlir::WalkOrder
strong

Traversal order for region, block and operation walk utilities.

Enumerator
PreOrder 
PostOrder 

Definition at line 62 of file Visitors.h.

Function Documentation

◆ affineDataCopyGenerate() [1/2]

uint64_t 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.

Returns the total size of fast memory space buffers used. 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.

Definition at line 2959 of file LoopUtils.cpp.

References mlir::Operation::emitError(), failed(), mlir::AffineCopyOptions::fastMemCapacityBytes, findHighestBlockForPlacement(), generateCopy(), getFullMemRefAsRegion(), mlir::Operation::getLoc(), getNestingDepth(), mlir::AffineCopyOptions::slowMemorySpace, and succeeded().

Referenced by affineDataCopyGenerate(), and createAffineDataCopyGenerationPass().

◆ affineDataCopyGenerate() [2/2]

uint64_t 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 3150 of file LoopUtils.cpp.

References affineDataCopyGenerate().

◆ affineForOpBodySkew()

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 320 of file LoopUtils.cpp.

References getConstantTripCount(), isOpwiseShiftValid(), and success().

Referenced by findMatchingStartFinishInsts().

◆ affineParallelize()

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 133 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.

◆ alignAffineMapWithValues()

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 3658 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(), mlir::FlatAffineConstraints::numSymbols, and mlir::AffineMap::replaceDimsAndSymbols().

Referenced by alignAndAddBound(), and mlir::FlatAffineValueConstraints::computeAlignedMap().

◆ applyAnalysisConversion() [1/2]

LogicalResult mlir::applyAnalysisConversion ( ArrayRef< Operation *>  ops,
ConversionTarget target,
const FrozenRewritePatternSet patterns,
DenseSet< Operation *> &  convertedOps 
)

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'.

Definition at line 3275 of file DialectConversion.cpp.

Referenced by mlir::ConversionTarget::addIllegalDialect(), and applyAnalysisConversion().

◆ applyAnalysisConversion() [2/2]

LogicalResult mlir::applyAnalysisConversion ( Operation op,
ConversionTarget target,
const FrozenRewritePatternSet patterns,
DenseSet< Operation *> &  convertedOps 
)

Definition at line 3284 of file DialectConversion.cpp.

References applyAnalysisConversion().

◆ applyCmpPredicate() [1/2]

bool mlir::applyCmpPredicate ( arith::CmpIPredicate  predicate,
const APInt &  lhs,
const APInt &  rhs 
)

Compute lhs pred rhs, where pred is one of the known integer comparison predicates.

◆ applyCmpPredicate() [2/2]

bool mlir::applyCmpPredicate ( arith::CmpFPredicate  predicate,
const APFloat &  lhs,
const APFloat &  rhs 
)

Compute lhs pred rhs, where pred is one of the known floating point comparison predicates.

◆ applyDefaultTimingManagerCLOptions()

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().

◆ applyDefaultTimingPassManagerCLOptions()

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 149 of file PassManagerOptions.cpp.

References applyDefaultTimingManagerCLOptions(), and mlir::PassManager::enableTiming().

Referenced by mlir::PassManager::IRPrinterConfig::getOpPrintingFlags().

◆ applyFullConversion() [1/2]

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 3260 of file DialectConversion.cpp.

Referenced by mlir::ConversionTarget::addIllegalDialect(), applyFullConversion(), populateEliminateBufferizeMaterializationsPatterns(), mlir::linalg::populateLinalgToStandardConversionPatterns(), populateSPIRVLayoutInfoPatterns(), and sourceMaterializationCallback().

◆ applyFullConversion() [2/2]

LogicalResult mlir::applyFullConversion ( Operation op,
ConversionTarget target,
const FrozenRewritePatternSet patterns 
)

Definition at line 3266 of file DialectConversion.cpp.

References applyFullConversion().

◆ applyOpPatternsAndFold() [1/2]

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 643 of file GreedyPatternRewriteDriver.cpp.

References failed(), mlir::Operation::getContext(), and mlir::GreedyRewriteConfig::maxIterations.

Referenced by applyPatterns(), applyPatternsAndFoldGreedily(), createAffineDataCopyGenerationPass(), createSimplifyAffineStructuresPass(), and hoistAffineIfOp().

◆ applyOpPatternsAndFold() [2/2]

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 660 of file GreedyPatternRewriteDriver.cpp.

◆ applyPartialConversion() [1/2]

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 3240 of file DialectConversion.cpp.

Referenced by mlir::ConversionTarget::addIllegalDialect(), addResumeFunction(), applyPartialConversion(), convertCmpPredicate(), mlir::linalg::createLinalgOpOnBuffers(), encodeKernelName(), funcsToCoroutines(), lowerEntryPointABIAttr(), populateAffineToVectorConversionPatterns(), mlir::arith::populateArithmeticToSPIRVPatterns(), populateComplexToLLVMConversionPatterns(), populateComplexToStandardConversionPatterns(), mlir::linalg::populateElementwiseToLinalgConversionPatterns(), populateLinalgToLLVMConversionPatterns(), populateLoopToStdConversionPatterns(), populateMathToLibmConversionPatterns(), populateMemRefToLLVMConversionPatterns(), populateOpenACCToLLVMConversionPatterns(), populateOpenACCToSCFConversionPatterns(), populateOpenMPToLLVMConversionPatterns(), populateStdBufferizePatterns(), populateStdToLLVMConversionPatterns(), populateTensorBufferizePatterns(), populateTensorConstantBufferizePatterns(), and populateVectorToROCDLConversionPatterns().

◆ applyPartialConversion() [2/2]

LogicalResult mlir::applyPartialConversion ( Operation op,
ConversionTarget target,
const FrozenRewritePatternSet patterns,
DenseSet< Operation *> *  unconvertedOps = nullptr 
)

Definition at line 3249 of file DialectConversion.cpp.

References applyPartialConversion().

◆ applyPassManagerCLOptions()

void mlir::applyPassManagerCLOptions ( PassManager pm)

Apply any values provided to the pass manager options that were registered with 'registerPassManagerOptions'.

Definition at line 132 of file PassManagerOptions.cpp.

References mlir::PassManager::enableCrashReproducerGeneration(), and mlir::PassManager::enableStatistics().

Referenced by mlir::PassManager::IRPrinterConfig::getOpPrintingFlags(), and performActions().

◆ applyPatternsAndFoldGreedily() [1/2]

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 372 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 applyEnablingTransformations(), applyExtractSliceOfPadTensorSwapPattern(), applyPatternsAndFoldGreedily(), mlir::linalg::applyStagedPatterns(), convertVectorToMMAOps(), doSequentialDispatch(), mlir::linalg::generalizeNamedOp(), hoistAffineIfOp(), mlir::linalg::hoistRedundantVectorTransfersOnTensor(), isShapePreserving(), linalgOpToLoopsImpl(), populateConvertShapeConstraintsConversionPatterns(), mlir::linalg::populateFoldUnitExtentDimsPatterns(), mlir::linalg::populateInlineConstantOperandsPatterns(), mlir::memref::populateResolveShapedTypeResultDimsPatterns(), populateVectorToSCFConversionPatterns(), reshapeLowerToHigher(), mlir::linalg::skipUnitDimReshape(), and sourceMaterializationCallback().

◆ applyPatternsAndFoldGreedily() [2/2]

LogicalResult mlir::applyPatternsAndFoldGreedily ( Operation op,
const FrozenRewritePatternSet patterns,
GreedyRewriteConfig  config = GreedyRewriteConfig() 
)
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().

◆ applyPermutationMap()

template<typename T >
SmallVector<T> mlir::applyPermutationMap ( AffineMap  map,
llvm::ArrayRef< T >  source 
)

Apply a permutation from map to source and return the result.

Definition at line 530 of file AffineMap.h.

References mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getResults(), and mlir::AffineMap::isProjectedPermutation().

Referenced by buildVectorWrite().

◆ areValuesDefinedAbove()

template<typename Range >
bool mlir::areValuesDefinedAbove ( Range  values,
Region limit 
)

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().

◆ barePtrFuncArgTypeConverter()

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 528 of file TypeConverter.cpp.

References mlir::LLVMTypeConverter::convertCallingConventionType(), failure(), and success().

Referenced by mlir::LLVMTypeConverter::convertFunctionSignature().

◆ bindDims()

template<typename... AffineExprTy>
void mlir::bindDims ( MLIRContext ctx,
AffineExprTy &...  exprs 
)

◆ bindSymbols()

template<typename... AffineExprTy>
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(), HoistingAnalysis::getPackedTensorSizes(), peelForLoop(), and peelTiledLoop().

◆ boundCheckLoadOrStoreOp()

template<typename LoadOrStoreOpPointer >
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().

◆ buildAffineLoopNest() [1/2]

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 1902 of file AffineOps.cpp.

References buildAffineLoopFromConstants(), and buildAffineLoopNestImpl().

Referenced by mlir::linalg::GenerateLoopNest< LoopTy >::doit().

◆ buildAffineLoopNest() [2/2]

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 1910 of file AffineOps.cpp.

References buildAffineLoopFromValues(), and buildAffineLoopNestImpl().

◆ buildSliceTripCountMap()

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 994 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().

◆ canFuseLoops()

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().

◆ canonicalizeMapAndOperands()

void mlir::canonicalizeMapAndOperands ( AffineMap map,
SmallVectorImpl< Value > *  operands 
)

◆ canonicalizeSetAndOperands()

void mlir::canonicalizeSetAndOperands ( IntegerSet set,
SmallVectorImpl< Value > *  operands 
)

Canonicalizes an integer set the same way canonicalizeMapAndOperands does for affine maps.

Definition at line 858 of file AffineOps.cpp.

References mlir::RewritePatternSet::add(), canonicalizeMapAndOperands(), composeAffineMapAndOperands(), failure(), mlir::RewriterBase::replaceOpWithNewOp(), and success().

Referenced by createSeparationCondition(), mlir::AffineDmaWaitOp::getTagMapAttrName(), and print().

◆ canonicalizeStridedLayout()

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 1027 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(), and computeReshapeCollapsedType().

◆ canonicalizeSubViewPart()

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().

◆ ceil()

int64_t mlir::ceil ( Fraction  f)
inline

◆ ceilDiv()

int64_t mlir::ceilDiv ( int64_t  lhs,
int64_t  rhs 
)
inline

◆ checkMemrefAccessDependence()

DependenceResult mlir::checkMemrefAccessDependence ( const MemRefAccess srcAccess,
const MemRefAccess dstAccess,
unsigned  loopDepth,
FlatAffineValueConstraints dependenceConstraints,
SmallVector< DependenceComponent, 2 > *  dependenceComponents,
bool  allowRAR = false 
)

◆ cloneWithNewYields()

scf::ForOp mlir::cloneWithNewYields ( OpBuilder b,
scf::ForOp  loop,
ValueRange  newIterOperands,
ValueRange  newYieldedValues,
bool  replaceLoopResults = true 
)

Create a clone of loop with newIterOperands added as new initialization values and newYieldedValues added as new yielded values.

The returned ForOp has newYieldedValues.size() new result values. The loop induction variable and newIterOperands are remapped to the new induction variable and the new entry block arguments respectively.

Additionally, if replaceLoopResults is true, all uses of loop.getResults() are replaced with the first loop.getNumResults() return values respectively. This additional replacement is provided as a convenience to update the consumers of loop, in the case e.g. when loop is soon to be deleted.

Return the cloned loop.

This convenience function is useful to factorize common mechanisms related to hoisting roundtrips to memory into yields. It does not perform any legality checks.

Prerequisite: newYieldedValues.size() == newYieldedValues.size().

Definition at line 25 of file Utils.cpp.

References mlir::OpBuilder::clone(), mlir::OpBuilder::create(), mlir::BlockAndValueMapping::map(), mlir::Operation::replaceAllUsesWith(), mlir::OpBuilder::setInsertionPoint(), and mlir::OpBuilder::setInsertionPointToStart().

Referenced by hoistReadWrite(), and mlir::linalg::hoistRedundantVectorTransfers().

◆ coalesceLoops() [1/2]

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 2155 of file LoopUtils.cpp.

References mlir::OpBuilder::create(), normalizeLoop(), replaceAllUsesInRegionWith(), and mlir::OpBuilder::setInsertionPointToStart().

◆ coalesceLoops() [2/2]

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 2211 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().

◆ collapseParallelLoops()

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 2325 of file LoopUtils.cpp.

References mlir::OpBuilder::atBlockBegin(), mlir::OpBuilder::create(), normalizeLoop(), and replaceAllUsesInRegionWith().

◆ compare()

int mlir::compare ( Fraction  x,
Fraction  y 
)
inline

Three-way comparison between two fractions.

Returns +1, 0, and -1 if the first fraction is greater than, equal to, or less than the second fraction, respectively.

Definition at line 46 of file Fraction.h.

References mlir::Fraction::den, and mlir::Fraction::num.

Referenced by mlir::impl::findAttrSorted(), mlir::detail::InterfaceMap::insert(), matchSelectReduction(), operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

◆ composeReassociationIndices()

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 148 of file ReshapeOpsUtils.cpp.

Referenced by getReassociationAttrName(), and mlir::CollapseReshapeOps< ReshapeOpTy >::matchAndRewrite().

◆ compressDims()

AffineMap mlir::compressDims ( AffineMap  map,
const llvm::SmallDenseSet< unsigned > &  unusedDims 
)

◆ compressSymbols()

AffineMap mlir::compressSymbols ( AffineMap  map,
const llvm::SmallDenseSet< unsigned > &  unusedSymbols 
)

◆ compressUnusedDims() [1/2]

AffineMap mlir::compressUnusedDims ( AffineMap  map)

◆ compressUnusedDims() [2/2]

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 611 of file AffineMap.cpp.

References compressUnusedDims(), and compressUnusedImpl().

◆ compressUnusedSymbols() [1/2]

AffineMap mlir::compressUnusedSymbols ( AffineMap  map)

◆ compressUnusedSymbols() [2/2]

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 649 of file AffineMap.cpp.

References compressUnusedImpl(), and compressUnusedSymbols().

◆ computeElementOffsetsFromVectorSliceOffsets()

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 87 of file VectorUtils.cpp.

Referenced by getVectorOffset().

◆ computeMaxLinearIndex()

int64_t mlir::computeMaxLinearIndex ( ArrayRef< int64_t >  basis)

Return the number of elements of basis, 0 if empty.

Definition at line 45 of file VectorUtils.cpp.

Referenced by extractVector(), and handleMultidimensionalVectors().

◆ computeRankReductionMask()

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 568 of file BuiltinTypes.cpp.

Referenced by isRankReducedType(), and mlir::VectorType::Builder::operator Type().

◆ computeSliceUnion()

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::FlatAffineConstraints::getNumDimAndSymbolIds(), mlir::FlatAffineConstraints::getNumDimIds(), mlir::FlatAffineConstraints::getNumLocalIds(), mlir::FlatAffineConstraints::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().

◆ computeStrides()

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 52 of file VectorUtils.cpp.

References ceilDiv().

Referenced by getVectorOffset(), and handleMultidimensionalVectors().

◆ concatAffineMaps()

AffineMap mlir::concatAffineMaps ( ArrayRef< AffineMap maps)

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,

{
(i, j, k) -> (i, k),
(i, j, k) -> (k, j),
(i, j, k) -> (i, j)
}

Returns the map:

(i, j, k) -> (i, k, k, j, i, j)

Definition at line 718 of file AffineMap.cpp.

Referenced by fuseWithReshapeByExpansion(), mlir::MutableAffineMap::getContext(), replaceUnitDimIndexOps(), replaceUnitDims(), and replaceUnitExtents().

◆ configureAMXLegalizeForExportTarget()

void mlir::configureAMXLegalizeForExportTarget ( LLVMConversionTarget target)

Configure the target to support lowering AMX ops to ops that map to LLVM intrinsics.

Definition at line 221 of file LegalizeForLLVMExport.cpp.

References mlir::ConversionTarget::addIllegalOp(), and mlir::ConversionTarget::addLegalOp().

◆ configureArmSVELegalizeForExportTarget()

void mlir::configureArmSVELegalizeForExportTarget ( LLVMConversionTarget target)

◆ configureGpuToNVVMConversionLegality()

void mlir::configureGpuToNVVMConversionLegality ( ConversionTarget target)

◆ configureGpuToROCDLConversionLegality()

void mlir::configureGpuToROCDLConversionLegality ( ConversionTarget target)

◆ configureParallelLoopToGPULegality()

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 675 of file SCFToGPU.cpp.

References mlir::ConversionTarget::addDynamicallyLegalOp(), mlir::ConversionTarget::addLegalDialect(), mlir::gpu::getMappingAttrName(), and kVisitedAttrName.

◆ configureX86VectorLegalizeForExportTarget()

void mlir::configureX86VectorLegalizeForExportTarget ( LLVMConversionTarget target)

Configure the target to support lowering X86Vector ops to ops that map to LLVM intrinsics.

Definition at line 169 of file LegalizeForLLVMExport.cpp.

References mlir::ConversionTarget::addIllegalOp(), and mlir::ConversionTarget::addLegalOp().

Referenced by mlir::x86vector::avx2::LoweringOptions::setTransposeOptions().

◆ constFoldBinaryOp()

template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref<ElementValueT(ElementValueT, ElementValueT)>>
Attribute mlir::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.

Definition at line 30 of file CommonFolders.h.

◆ convertAffineLoopNestToGPULaunch()

LogicalResult mlir::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.

Map numBlockDims outer loops to GPU blocks and numThreadDims to GPU threads. The bounds of the loops that are mapped should be independent of the induction variables of the other mapped loops.

No check on the size of the block or grid, or on the validity of parallelization is performed, it is under the responsibility of the caller to strip-mine the loops and to perform the dependence analysis before calling the conversion.

Definition at line 301 of file SCFToGPU.cpp.

References convertAffineLoopNestToGPULaunch().

◆ convertMMAToLLVMType()

LLVM::LLVMStructType mlir::convertMMAToLLVMType ( gpu::MMAMatrixType  type)

Return the LLVMStructureType corresponding to the MMAMatrixType type.

Definition at line 364 of file WmmaOpsToNvvm.cpp.

References getElementType(), mlir::LLVM::LLVMStructType::getLiteral(), mlir::gpu::MMAMatrixType::getOperand(), and inferMMAType().

◆ convertReassociationIndicesToExprs()

SmallVector< SmallVector< AffineExpr, 2 >, 2 > mlir::convertReassociationIndicesToExprs ( MLIRContext context,
ArrayRef< ReassociationIndices reassociationIndices 
)

Convert reassociation indices to affine expressions.

Definition at line 185 of file ReshapeOpsUtils.cpp.

References getAffineDimExpr().

Referenced by computeReshapeCollapsedType(), computeTensorReshapeCollapsedType(), getMaxPosOfType(), getReassociationAttrName(), and verify().

◆ convertReassociationMapsToIndices()

SmallVector< ReassociationIndices, 2 > mlir::convertReassociationMapsToIndices ( OpBuilder b,
ArrayRef< ReassociationExprs reassociationExprs 
)

Convert Array<Array<AffineExpr>> to Array<Array<int64_t>>.

Definition at line 222 of file ReshapeOpsUtils.cpp.

References mlir::AffineDimExpr::getPosition().

Referenced by getReassociationAttrName().

◆ convertVectorToMMAOps()

void mlir::convertVectorToMMAOps ( FuncOp  funcOp)

Convert vector ops to MMA matrix operations.

This will convert slice of operations that can be legally converted to MMA operations. The rest of the vector operations are left untouched.

Definition at line 501 of file VectorToGPU.cpp.

References applyPatternsAndFoldGreedily(), convertBroadcastOp(), convertConstantOp(), convertContractOp(), convertElementwiseOp(), convertElementwiseOpToMMA(), convertForOp(), convertTransferReadOp(), convertTransferWriteOp(), convertYieldOp(), getOpToConvert(), and populatePrepareVectorToMMAPatterns().

◆ createAffineComputationSlice()

void mlir::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.

Given an operation, inserts one or more single result affine apply operations, results of which are exclusively used by this operation operation.

The operands of these newly created affine apply ops are guaranteed to be loop iterators or terminal symbols of a function.

Before

affine.for i = 0 to #map(N) idx = affine.apply (d0) -> (d0 mod 2) (i) send A[idx], ... v = "compute"(idx, ...)

After

affine.for i = 0 to #map(N) idx = affine.apply (d0) -> (d0 mod 2) (i) send A[idx], ... idx_ = affine.apply (d0) -> (d0 mod 2) (i) v = "compute"(idx_, ...) This allows the application of different transformations on send and compute (for eg. different shifts/delays)

Fills sliceOps with the list of affine.apply operations. In the following cases, sliceOps remains empty:

  1. If none of opInst's operands were the result of an affine.apply (i.e., there was no affine computation slice to create).
  2. If all the affine.apply op's supplying operands to this opInst did not have any uses other than those in this opInst.

The operands of these newly created affine apply ops are guaranteed to be loop iterators or terminal symbols of a function.

Before

affine.for i = 0 to #map(N) idx = affine.apply (d0) -> (d0 mod 2) (i) "send"(idx, A, ...) "compute"(idx)

After

affine.for i = 0 to #map(N) idx = affine.apply (d0) -> (d0 mod 2) (i) "send"(idx, A, ...) idx_ = affine.apply (d0) -> (d0 mod 2) (i) "compute"(idx_)

This allows applying different transformations on send and compute (for eg. different shifts/delays).

Returns nullptr either if none of opInst's operands were the result of an affine.apply and thus there was no affine computation slice to create, or if all the affine.apply op's supplying operands to this opInst did not have any uses besides this opInst; otherwise returns the list of affine.apply operations created in output argument sliceOps.

Definition at line 326 of file Utils.cpp.

References mlir::OpBuilder::create(), fullyComposeAffineMapAndOperands(), mlir::AffineMap::get(), mlir::Operation::getLoc(), mlir::Builder::getMultiDimIdentityMap(), mlir::Operation::getNumOperands(), mlir::Operation::getOperands(), getReachableAffineApplyOps(), and mlir::Operation::setOperand().

Referenced by findMatchingStartFinishInsts().

◆ createAffineDataCopyGenerationPass() [1/2]

std::unique_ptr< OperationPass< FuncOp > > mlir::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.

Generates copies for memref's living in 'slowMemorySpace' into newly created buffers in 'fastMemorySpace', and replaces memory operations to the former by the latter.

Only load op's handled for now. TODO: extend this to store op's.

Definition at line 81 of file AffineDataCopyGeneration.cpp.

◆ createAffineDataCopyGenerationPass() [2/2]

std::unique_ptr< OperationPass< FuncOp > > mlir::createAffineDataCopyGenerationPass ( )

◆ createAffineForToGPUPass() [1/2]

std::unique_ptr< OperationPass< FuncOp > > mlir::createAffineForToGPUPass ( unsigned  numBlockDims,
unsigned  numThreadDims 
)

Create a pass that converts loop nests into GPU kernels.

It considers top-level affine.for operations as roots of loop nests and converts them to the gpu.launch operations if possible.

No check on the size of the block or grid, or on the validity of parallelization is performed, it is under the responsibility of the caller to strip-mine the loops and to perform the dependence analysis before calling the conversion.

Definition at line 66 of file SCFToGPUPass.cpp.

◆ createAffineForToGPUPass() [2/2]

std::unique_ptr< OperationPass< FuncOp > > mlir::createAffineForToGPUPass ( )

Definition at line 69 of file SCFToGPUPass.cpp.

◆ createAffineLoopInvariantCodeMotionPass()

std::unique_ptr< OperationPass< FuncOp > > mlir::createAffineLoopInvariantCodeMotionPass ( )

Creates a loop invariant code motion pass that hoists loop invariant operations out of affine loops.

Definition at line 241 of file AffineLoopInvariantCodeMotion.cpp.

◆ createAffineLoopNormalizePass()

std::unique_ptr< OperationPass< FuncOp > > mlir::createAffineLoopNormalizePass ( )

Apply normalization transformations to affine loop-like ops.

Definition at line 40 of file AffineLoopNormalize.cpp.

◆ createAffineParallelizePass()

std::unique_ptr< OperationPass< FuncOp > > mlir::createAffineParallelizePass ( )

Creates a pass to convert all parallel affine.for's into 1-d affine.parallel ops.

Definition at line 84 of file AffineParallelize.cpp.

◆ createAffineScalarReplacementPass()

std::unique_ptr< OperationPass< FuncOp > > mlir::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.

Creates a pass to perform optimizations relying on memref dataflow such as store to load forwarding, elimination of dead stores, and dead allocs.

Definition at line 83 of file AffineScalarReplacement.cpp.

◆ createAsyncParallelForPass() [1/2]

std::unique_ptr< Pass > mlir::createAsyncParallelForPass ( )

Definition at line 739 of file AsyncParallelFor.cpp.

◆ createAsyncParallelForPass() [2/2]

std::unique_ptr< Pass > mlir::createAsyncParallelForPass ( bool  asyncDispatch,
int32_t  numWorkerThreads,
int32_t  targetBlockSize 
)

Definition at line 743 of file AsyncParallelFor.cpp.

◆ createAsyncRuntimePolicyBasedRefCountingPass()

std::unique_ptr< Pass > mlir::createAsyncRuntimePolicyBasedRefCountingPass ( )

Definition at line 556 of file AsyncRuntimeRefCounting.cpp.

◆ createAsyncRuntimeRefCountingOptPass()

std::unique_ptr< Pass > mlir::createAsyncRuntimeRefCountingOptPass ( )

Definition at line 228 of file AsyncRuntimeRefCountingOpt.cpp.

◆ createAsyncRuntimeRefCountingPass()

std::unique_ptr< Pass > mlir::createAsyncRuntimeRefCountingPass ( )

Definition at line 552 of file AsyncRuntimeRefCounting.cpp.