MLIR 22.0.0git
mlir Namespace Reference

Include the generated interface declarations. More...

Namespaces

namespace  acc
namespace  affine
namespace  amdgpu
namespace  arith
namespace  arm_neon
namespace  arm_sme
namespace  arm_sve
namespace  async
namespace  AttributeTrait
 This trait is used to determine if an attribute is a dynamic attribute or not; it should only be implemented by dynamic attributes.
namespace  bufferization
namespace  builtin
namespace  builtin_dialect_detail
namespace  bytecode
namespace  call_interface_impl
namespace  cf
namespace  complex
namespace  dataflow
namespace  detail
 AttrTypeReplacer.
namespace  dialect_extension_detail
namespace  dlti
namespace  emitc
namespace  func
namespace  function_interface_impl
namespace  gpu
namespace  impl
 Attribute collections provide a dictionary-like interface.
namespace  index
namespace  intrange
namespace  irdl
namespace  khr
namespace  linalg
namespace  LLVM
namespace  lsp
namespace  matchers
namespace  math
namespace  MemoryEffects
namespace  memref
namespace  ml_program
namespace  mpi
namespace  nvgpu
namespace  NVVM
namespace  omp
namespace  op_definition_impl
namespace  OpTrait
namespace  pdl
namespace  pdl_to_pdl_interp
namespace  pdll
namespace  presburger
namespace  ptr
namespace  python
namespace  quant
namespace  query
namespace  remark
namespace  ROCDL
namespace  runtime
namespace  scf
namespace  shape
namespace  shard
namespace  SideEffects
namespace  smt
namespace  sparse_tensor
namespace  Speculation
namespace  spirv
namespace  tblgen
namespace  tensor
namespace  tosa
namespace  tracing
namespace  transform
namespace  TypeTrait
 This trait is used to determine if a type is a dynamic type or not; it should only be implemented by dynamic types.
namespace  ub
namespace  utils
namespace  vector
namespace  wasm
namespace  wasmssa
namespace  x86vector
namespace  xegpu
namespace  xevm

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  AffineConstantExpr
 An integer constant appearing in affine expression. More...
class  AffineDimExpr
 A dimensional identifier appearing in an affine expression. More...
class  AffineExpr
 Base type for affine expression. More...
class  AffineExprVisitor
 See documentation for AffineExprVisitorBase. More...
class  AffineExprVisitor< SubClass, LogicalResult >
class  AffineExprVisitorBase
 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  AffineSymbolExpr
 A symbolic identifier appearing in an affine expression. More...
class  AliasAnalysis
 This class represents the main alias analysis interface in MLIR. More...
class  AliasResult
 The possible results of an alias query. More...
class  AnalysisManager
 This class represents an analysis manager for a particular operation instance. More...
class  AnalysisState
 Base class for generic analysis states. More...
class  ApplyPatternAction
 This is the type of Action that is dispatched when a pattern is applied. More...
struct  ArithBuilder
 Helper struct to build simple arithmetic quantities with minimal type inference support. More...
struct  ArithIndexingBuilder
 ArithBuilder specialized specifically for tensor/memref indexing calculations. More...
struct  ArithToAMDGPUConversionPassOptions
struct  ArithToLLVMConversionPassOptions
class  ArrayRef
class  AsmDialectResourceHandle
 This class represents an opaque handle to a dialect resource entry. More...
class  AsmDialectResourceHandleBase
 This class represents a CRTP base class for dialect resource handles. More...
class  AsmParsedResourceEntry
 This class represents a single parsed resource entry. More...
class  AsmParser
 This base class exposes generic asm parser hooks, usable across the various derived parsers. More...
class  AsmParserCodeCompleteContext
 This class provides an abstract interface into the parser for hooking in code completion events. 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  AsmResourceBlob
 This class represents a processed binary blob of data. More...
class  AsmResourceBuilder
 This class is used to build resource entries for use by the printer. More...
class  AsmResourceParser
 This class represents an instance of a resource parser. More...
class  AsmResourcePrinter
 This class represents an instance of a resource printer. More...
class  AsmState
 This class provides management for the lifetime of the state used when printing the IR. More...
struct  AsyncParallelForPassOptions
class  AttrConvertPassThrough
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  AttrTypeBytecodeReader
 A class to interact with the attributes and types parser when parsing MLIR bytecode. More...
class  AttrTypeBytecodeWriter
 A class to interact with the attributes and types printer when emitting MLIR bytecode. More...
class  AttrTypeImmediateSubElementWalker
 AttrTypeSubElementHandler. More...
class  AttrTypeReplacer
 This is an attribute/type replacer that is naively cached. More...
struct  AttrTypeSubElementHandler
 This class provides support for interacting with the SubElementInterfaces for different types of parameters. More...
struct  AttrTypeSubElementHandler< ArrayRef< T >, std::enable_if_t< has_sub_attr_or_type_v< T > > >
 Implementation for derived ArrayRef. More...
struct  AttrTypeSubElementHandler< LLVM::detail::LLVMStructTypeStorage::Key >
 Allow walking and replacing the subelements of a LLVMStructTypeStorage key. More...
struct  AttrTypeSubElementHandler< Location >
 Enable locations to be introspected as sub-elements. More...
struct  AttrTypeSubElementHandler< NamedAttribute >
 Allow walking and replacing the subelements of a NamedAttribute. More...
struct  AttrTypeSubElementHandler< std::tuple< Ts... >, std::enable_if_t< has_sub_attr_or_type_v< Ts... > > >
 Implementation for Tuple. More...
struct  AttrTypeSubElementHandler< T, std::enable_if_t< std::is_base_of_v< Attribute, T >||std::is_base_of_v< Type, T > > >
 Implementation for derived Attributes and Types. More...
struct  AttrTypeSubElementHandler< TypeRange >
 Enable TypeRange to be introspected for sub-elements. More...
class  AttrTypeSubElementReplacements
 This class is used by AttrTypeSubElementHandler instances to process sub element replacements. More...
class  AttrTypeWalker
 AttrTypeWalker. More...
struct  BackwardSliceOptions
class  BaseMemRefType
 This class provides a shared interface for ranked and unranked memref types. More...
class  Block
 Block represents an ordered list of Operations. More...
class  BlockArgument
 This class represents an argument of a Block. More...
class  BlockOperand
 A block operand represents an operand that holds a reference to a Block, e.g. More...
class  BlockRange
 This class provides an abstraction over the different types of ranges over Blocks. More...
class  BoolAttr
 Special case of IntegerAttr to represent boolean integers, i.e., signless i1 integers. More...
class  BufferOriginAnalysis
 An is-same-buffer analysis that checks if two SSA values belong to the same buffer allocation or not. 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  BytecodeDialectInterface
class  BytecodeReader
 The BytecodeReader allows to load MLIR bytecode files, while keeping the state explicitly available in order to support lazy loading. More...
class  BytecodeReaderConfig
 A class containing bytecode-specific configurations of the ParserConfig. More...
class  BytecodeWriterConfig
 This class contains the configuration used for the bytecode writer. More...
class  CachedCyclicReplacer
 A helper class for cases where the input/output types of the replacer function is identical to the types stored in the cache. 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  CanonicalizerOptions
class  CFGLoop
 Representation of a single loop formed by blocks. More...
class  CFGLoopInfo
 An LLVM LoopInfo instantiation for MLIR that provides access to CFG loops found in the dominator tree. More...
class  CFGToSCFInterface
 Interface that should be implemented by any caller of transformCFGToSCF. More...
class  ComplexStructBuilder
struct  ComposeCollapseOfExpandOp
 Common verifier for reshape-like types. More...
struct  ComposeExpandOfCollapseOp
struct  CompositeFixedPointPassOptions
class  ConstantIntRanges
 A set of arbitrary-precision integers representing bounds on a given integer value. More...
class  ControlFlowToSCFTransformation
 Implementation of CFGToSCFInterface used to lift Control Flow Dialect operations to SCF Dialect operations. More...
struct  ConvertAffineForToGPUPassOptions
struct  ConvertAMDGPUToROCDLPassOptions
struct  ConvertArithToSPIRVPassOptions
struct  ConvertArmSMEToLLVMOptions
struct  ConvertComplexToLLVMPassOptions
struct  ConvertComplexToStandardPassOptions
struct  ConvertControlFlowToLLVMPassOptions
struct  ConvertControlFlowToSPIRVPassOptions
struct  ConvertFuncToLLVMPassOptions
struct  ConvertFuncToSPIRVPassOptions
struct  ConvertGpuOpsToLLVMSPVOpsOptions
struct  ConvertGpuOpsToNVVMOpsOptions
struct  ConvertGpuOpsToROCDLOpsOptions
struct  ConvertGPUToSPIRVOptions
struct  ConvertIndexToLLVMPassOptions
struct  ConvertIndexToSPIRVPassOptions
struct  ConvertMathToEmitCOptions
struct  ConvertMathToFuncsOptions
struct  ConvertMathToLLVMPassOptions
struct  ConvertMathToROCDLOptions
struct  ConvertMathToXeVMOptions
struct  ConvertMemRefToEmitCOptions
struct  ConvertMemRefToSPIRVPassOptions
class  ConvertOpInterfaceToLLVMPattern
 Utility class for operation conversions targeting the LLVM dialect that allows for matching and rewriting against an instance of an OpInterface class. More...
class  ConvertOpToLLVMPattern
 Utility class for operation conversions targeting the LLVM dialect that match exactly one source operation. More...
struct  ConvertSCFToOpenMPPassOptions
struct  ConvertSPIRVToLLVMPassOptions
struct  ConvertTensorToSPIRVPassOptions
struct  ConvertToEmitCOptions
class  ConvertToEmitCPatternInterface
struct  ConvertToLLVMPassOptions
class  ConvertToLLVMPattern
 Base class for operation conversions targeting the LLVM IR dialect. More...
class  ConvertToLLVMPatternInterface
 Base class for dialect interfaces providing translation to LLVM IR. More...
struct  ConvertVectorToGPUOptions
struct  ConvertVectorToLLVMPassOptions
struct  ConvertVectorToSCFOptions
class  CopyOnWriteArrayRef
class  CyclicAttrTypeReplacer
 This is an attribute/type replacer that supports custom handling of cycles in the replacer logic. More...
class  CyclicReplacerCache
 A cache for replacer-like functions that map values between two domains. More...
class  DataFlowAnalysis
 Base class for all data-flow analyses. More...
class  DataFlowConfig
 Configuration class for data flow solver and child analyses. More...
class  DataFlowSolver
 The general data-flow analysis solver. 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  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  DestructurableMemorySlot
 Memory slot attached with information about its destructuring procedure. More...
class  DiagnosedDefiniteFailure
 A compatibility class connecting InFlightDiagnostic to DiagnosedSilenceableFailure while providing an interface similar to the former. More...
class  DiagnosedSilenceableFailure
 The result of a transform IR operation application. 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  DialectBytecodeReader
 This class defines a virtual interface for reading a bytecode stream, providing hooks into the bytecode reader. More...
class  DialectBytecodeWriter
 This class defines a virtual interface for writing to a bytecode stream, providing hooks into the bytecode writer. More...
class  DialectExtension
 This class represents a dialect extension anchored on the given set of dialects. More...
class  DialectExtensionBase
 This class represents an opaque dialect extension. More...
class  DialectFoldInterface
 Define a fold interface to allow for dialects to control specific aspects of the folding behavior for operations they define. More...
class  DialectInlinerInterface
 This is the interface that must be implemented by the dialects of operations to be inlined. More...
class  DialectInterface
 This class represents an interface overridden for a single dialect. More...
class  DialectInterfaceCollection
 A collection of dialect interfaces within a context, for a given concrete interface type. More...
class  DialectPlugin
 A loaded dialect plugin. More...
struct  DialectPluginLibraryInfo
 Information about the plugin required to load its dialects & passes. 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...
struct  DialectResourceBlobHandle
 This class defines a dialect specific handle to a resource blob. More...
class  DialectResourceBlobManager
 This class defines a manager for dialect resource blobs. More...
class  DialectVersion
 This class is used to represent the version of a dialect, for the purpose of polymorphic destruction. More...
class  DistinctAttr
 An attribute that associates a referenced attribute with a unique identifier. More...
class  DominanceInfo
 A class for computing basic dominance information. More...
class  DynamicAttr
 A dynamic attribute instance. More...
class  DynamicAttrDefinition
 The definition of a dynamic attribute. More...
class  DynamicDialect
 A dialect that can be defined at runtime. More...
class  DynamicOpDefinition
 The definition of a dynamic op. More...
class  DynamicType
 A dynamic type instance. More...
class  DynamicTypeDefinition
 The definition of a dynamic type. More...
struct  EmptyProperties
 Structure used by default as a "marker" when no "Properties" are set on an Operation. More...
struct  EndomorphismSimplification
class  ExecutionEngine
 JIT-backed execution engine for MLIR. More...
struct  ExecutionEngineOptions
class  ExtensibleDialect
 A dialect that can be extended with new operations/types/attributes at runtime. More...
class  ExternalPass
 This pass class wraps external passes defined in other languages using the MLIR C-interface. More...
class  ExternalRewritePattern
class  FallbackAsmResourceMap
 A fallback map containing external resources not explicitly handled by another parser/printer. More...
struct  FieldParser
 Provide a template class that can be specialized by users to dispatch to parsers. More...
struct  FieldParser< AffineMap >
 Parse an affine map. 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< llvm::is_detected< detail::has_push_back_t, ContainerT >::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||std::is_same_v< IntT, llvm::APInt >), IntT > >
 Parse any integer. More...
struct  FieldParser< std::optional< AttributeT >, std::enable_if_t< std::is_base_of< Attribute, AttributeT >::value, std::optional< AttributeT > > >
 Parse an Optional attribute. More...
struct  FieldParser< std::optional< IntT >, std::enable_if_t< std::is_integral< IntT >::value, std::optional< IntT > > >
 Parse an Optional 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  FileLineColLoc
 An instance of this location represents a tuple of file, line number, and column number. More...
struct  FinalizeMemRefToLLVMConversionPassOptions
class  FixedVectorType
 A vector type with no scalable dimensions. More...
class  FlatLinearConstraints
 FlatLinearConstraints is an extension of IntegerPolyhedron. More...
class  FlatLinearValueConstraints
 FlatLinearValueConstraints represents an extension of FlatLinearConstraints where each non-local variable can have an SSA Value attached to it. More...
class  FlatSymbolRefAttr
 A symbol reference with a reference path containing a single element. More...
struct  ForwardDominanceIterator
 This iterator enumerates elements according to their dominance relationship. More...
struct  ForwardIterator
 This iterator enumerates the elements in "forward" order. More...
class  FrozenRewritePatternSet
 This class represents a frozen set of patterns that can be processed by a pattern applicator. More...
struct  FunctionCallBuilder
class  FusedLocWith
 This class represents a fused location whose metadata is known to be an instance of the given type. More...
struct  GenerateRuntimeVerificationOptions
class  GenericLatticeAnchor
 Abstract class for generic lattice anchor. More...
class  GenericLatticeAnchorBase
 Base class for generic lattice anchor based on a concrete lattice anchor type and a content key. More...
class  GenInfo
 Structure to group information about a generator (argument to invoke via mlir-tblgen, description, and generator function). More...
struct  GenNameParser
 Adds command line option for each registered generator. More...
struct  GenRegistration
 GenRegistration provides a global initializer that registers a generator function. More...
struct  GPUDynamicSharedMemoryOpLowering
 Lowering for gpu.dynamic.shared.memory to LLVM dialect. More...
struct  GPUFuncOpLowering
struct  GPUFuncOpLoweringOptions
struct  GpuKernelOutliningPassOptions
struct  GpuMapParallelLoopsPassOptions
struct  GpuModuleToBinaryPassOptions
struct  GpuNVVMAttachTargetOptions
struct  GPUPrintfOpToHIPLowering
 The lowering of gpu.printf to a call to HIP hostcalls. More...
struct  GPUPrintfOpToLLVMCallLowering
 The lowering of gpu.printf to a call to an external printf() function. More...
struct  GPUPrintfOpToVPrintfLowering
 Lowering of gpu.printf to a vprintf standard library. More...
struct  GPUReturnOpLowering
struct  GpuROCDLAttachTargetOptions
struct  GpuSPIRVAttachTargetOptions
struct  GpuToLLVMConversionPassOptions
struct  GpuXeVMAttachTargetOptions
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  HeapAsmResourceBlob
 This class provides a simple utility wrapper for creating heap allocated AsmResourceBlobs. More...
struct  HomomorphismSimplification
class  HyperrectangularSlice
 A hyperrectangular slice, represented as a list of offsets, sizes and strides. 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  Inliner
 This is an implementation of the inliner that operates bottom up over the Strongly Connected Components(SCCs) of the CallGraph. More...
class  InlinerConfig
class  InlinerInterface
 This interface provides the hooks into the inlining interface. More...
struct  InlinerOptions
class  IntegerSet
 An integer set representing a conjunction of one or more affine equalities and inequalities. More...
class  IntegerValueRange
 This lattice value represents the integer range of an SSA value. More...
class  InterfacePass
 Pass to transform an operation that implements the given interface. More...
class  InvocationBounds
 This class represents upper and lower bounds on the number of times a region of a RegionBranchOpInterface can be invoked. More...
class  IRMapping
 This is a utility class for mapping one set of IR entities to another. 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...
class  IRUnit
 IRUnit is a union of the different types of IR objects that constitute the IR structure (other than Type and Attribute), that is Operation, Region, and Block. More...
class  iterator_range
struct  JamBlockGatherer
struct  JitRunnerConfig
 Configuration to override functionality of the JitRunner. More...
struct  JitRunnerOptions
 JitRunner command line options used by JitRunnerConfig methods. More...
struct  LatticeAnchor
 Fundamental IR components are supported as first-class lattice anchor. More...
class  Lexer
 This class breaks up the current file into a token stream. More...
struct  LinalgBlockPackMatmulOptions
struct  LinalgDetensorizePassOptions
struct  LinalgFoldUnitExtentDimsPassOptions
struct  LinalgMorphOpsPassOptions
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  LLVMImportDialectInterface
 Base class for dialect interfaces used to import LLVM IR. More...
class  LLVMImportInterface
 Interface collection for the import of LLVM IR that dispatches to a concrete dialect interface implementation. More...
class  LLVMTranslationDialectInterface
 Base class for dialect interfaces providing translation to LLVM IR. More...
class  LLVMTranslationInterface
 Interface collection for translation to LLVM IR, dispatches to a concrete interface implementation based on the dialect to which the given op belongs. More...
class  LLVMTypeConverter
 Conversion from types to the LLVM IR dialect. More...
class  LocalAliasAnalysis
 This class implements a local form of alias analysis that tries to identify the underlying values addressed by each value and performs a few basic checks to see if they alias. More...
class  Location
 This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around a LocationAttr. More...
class  LocationAttr
 Location objects represent source locations information in MLIR. More...
struct  LocationSnapshotOptions
class  LockedSymbolTableCollection
 This class implements a lock-based shared wrapper around a symbol table collection that allows shared access to the collection of symbol tables. More...
struct  LowerSparseOpsToForeachOptions
class  LowerToLLVMOptions
 Options to control the LLVM lowering. More...
struct  MapMemRefStorageClassOptions
struct  MathPolynomialApproximationOptions
struct  Mem2RegOptions
struct  Mem2RegStatistics
 Statistics collected while applying mem2reg. More...
struct  MemorySlot
 Represents a slot in memory. 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  MergeResult
 Container for the result of merge operation of tiling. 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  MlirOptMainConfig
 Configuration options for the mlir-opt tool. 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  MutableArrayRef
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  Namespace
 A namespace that is used to store existing names and generate new names in some scope within the IR. 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  OpaqueProperties
 Simple wrapper around a void* in order to express generically how to pass in op properties through APIs. 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  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 the basic unit of execution within MLIR. More...
struct  OperationConverter
struct  OperationEquivalence
 This class provides utilities for computing if two operations are equivalent. More...
class  OperationFingerPrint
 A unique fingerprint for a specific operation, and all of it's internal operations (if includeNested is set). 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...
struct  OpInterfaceRewritePattern
 OpInterfaceRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an instance of an operation interface instead of a raw Operation. More...
class  OpOperand
 This class represents an operand of an operation. More...
class  OpPassManager
 This class represents a pass manager that runs passes on either a specific operation type, or any isolated operation. More...
class  OpPrintingFlags
 Set of flags used to control the behavior of the various IR print methods (e.g. More...
class  OpResult
 This is a value defined by a result of an operation. More...
struct  OpRewritePattern
 OpRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an instance of a derived operation class as opposed to a raw Operation. More...
class  OpState
 This is the concrete base class that holds the operation pointer and has non-generic methods that only depend on State (to avoid having them instantiated on template types that don't affect them. More...
class  OptionalParseResult
 This class implements Optional functionality for ParseResult. More...
struct  OptionValue< mlir::OpPassManager >
struct  OpToFuncCallLowering
 Rewriting that replaces SourceOp with a CallOp to f32Func or f64Func or f32ApproxFunc or f16Func or i32Type depending on the element type and the fastMathFlag of that Op, if present. 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...
struct  OptReductionPassOptions
class  OpWithFlags
 A wrapper class that allows for printing an operation with a set of flags, useful to act as a "stream modifier" to customize printing an operation with a stream using the operator<< overload, e.g.: llvm::dbgs() << OpWithFlags(op, OpPrintingFlags().skipRegions()); This always prints the operation with the local scope, to avoid introducing spurious newlines in the stream. More...
class  OpWithOffsetSizesAndStridesConstantArgumentFolder
 Pattern to rewrite dynamic offsets/sizes/strides of view/slice-like ops as constant arguments. More...
class  OpWithState
 A wrapper class that allows for printing an operation with a custom AsmState, useful to act as a "stream modifier" to customize printing an operation with a stream using the operator<< overload, e.g.: llvm::dbgs() << OpWithState(op, OpPrintingFlags().skipRegions());. More...
class  OutputStrategy
 Facilities for printing timing reports to various output formats. More...
class  OwningMemRef
 Owning MemRef type that abstracts over the runtime type for ranked strided memref. More...
class  OwningOpRef
 This class acts as an owning reference to an op, and will automatically destroy the held op on destruction if the held op is valid. More...
class  ParallelDiagnosticHandler
 This class is a utility diagnostic handler for use when multi-threading some part of the compiler where diagnostics may be emitted. More...
class  parser< mlir::OpPassManager >
class  parser< SmallVector< T, N > >
class  parser< std::vector< T > >
class  ParserConfig
 This class represents a configuration for the MLIR assembly parser. More...
class  Pass
 The abstract base pass class. More...
class  PassExecutionAction
 This class encapsulates the "action" of executing a single pass. 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...
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...
class  PassPlugin
 A loaded pass plugin. More...
struct  PassPluginLibraryInfo
 Information about the plugin required to load its passes. 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...
struct  PassReproducerOptions
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  PointerUnion
class  PostDominanceInfo
 A class for computing basic postdominance information. More...
class  PredecessorIterator
 Implement a predecessor iterator for blocks. More...
struct  PrintIRPassOptions
struct  PrintOpStatsOptions
struct  ProgramPoint
 Program point represents a specific location in the execution of a program. More...
struct  PropertiesSelector
 Traits to detect whether an Operation defined a Properties type, otherwise it'll default to EmptyProperties. More...
struct  PropertiesSelector< Op, std::void_t< typename Op::Properties > >
class  PyFileAccumulator
 Accumulates into a file, either writing text (default) or binary. More...
struct  PyPrintAccumulator
 Accumulates into a python string from a method that accepts an MlirStringCallback. More...
class  PyShapedType
 Shaped Type Interface - ShapedType. 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...
class  RaggedArray
 A 2D array where each row may have different length. More...
struct  Range
 Represents a range (offset, size, and stride) where each element of the triple may be dynamic or static. More...
class  raw_indented_ostream
 raw_ostream subclass that simplifies indention a sequence of code. More...
class  raw_ostream
class  ReductionNode
 ReductionTreePass will build a reduction tree during module reduction and the ReductionNode represents the vertex of the tree. More...
struct  ReductionTreePassOptions
class  Region
 This class contains a list of basic blocks and a link to the parent operation it is attached to. More...
class  RegionBranchPoint
 This class represents a point being branched from in the methods of the RegionBranchOpInterface. 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...
struct  ReproducerStream
 Streams on which to output crash reproducer. More...
class  ResourceBlobManagerDialectInterface
 This class implements a dialect interface that provides common functionality for interacting with a resource blob manager. More...
class  ResourceBlobManagerDialectInterfaceBase
 This class provides a base class for dialects implementing the resource blob interface. More...
class  ResultElementTypeIterator
class  ResultRange
 This class implements the result iterators for the Operation class. More...
struct  ReverseDominanceIterator
 This iterator enumerates elements according to their reverse dominance relationship. More...
struct  ReverseIterator
 This iterator enumerates elements in "reverse" order. 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  SaturatedInteger
 Idiomatic saturated operations on values like offsets, sizes, and strides. More...
struct  SaveStateStack
 RAII object calling stackPush/stackPop on construction/destruction. More...
class  ScalableVectorType
 A vector type containing at least one scalable dimension. More...
struct  ScalarizeVectorOpLowering
 Unrolls SourceOp to array/vector elements. More...
struct  SCFForLoopPeelingOptions
struct  SCFParallelLoopTilingOptions
struct  SCFToControlFlowPassOptions
struct  ScfToSPIRVContext
struct  ScfToSPIRVContextImpl
class  ScopedDiagnosticHandler
 This diagnostic handler is a simple RAII class that registers and erases a diagnostic handler on a given context. More...
class  SelfOwningTypeID
 Defines a TypeID for each instance of this class by using a pointer to the instance. More...
struct  SetLLVMModuleDataLayoutPassOptions
class  ShapeAdaptor
 Adaptor class to abstract the differences between whether value is from a ShapedType or ShapedTypeComponents or DenseIntElementsAttribute. More...
class  ShapedTypeComponents
 ShapedTypeComponents that represents the components of a ShapedType. More...
class  SimpleAffineExprFlattener
class  SimpleObjectCache
 A simple object cache following Lang's LLJITWithObjectCache example. More...
class  Sliceable
 A CRTP base class for pseudo-containers willing to support Python-type slicing access on top of indexed access. More...
struct  SliceBoundsVerificationResult
 Result for slice bounds verification;. More...
struct  SliceOptions
class  SmallPtrSet
class  SmallPtrSetImpl
class  SmallString
class  SmallVector
class  SmallVectorImpl
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  SparseAssemblerOptions
struct  SparseBufferRewriteOptions
struct  SparseGPUCodegenOptions
struct  SparseIterationTypeConverter
 Type converter for iter_space and iterator. More...
struct  SparseReinterpretMapOptions
struct  SparseTensorCodegenOptions
class  SparseTensorTypeToBufferConverter
 Sparse tensor type converter into an actual buffer. More...
class  SparseTensorTypeToPtrConverter
 Sparse tensor type converter into an opaque pointer. More...
struct  SparseVectorizationOptions
struct  SparsificationAndBufferizationOptions
struct  SparsificationOptions
 Options for the Sparsification pass. More...
struct  SparsificationPassOptions
struct  SPIRVConversionOptions
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...
struct  SROAStatistics
 Statistics collected while applying SROA. More...
class  StateStack
class  StateStackFrame
 Common CRTP base class for StateStack frames. More...
class  StateStackFrameBase
 Concrete CRTP base class for StateStack frames. More...
class  StaticTileOffsetRange
 A range-style iterator that allows for iterating over the offsets of all potential tiles of size tileShape within the larger shape shape, using an ordering specified by loopOrder. More...
class  StorageSpecifierToLLVMTypeConverter
class  StorageUniquer
 A utility class to get or create instances of "storage classes". More...
class  StridedMetadataRange
 A class that represents the strided metadata range information, including offsets, sizes, and strides as integer ranges. More...
class  StructBuilder
 Helper class to produce LLVM dialect operations extracting or inserting values to a struct. More...
class  StructuredGenerator
 Helper StructuredGenerator class to manipulate and rewrite ops with StructuredOpInterface. More...
class  SuccessorOperands
 This class models how operands are forwarded to block arguments in control flow. More...
class  SuccessorRange
 This class implements the successor iterators for Block. More...
class  SymbolCache
 Default symbol cache implementation; stores associations between names (StringAttr's) to mlir::Operation's. More...
class  SymbolCacheBase
 Base symbol cache class to allow for cache lookup through a pointer to some abstract cache. More...
struct  SymbolPrivatizeOptions
class  SymbolTable
 This class allows for representing and managing the symbol table used by operations with the 'SymbolTable' trait. More...
class  SymbolTableAnalysis
 This is a simple analysis that contains a symbol table collection and, for simplicity, a reference to the top-level symbol table. 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...
struct  TestSCFParallelLoopCollapsingOptions
class  ThreadLocalCache
 This class provides support for defining a thread local object with non static storage duration. More...
struct  TilingResult
 Container for result values of tiling. More...
class  Timer
 A handle for a timer in a TimingManager. More...
struct  TimeRecord
 Simple record class to record timing information. 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  TinyPtrVector
class  Token
 This represents a token in the MLIR syntax. More...
struct  TosaToArithPassOptions
struct  TosaToLinalgNamedOptions
struct  TosaToLinalgOptions
struct  TranslateFromMLIRRegistration
struct  TranslateRegistration
struct  TranslateToMLIRRegistration
 Use Translate[ToMLIR|FromMLIR]Registration as an initializer that registers a function and associates it with name. More...
class  Translation
 This class contains all of the components necessary for performing a translation. 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  TypeID
 This class provides an efficient unique identifier for a specific C++ type. More...
class  TypeIDAllocator
 This class provides a way to define new TypeIDs at runtime. More...
class  TypeInterface
 This class represents the base of a type interface. More...
class  TypeRange
 This class provides an abstraction over the various different ranges of value types. More...
class  TypeRangeRange
 This class provides an abstraction for a range of TypeRange. More...
class  TypeStorage
 Base storage class appearing in a Type. More...
struct  UBToLLVMConversionPassOptions
class  UnmanagedAsmResourceBlob
 This class provides a simple utility wrapper for creating "unmanaged" AsmResourceBlobs. More...
class  UnrankedMemRefDescriptor
struct  UnrolledLoopInfo
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  ValueBoundsConstraintSet
 A helper class to be used with ValueBoundsOpInterface. More...
class  ValueRange
 This class provides an abstraction over the different types of ranges over Values. More...
class  ValueSemantics
 Type trait indicating that the type has value semantics. 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  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...
struct  ViewOpGraphOptions
class  VulkanLayoutUtils
 According to the Vulkan spec "15.6.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  WalkContinuation
 A class to signal how to proceed with the walk of the backward slice: More...
class  WalkResult
 A utility result that is used to signal how to proceed with an ongoing walk: More...
class  WalkStage
 A utility class to encode the current walk stage for "generic" walkers. More...
struct  WasmBinaryEncoding

Typedefs

using TransitiveFilter = SliceOptions::TransitiveFilter
using ForwardSliceOptions = SliceOptions
using WalkCallback = mlir::function_ref<WalkContinuation(mlir::Value)>
 A callback that is invoked for each value encountered during the walk of the slice.
using LoweringCallback
using MemorySpaceMapping = std::function<unsigned(gpu::AddressSpace)>
 A function that maps a MemorySpace enum to a target-specific integer value.
using ReassociationIndices = SmallVector<int64_t, 2>
using MemrefValue = TypedValue<BaseMemRefType>
 A value with a memref type.
using Loops = SmallVector<scf::ForOp, 8>
 Tile a nest of standard for loops rooted at rootForOp by finding such parametric tile sizes that the outer loops have a fixed number of iterations as defined in sizes.
using TileLoops = std::pair<Loops, Loops>
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.
using DataLayoutEntryKey = llvm::PointerUnion<Type, StringAttr>
using DataLayoutEntryList = llvm::SmallVector<DataLayoutEntryInterface, 4>
using DataLayoutEntryListRef = llvm::ArrayRef<DataLayoutEntryInterface>
using TargetDeviceSpecListRef = llvm::ArrayRef<TargetDeviceSpecInterface>
using TargetDeviceSpecEntry = std::pair<StringAttr, TargetDeviceSpecInterface>
using DataLayoutIdentifiedEntryMap
using SetIntRangeFn
 The type of the setResultRanges callback provided to ops implementing InferIntRangeInterface.
using SetIntLatticeFn
 Similar to SetIntRangeFn, but operating on IntegerValueRange lattice values.
using GetIntRangeFn = function_ref<IntegerValueRange(Value)>
 Helper callback type to get the integer range of a value.
using SetStridedMetadataRangeFn
 Callback function type for setting the strided metadata of a value.
using ReifiedRankedShapedTypeDims = SmallVector<SmallVector<OpFoldResult>>
using NewYieldValuesFn
 A function that returns the additional yielded values during replaceWithAdditionalYields.
using ValueDimList = SmallVector<std::pair<Value, std::optional<int64_t>>>
using DefaultAttributeStorage = AttributeStorage
 Default storage type for attributes that require no additional initialization or storage.
using AttributeStorageAllocator = StorageUniquer::StorageAllocator
using AttrSubElementReplacements = AttrTypeSubElementReplacements<Attribute>
using TypeSubElementReplacements = AttrTypeSubElementReplacements<Type>
using DenseResourceElementsHandle = DialectResourceBlobHandle<BuiltinDialect>
using DenseBoolArrayAttr = detail::DenseArrayAttrImpl<bool>
using DenseI8ArrayAttr = detail::DenseArrayAttrImpl<int8_t>
using DenseI16ArrayAttr = detail::DenseArrayAttrImpl<int16_t>
using DenseI32ArrayAttr = detail::DenseArrayAttrImpl<int32_t>
using DenseI64ArrayAttr = detail::DenseArrayAttrImpl<int64_t>
using DenseF32ArrayAttr = detail::DenseArrayAttrImpl<float>
using DenseF64ArrayAttr = detail::DenseArrayAttrImpl<double>
using DenseBoolResourceElementsAttr
using DenseI8ResourceElementsAttr
using DenseI16ResourceElementsAttr
using DenseI32ResourceElementsAttr
using DenseI64ResourceElementsAttr
using DenseUI8ResourceElementsAttr
using DenseUI16ResourceElementsAttr
using DenseUI32ResourceElementsAttr
using DenseUI64ResourceElementsAttr
using DenseF32ResourceElementsAttr
using DenseF64ResourceElementsAttr
using DialectAllocatorFunction = std::function<Dialect *(MLIRContext *)>
using DialectAllocatorFunctionRef = function_ref<Dialect *(MLIRContext *)>
using DynamicDialectPopulationFunction
using DominanceInfoNode = llvm::DomTreeNodeBase<Block>
using OpAsmSetNameFn = function_ref<void(StringRef)>
 A functor used to set the name of the result.
using OpAsmSetValueNameFn = function_ref<void(Value, StringRef)>
 A functor used to set the name of the start of a result group of an operation.
using OpAsmSetBlockNameFn = function_ref<void(Block *, StringRef)>
 A functor used to set the name of blocks in regions directly nested under an operation.
using TypeRangeRangeIterator
using DefaultTypeStorage = TypeStorage
 Default storage type for types that require no additional initialization or storage.
using TypeStorageAllocator = StorageUniquer::StorageAllocator
 This is a utility allocator used to allocate memory for instances of derived Types.
using OperandElementTypeRange = iterator_range<OperandElementTypeIterator>
using ResultElementTypeRange = iterator_range<ResultElementTypeIterator>
template<typename Ty, typename Value = mlir::Value>
using TypedValue
 If Ty is mlir::Type this will select Value instead of having a wrapper around it.
using ReproducerStreamFactory
 Method type for constructing ReproducerStream.
using PassRegistryFunction
 A registry function that adds passes to the given pass manager.
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 = llvm::SmallVector<T, 0>, typename Set = DenseSet<T>, unsigned N = 0>
using SetVector = llvm::SetVector<T, Vector, Set, N>
template<typename AllocatorTy = llvm::MallocAllocator>
using StringSet = llvm::StringSet<AllocatorTy>
template<typename T, typename R = T>
using StringSwitch = llvm::StringSwitch<T, R>
template<typename T, typename ResultT = void>
using TypeSwitch = llvm::TypeSwitch<T, ResultT>
template<typename Fn>
using function_ref = llvm::function_ref<Fn>
using ChunkBufferHandler
using NoSourceChunkBufferHandler
using GenFunction
 Generator function to invoke.
using PassPipelineFn = llvm::function_ref<LogicalResult(PassManager &pm)>
 This defines the function type used to setup the pass manager.
using TranslateSourceMgrToMLIRFunction
 Interface of the function that translates the sources managed by sourceMgr to MLIR.
using TranslateRawSourceMgrToMLIRFunction
using TranslateStringRefToMLIRFunction
 Interface of the function that translates the given string to MLIR.
using TranslateFromMLIRFunction
 Interface of the function that translates MLIR to a different format and outputs the result to a stream.
using TranslateFunction
 Interface of the function that performs file-to-file translation involving MLIR.
using DialectRegistrationFunction = std::function<void(DialectRegistry &)>
 Interface of the function that adds all dialects and dialect extensions used for the translation to the given DialectRegistry.

Enumerations

enum class  ChangeResult { NoChange , Change }
 A result type used to indicate if a change happened. More...
enum class  HoistingKind : uint8_t { None = 0 , Loop = 1 << 0 , Block = 1 << 1 }
enum class  SparseParallelizationStrategy {
  kNone , kDenseOuterLoop , kAnyStorageOuterLoop , kDenseAnyLoop ,
  kAnyStorageAnyLoop
}
 Defines a parallelization strategy. More...
enum class  ReinterpretMapScope { kAll , kGenericOnly , kExceptGeneric }
 Defines a scope for reinterpret map pass. More...
enum class  SparseEmitStrategy { kFunctional , kSparseIterator , kDebugInterface }
 Defines a scope for reinterpret map pass. More...
enum class  SPIRVSubByteTypeStorage { Packed }
 How sub-byte values are storaged in memory. More...
enum class  DeletionKind { Keep , Delete }
 Returned by operation promotion logic requesting the deletion of an operation. More...
enum class  ReductionTilingStrategy { FullReduction , PartialReductionOuterReduction , PartialReductionOuterParallel }
 Tiling can be thought of as splitting a dimension into 2 and materializing the outer dimension as a loop: More...
enum class  AffineExprKind {
  Add , Mul , Mod , FloorDiv ,
  CeilDiv , LAST_AFFINE_BINARY_OP = CeilDiv , Constant , DimId ,
  SymbolId
}
enum class  AsmResourceEntryKind { Blob , Bool , String }
 This enum represents the different kinds of resource values. More...
enum class  SliceVerificationResult {
  Success , RankTooLarge , SizeMismatch , ElemTypeMismatch ,
  MemSpaceMismatch , LayoutMismatch
}
 Enum that captures information related to verifier error conditions on slice insert/extract type of ops. More...
enum class  DiagnosticSeverity { Note , Warning , Error , Remark }
 Defines the different supported severity of a diagnostic. More...
enum class  OpAsmAliasResult { NoAlias , OverridableAlias , FinalAlias }
 Holds the result of OpAsm{Dialect,Attr,Type}Interface::getAlias hook call. More...
enum class  RegionKind { SSACFG , Graph }
 The kinds of regions contained in an operation. More...
enum class  WalkOrder { PreOrder , PostOrder }
 Traversal order for region, block and operation walk utilities. More...
enum class  PassDisplayMode { List , 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 class  VerbosityLevel { ErrorsOnly = 0 , ErrorsAndWarnings , ErrorsWarningsAndRemarks }
 enum class to indicate the verbosity level of the diagnostic filter. More...
enum class  RemarkFormat { REMARK_FORMAT_STDOUT , REMARK_FORMAT_YAML , REMARK_FORMAT_BITSTREAM }
enum class  RemarkPolicy { REMARK_POLICY_ALL , REMARK_POLICY_FINAL }
enum class  GreedyRewriteStrictness { AnyOp , ExistingAndNewOps , ExistingOps }
 This enum controls which ops are put on the worklist during a greedy pattern rewrite. More...
enum class  GreedySimplifyRegionLevel { Disabled , Normal , Aggressive }

Functions

raw_ostreamoperator<< (raw_ostream &os, const AliasResult &result)
raw_ostreamoperator<< (raw_ostream &os, const ModRefResult &result)
ChangeResult operator| (ChangeResult lhs, ChangeResult rhs)
ChangeResultoperator|= (ChangeResult &lhs, ChangeResult rhs)
ChangeResult operator& (ChangeResult lhs, ChangeResult rhs)
raw_ostreamoperator<< (raw_ostream &os, const ProgramPoint &point)
raw_ostreamoperator<< (raw_ostream &os, const AnalysisState &state)
raw_ostreamoperator<< (raw_ostream &os, const LatticeAnchor &anchor)
LogicalResult getFlattenedAffineExpr (AffineExpr expr, unsigned numDims, unsigned numSymbols, SmallVectorImpl< int64_t > *flattenedExpr, FlatLinearConstraints *cst=nullptr, bool addConservativeSemiAffineBounds=false)
 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.
LogicalResult getFlattenedAffineExprs (AffineMap map, std::vector< SmallVector< int64_t, 8 > > *flattenedExprs, FlatLinearConstraints *cst=nullptr, bool addConservativeSemiAffineBounds=false)
 Flattens the result expressions of the map to their corresponding flattened forms and set in 'flattenedExprs'.
LogicalResult getFlattenedAffineExprs (IntegerSet set, std::vector< SmallVector< int64_t, 8 > > *flattenedExprs, FlatLinearConstraints *cst=nullptr)
LogicalResult getMultiAffineFunctionFromMap (AffineMap map, presburger::MultiAffineFunction &multiAff)
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.
void getForwardSlice (Operation *op, SetVector< Operation * > *forwardSlice, const ForwardSliceOptions &options={})
 Fills forwardSlice with the computed forward slice (i.e.
void getForwardSlice (Value root, SetVector< Operation * > *forwardSlice, const ForwardSliceOptions &options={})
 Value-rooted version of getForwardSlice.
LogicalResult getBackwardSlice (Operation *op, SetVector< Operation * > *backwardSlice, const BackwardSliceOptions &options={})
 Fills backwardSlice with the computed backward slice (i.e.
LogicalResult getBackwardSlice (Value root, SetVector< Operation * > *backwardSlice, const BackwardSliceOptions &options={})
 Value-rooted version of getBackwardSlice.
SetVector< Operation * > getSlice (Operation *op, const BackwardSliceOptions &backwardSliceOptions={}, const ForwardSliceOptions &forwardSliceOptions={})
 Iteratively computes backward slices and forward slices until a fixed point is reached.
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.
WalkContinuation walkSlice (mlir::ValueRange rootValues, WalkCallback walkCallback)
 Walks the slice starting from the rootValues using a depth-first traversal.
std::optional< SmallVector< Value > > getControlFlowPredecessors (Value value)
 Computes a vector of all control predecessors of value.
bool sortTopologically (Block *block, iterator_range< Block::iterator > ops, function_ref< bool(Value, Operation *)> isOperandReady=nullptr)
 Given a block, sort a range operations in said block in topological order.
bool sortTopologically (Block *block, function_ref< bool(Value, Operation *)> isOperandReady=nullptr)
 Given a block, sort its operations in topological order, excluding its terminator if it has one.
bool computeTopologicalSorting (MutableArrayRef< Operation * > ops, function_ref< bool(Value, Operation *)> isOperandReady=nullptr)
 Compute a topological ordering of the given ops.
SetVector< Block * > getBlocksSortedByDominance (Region &region)
 Gets a list of blocks that is sorted according to dominance.
SetVector< Operation * > topologicalSort (const SetVector< Operation * > &toSort)
 Sorts all operations in toSort topologically while also considering region semantics.
LogicalResult parseAsmSourceFile (const llvm::SourceMgr &sourceMgr, Block *block, const ParserConfig &config, AsmParserState *asmState=nullptr, AsmParserCodeCompleteContext *codeCompleteContext=nullptr)
 This parses the file specified by the indicated SourceMgr and appends parsed operations to the given block.
Attribute parseAttribute (llvm::StringRef attrStr, MLIRContext *context, Type type={}, size_t *numRead=nullptr, bool isKnownNullTerminated=false)
 This parses a single MLIR attribute to an MLIR context if it was valid.
Type parseType (llvm::StringRef typeStr, MLIRContext *context, size_t *numRead=nullptr, bool isKnownNullTerminated=false)
 This parses a single MLIR type to an MLIR context if it was valid.
AffineMap parseAffineMap (llvm::StringRef str, MLIRContext *context)
 This parses a single IntegerSet/AffineMap to an MLIR context if it was valid.
IntegerSet parseIntegerSet (llvm::StringRef str, MLIRContext *context)
template<typename T, typename... Ts>
static LogicalResult readResourceHandle (DialectBytecodeReader &reader, FailureOr< T > &value, Ts &&...params)
 Helper for resource handle reading that returns LogicalResult.
template<typename T, typename... Ts>
auto get (MLIRContext *context, Ts &&...params)
 Helper method that injects context only if needed, this helps unify some of the attribute construction methods.
bool isBytecode (llvm::MemoryBufferRef buffer)
 Returns true if the given buffer starts with the magic bytes that signal MLIR bytecode.
LogicalResult readBytecodeFile (llvm::MemoryBufferRef buffer, Block *block, const ParserConfig &config)
 Read the operations defined within the given memory buffer, containing MLIR bytecode, into the provided block.
LogicalResult readBytecodeFile (const std::shared_ptr< llvm::SourceMgr > &sourceMgr, Block *block, const ParserConfig &config)
 An overload with a source manager whose main file buffer is used for parsing.
LogicalResult writeBytecodeToFile (Operation *op, raw_ostream &os, const BytecodeWriterConfig &config={})
 Write the bytecode for the given operation to the provided output stream.
std::unique_ptr<::mlir::PasscreateLowerAffinePass ()
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.
void populateAffineToVectorConversionPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to convert vector-related Affine ops to the Vector dialect.
Value lowerAffineLowerBound (affine::AffineForOp op, OpBuilder &builder)
 Emit code that computes the lower bound of the given affine loop using standard arithmetic operations.
Value lowerAffineUpperBound (affine::AffineForOp op, OpBuilder &builder)
 Emit code that computes the upper bound of the given affine loop using standard arithmetic operations.
std::unique_ptr<::mlir::PasscreateConvertAMDGPUToROCDLPass ()
std::unique_ptr<::mlir::PasscreateConvertAMDGPUToROCDLPass (ConvertAMDGPUToROCDLPassOptions options)
void populateAMDGPUToROCDLConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns, amdgpu::Chipset chipset)
 Note: This function will also add conversions for the AMDGPU-specific address spaces, but those can be added separately using populateAMDGPUMemorySpaceAttributeConversions().
void populateAMDGPUMemorySpaceAttributeConversions (TypeConverter &typeConverter)
 Remap AMDGPU memory spaces to LLVM address spaces by mapping amdgpu::AddressSpace::fat_raw_buffer to ptr addrspace(7), amdgpu::AddressSpace::buffer_rsrc to ptr addrspace(8), and amdgpu::AddressSpace::fat_strided_buffer to ptr addrspace(9).
std::unique_ptr<::mlir::PasscreateArithToAMDGPUConversionPass ()
std::unique_ptr<::mlir::PasscreateArithToAMDGPUConversionPass (ArithToAMDGPUConversionPassOptions options)
std::unique_ptr<::mlir::PasscreateArithToAPFloatConversionPass ()
std::unique_ptr<::mlir::PasscreateArithToArmSMEConversionPass ()
void populateArithToEmitCPatterns (TypeConverter &typeConverter, RewritePatternSet &patterns)
void registerConvertArithToEmitCInterface (DialectRegistry &registry)
std::unique_ptr<::mlir::PasscreateConvertArithToEmitC ()
std::unique_ptr<::mlir::PasscreateArithToLLVMConversionPass ()
std::unique_ptr<::mlir::PasscreateArithToLLVMConversionPass (ArithToLLVMConversionPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertArithToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertArithToSPIRVPass (ConvertArithToSPIRVPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertArmNeon2dToIntrPass ()
void populateConvertArmNeon2dToIntrPatterns (RewritePatternSet &patterns)
 Populates patterns for the lowering of Arm NEON 2D ops to intrinsics.
void registerArithToAMDGPUConversionPass ()
void registerArithToAMDGPUConversionPassPass ()
void registerArithToAPFloatConversionPass ()
void registerArithToAPFloatConversionPassPass ()
void registerArithToArmSMEConversionPass ()
void registerArithToArmSMEConversionPassPass ()
void registerArithToLLVMConversionPass ()
void registerArithToLLVMConversionPassPass ()
void registerConvertAMDGPUToROCDLPass ()
void registerConvertAMDGPUToROCDLPassPass ()
void registerConvertAffineForToGPUPass ()
void registerConvertAffineForToGPUPassPass ()
void registerConvertArithToEmitC ()
void registerConvertArithToEmitCPass ()
void registerConvertArithToSPIRVPass ()
void registerConvertArithToSPIRVPassPass ()
void registerConvertArmNeon2dToIntrPass ()
void registerConvertArmNeon2dToIntrPassPass ()
void registerConvertArmSMEToLLVM ()
void registerConvertArmSMEToLLVMPass ()
void registerConvertArmSMEToSCFPass ()
void registerConvertArmSMEToSCFPassPass ()
void registerConvertAsyncToLLVMPass ()
void registerConvertAsyncToLLVMPassPass ()
void registerConvertBufferizationToMemRefPass ()
void registerConvertBufferizationToMemRefPassPass ()
void registerConvertComplexToLLVMPass ()
void registerConvertComplexToLLVMPassPass ()
void registerConvertComplexToLibm ()
void registerConvertComplexToLibmPass ()
void registerConvertComplexToROCDLLibraryCalls ()
void registerConvertComplexToROCDLLibraryCallsPass ()
void registerConvertComplexToSPIRVPass ()
void registerConvertComplexToSPIRVPassPass ()
void registerConvertComplexToStandardPass ()
void registerConvertComplexToStandardPassPass ()
void registerConvertControlFlowToLLVMPass ()
void registerConvertControlFlowToLLVMPassPass ()
void registerConvertControlFlowToSPIRVPass ()
void registerConvertControlFlowToSPIRVPassPass ()
void registerConvertFuncToEmitC ()
void registerConvertFuncToEmitCPass ()
void registerConvertFuncToLLVMPass ()
void registerConvertFuncToLLVMPassPass ()
void registerConvertFuncToSPIRVPass ()
void registerConvertFuncToSPIRVPassPass ()
void registerConvertGPUToSPIRV ()
void registerConvertGPUToSPIRVPass ()
void registerConvertGpuOpsToLLVMSPVOps ()
void registerConvertGpuOpsToLLVMSPVOpsPass ()
void registerConvertGpuOpsToNVVMOps ()
void registerConvertGpuOpsToNVVMOpsPass ()
void registerConvertGpuOpsToROCDLOps ()
void registerConvertGpuOpsToROCDLOpsPass ()
void registerConvertIndexToLLVMPass ()
void registerConvertIndexToLLVMPassPass ()
void registerConvertIndexToSPIRVPass ()
void registerConvertIndexToSPIRVPassPass ()
void registerConvertLinalgToStandardPass ()
void registerConvertLinalgToStandardPassPass ()
void registerConvertMathToEmitC ()
void registerConvertMathToEmitCPass ()
void registerConvertMathToFuncs ()
void registerConvertMathToFuncsPass ()
void registerConvertMathToLLVMPass ()
void registerConvertMathToLLVMPassPass ()
void registerConvertMathToLibmPass ()
void registerConvertMathToLibmPassPass ()
void registerConvertMathToROCDL ()
void registerConvertMathToROCDLPass ()
void registerConvertMathToSPIRVPass ()
void registerConvertMathToSPIRVPassPass ()
void registerConvertMathToXeVM ()
void registerConvertMathToXeVMPass ()
void registerConvertMemRefToEmitC ()
void registerConvertMemRefToEmitCPass ()
void registerConvertMemRefToSPIRVPass ()
void registerConvertMemRefToSPIRVPassPass ()
void registerConvertNVGPUToNVVMPass ()
void registerConvertNVGPUToNVVMPassPass ()
void registerConvertNVVMToLLVMPass ()
void registerConvertNVVMToLLVMPassPass ()
void registerConvertOpenACCToSCFPass ()
void registerConvertOpenACCToSCFPassPass ()
void registerConvertOpenMPToLLVMPass ()
void registerConvertOpenMPToLLVMPassPass ()
void registerConvertPDLToPDLInterpPass ()
void registerConvertPDLToPDLInterpPassPass ()
void registerConvertParallelLoopToGpuPass ()
void registerConvertParallelLoopToGpuPassPass ()
void registerConvertSCFToOpenMPPass ()
void registerConvertSCFToOpenMPPassPass ()
void registerConvertSPIRVToLLVMPass ()
void registerConvertSPIRVToLLVMPassPass ()
void registerConvertShapeConstraintsPass ()
void registerConvertShapeConstraintsPassPass ()
void registerConvertShapeToStandardPass ()
void registerConvertShapeToStandardPassPass ()
void registerConvertShardToMPIPass ()
void registerConvertShardToMPIPassPass ()
void registerConvertTensorToLinalgPass ()
void registerConvertTensorToLinalgPassPass ()
void registerConvertTensorToSPIRVPass ()
void registerConvertTensorToSPIRVPassPass ()
void registerConvertToEmitC ()
void registerConvertToEmitCPass ()
void registerConvertToLLVMPass ()
void registerConvertToLLVMPassPass ()
void registerConvertVectorToAMX ()
void registerConvertVectorToAMXPass ()
void registerConvertVectorToArmSMEPass ()
void registerConvertVectorToArmSMEPassPass ()
void registerConvertVectorToGPU ()
void registerConvertVectorToGPUPass ()
void registerConvertVectorToLLVMPass ()
void registerConvertVectorToLLVMPassPass ()
void registerConvertVectorToSCF ()
void registerConvertVectorToSCFPass ()
void registerConvertVectorToSPIRVPass ()
void registerConvertVectorToSPIRVPassPass ()
void registerConvertVectorToXeGPU ()
void registerConvertVectorToXeGPUPass ()
void registerConvertXeGPUToXeVMPass ()
void registerConvertXeGPUToXeVMPassPass ()
void registerConvertXeVMToLLVMPass ()
void registerConvertXeVMToLLVMPassPass ()
void registerFinalizeMemRefToLLVMConversionPass ()
void registerFinalizeMemRefToLLVMConversionPassPass ()
void registerGpuToLLVMConversionPass ()
void registerGpuToLLVMConversionPassPass ()
void registerLiftControlFlowToSCFPass ()
void registerLiftControlFlowToSCFPassPass ()
void registerLowerAffinePass ()
void registerLowerAffinePassPass ()
void registerLowerHostCodeToLLVMPass ()
void registerLowerHostCodeToLLVMPassPass ()
void registerMapMemRefStorageClass ()
void registerMapMemRefStorageClassPass ()
void registerReconcileUnrealizedCastsPass ()
void registerReconcileUnrealizedCastsPassPass ()
void registerSCFToControlFlowPass ()
void registerSCFToControlFlowPassPass ()
void registerSCFToEmitC ()
void registerSCFToEmitCPass ()
void registerSCFToSPIRV ()
void registerSCFToSPIRVPass ()
void registerSetLLVMModuleDataLayoutPass ()
void registerSetLLVMModuleDataLayoutPassPass ()
void registerTosaToArithPass ()
void registerTosaToArithPassPass ()
void registerTosaToLinalg ()
void registerTosaToLinalgPass ()
void registerTosaToLinalgNamed ()
void registerTosaToLinalgNamedPass ()
void registerTosaToMLProgram ()
void registerTosaToMLProgramPass ()
void registerTosaToSCFPass ()
void registerTosaToSCFPassPass ()
void registerTosaToTensorPass ()
void registerTosaToTensorPassPass ()
void registerUBToLLVMConversionPass ()
void registerUBToLLVMConversionPassPass ()
void registerUBToSPIRVConversionPass ()
void registerUBToSPIRVConversionPassPass ()
void registerConversionPasses ()
std::unique_ptr< PasscreateConvertArmSMEToLLVMPass (bool dumpTileLiveRanges=false)
 Create a pass to convert from the ArmSME dialect to LLVM intrinsics.
void configureArmSMEToLLVMConversionLegality (ConversionTarget &target)
 Configure target to convert from the ArmSME dialect to LLVM intrinsics.
void populateArmSMEToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Populate the given list with patterns that convert from the ArmSME dialect to LLVM intrinsics.
std::unique_ptr<::mlir::PasscreateConvertArmSMEToSCFPass ()
void populateArmSMEToSCFConversionPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to convert from the ArmSME dialect to SCF.
std::unique_ptr<::mlir::PasscreateConvertAsyncToLLVMPass ()
void populateAsyncStructuralTypeConversionsAndLegality (TypeConverter &typeConverter, RewritePatternSet &patterns, ConversionTarget &target)
 Populates patterns for async structural type conversions.
std::unique_ptr<::mlir::PasscreateConvertBufferizationToMemRefPass ()
std::unique_ptr<::mlir::PasscreateConvertComplexToLibm ()
void populateComplexToLibmConversionPatterns (RewritePatternSet &patterns, PatternBenefit benefit)
 Populate the given list with patterns that convert from Complex to Libm calls.
std::unique_ptr<::mlir::PasscreateConvertComplexToLLVMPass ()
std::unique_ptr<::mlir::PasscreateConvertComplexToLLVMPass (ConvertComplexToLLVMPassOptions options)
void populateComplexToLLVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, mlir::complex::ComplexRangeFlags complexRange=mlir::complex::ComplexRangeFlags::basic)
 Populate the given list with patterns that convert from Complex to LLVM.
void registerConvertComplexToLLVMInterface (DialectRegistry &registry)
std::unique_ptr<::mlir::PasscreateConvertComplexToROCDLLibraryCalls ()
void populateComplexToROCDLLibraryCallsConversionPatterns (RewritePatternSet &patterns)
 Populate the given list with patterns that convert from Complex to ROCDL calls.
void populateComplexToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating Complex ops to SPIR-V ops.
std::unique_ptr<::mlir::PasscreateConvertComplexToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertComplexToStandardPass ()
std::unique_ptr<::mlir::PasscreateConvertComplexToStandardPass (ConvertComplexToStandardPassOptions options)
void populateComplexToStandardConversionPatterns (RewritePatternSet &patterns, mlir::complex::ComplexRangeFlags complexRange=mlir::complex::ComplexRangeFlags::improved)
 Populate the given list with patterns that convert from Complex to Standard.
std::unique_ptr<::mlir::PasscreateConvertControlFlowToLLVMPass ()
std::unique_ptr<::mlir::PasscreateConvertControlFlowToLLVMPass (ConvertControlFlowToLLVMPassOptions options)
std::unique_ptr<::mlir::PasscreateLiftControlFlowToSCFPass ()
std::unique_ptr<::mlir::PasscreateConvertControlFlowToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertControlFlowToSPIRVPass (ConvertControlFlowToSPIRVPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertToEmitC ()
std::unique_ptr<::mlir::PasscreateConvertToEmitC (ConvertToEmitCOptions options)
void populateConversionTargetFromOperation (Operation *op, ConversionTarget &target, TypeConverter &typeConverter, RewritePatternSet &patterns)
 Recursively walk the IR and collect all dialects implementing the interface, and populate the conversion patterns.
void populateConversionTargetFromOperation (Operation *op, ConversionTarget &target, LLVMTypeConverter &typeConverter, RewritePatternSet &patterns)
 Recursively walk the IR and collect all dialects implementing the interface, and populate the conversion patterns.
void populateOpConvertToLLVMConversionPatterns (Operation *op, ConversionTarget &target, LLVMTypeConverter &typeConverter, RewritePatternSet &patterns)
 Helper function for populating LLVM conversion patterns.
std::unique_ptr<::mlir::PasscreateConvertToLLVMPass ()
std::unique_ptr<::mlir::PasscreateConvertToLLVMPass (ConvertToLLVMPassOptions options)
void registerConvertToLLVMDependentDialectLoading (DialectRegistry &registry)
 Register the extension that will load dependent dialects for LLVM conversion.
void populateFuncToEmitCPatterns (const TypeConverter &typeConverter, RewritePatternSet &patterns)
void registerConvertFuncToEmitCInterface (DialectRegistry &registry)
std::unique_ptr<::mlir::PasscreateConvertFuncToEmitC ()
FailureOr< LLVM::LLVMFuncOp > convertFuncOpToLLVMFuncOp (FunctionOpInterface funcOp, ConversionPatternRewriter &rewriter, const LLVMTypeConverter &converter, SymbolTableCollection *symbolTables=nullptr)
 Convert input FunctionOpInterface operation to LLVMFuncOp by using the provided LLVMTypeConverter.
void populateFuncToLLVMFuncOpConversionPattern (const LLVMTypeConverter &converter, RewritePatternSet &patterns, SymbolTableCollection *symbolTables=nullptr)
 Collect the default pattern to convert a FuncOp to the LLVM dialect.
void populateFuncToLLVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, SymbolTableCollection *symbolTables=nullptr)
 Collect the patterns to convert from the Func dialect to LLVM.
void registerConvertFuncToLLVMInterface (DialectRegistry &registry)
std::unique_ptr<::mlir::PasscreateConvertFuncToLLVMPass ()
std::unique_ptr<::mlir::PasscreateConvertFuncToLLVMPass (ConvertFuncToLLVMPassOptions options)
std::unique_ptr<::mlir::PasscreateSetLLVMModuleDataLayoutPass ()
std::unique_ptr<::mlir::PasscreateSetLLVMModuleDataLayoutPass (SetLLVMModuleDataLayoutPassOptions options)
void populateFuncToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating Func ops to SPIR-V ops.
std::unique_ptr<::mlir::PasscreateConvertFuncToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertFuncToSPIRVPass (ConvertFuncToSPIRVPassOptions options)
spirv::StorageClass addressSpaceToStorageClass (gpu::AddressSpace addressSpace)
std::unique_ptr<::mlir::PasscreateGpuToLLVMConversionPass ()
std::unique_ptr<::mlir::PasscreateGpuToLLVMConversionPass (GpuToLLVMConversionPassOptions options)
void populateGpuToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns, bool kernelBarePtrCallConv=false, bool kernelIntersperseSizeCallConv=false)
 Collect a set of patterns to convert from the GPU dialect to LLVM and populate converter for gpu types.
void populateGpuMemorySpaceAttributeConversions (TypeConverter &typeConverter, const MemorySpaceMapping &mapping)
 Populates memory space attribute conversion rules for lowering gpu.address_space to integer values.
std::unique_ptr<::mlir::PasscreateConvertGpuOpsToLLVMSPVOps ()
std::unique_ptr<::mlir::PasscreateConvertGpuOpsToLLVMSPVOps (ConvertGpuOpsToLLVMSPVOpsOptions options)
void populateGpuToLLVMSPVConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns)
void populateGpuMemorySpaceAttributeConversions (TypeConverter &typeConverter)
 Populates memory space attribute conversion rules for lowering gpu.address_space to integer values.
std::unique_ptr<::mlir::PasscreateConvertGpuOpsToNVVMOps ()
std::unique_ptr<::mlir::PasscreateConvertGpuOpsToNVVMOps (ConvertGpuOpsToNVVMOpsOptions options)
LLVM::LLVMStructType convertMMAToLLVMType (gpu::MMAMatrixType type)
 Return the LLVMStructureType corresponding to the MMAMatrixType type.
void configureGpuToNVVMConversionLegality (ConversionTarget &target)
 Configure target to convert from the GPU dialect to NVVM.
void configureGpuToNVVMTypeConverter (LLVMTypeConverter &converter)
 Configure the LLVM type convert to convert types and address spaces from the GPU dialect to NVVM.
void populateLibDeviceConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, PatternBenefit benefit=1)
 Populate patterns that lower certain arith and math dialect ops to libdevice calls.
void populateGpuToNVVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, PatternBenefit benefit=1)
 Collect a set of patterns to convert from the GPU dialect to NVVM.
void populateGpuSubgroupReduceOpLoweringPattern (const LLVMTypeConverter &converter, RewritePatternSet &patterns, PatternBenefit benefit=1)
 Populate GpuSubgroupReduce pattern to NVVM.
void populateGpuWMMAToNVVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, PatternBenefit benefit=1)
 Collect a set of patterns to convert WMMA ops from GPU dialect to NVVM.
std::unique_ptr<::mlir::PasscreateConvertGpuOpsToROCDLOps ()
std::unique_ptr<::mlir::PasscreateConvertGpuOpsToROCDLOps (ConvertGpuOpsToROCDLOpsOptions options)
void populateGpuToROCDLConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, gpu::amd::Runtime runtime, amdgpu::Chipset chipset)
 Collect a set of patterns to convert from the GPU dialect to ROCDL.
void configureGpuToROCDLConversionLegality (ConversionTarget &target)
 Configure target to convert from the GPU dialect to ROCDL.
void populateGPUToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating GPU Ops to SPIR-V ops.
void populateGpuWMMAToSPIRVCoopMatrixKHRConversionPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Collect a set of patterns to convert WMMA ops from GPU dialect to SPIRV, using the KHR Cooperative Matrix extension.
void populateMMAToSPIRVCoopMatrixTypeConversion (SPIRVTypeConverter &typeConverter)
 Adds MMAMatrixType conversions to SPIR-V cooperative matrix KHR type conversion to the type converter.
std::unique_ptr< OperationPass< ModuleOp > > createConvertGPUToSPIRVPass (bool mapMemorySpace=true)
 Creates a pass to convert GPU kernel ops to corresponding SPIR-V ops.
std::unique_ptr<::mlir::PasscreateConvertIndexToLLVMPass ()
std::unique_ptr<::mlir::PasscreateConvertIndexToLLVMPass (ConvertIndexToLLVMPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertIndexToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertIndexToSPIRVPass (ConvertIndexToSPIRVPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertLinalgToStandardPass ()
LogicalResult structFuncArgTypeConverter (const LLVMTypeConverter &converter, Type type, SmallVectorImpl< Type > &result)
 Callback to convert function argument types.
LogicalResult barePtrFuncArgTypeConverter (const LLVMTypeConverter &converter, Type type, SmallVectorImpl< Type > &result)
 Callback to convert function argument types.
void populateConvertMathToEmitCPatterns (RewritePatternSet &patterns, emitc::LanguageTarget languageTarget)
std::unique_ptr<::mlir::PasscreateConvertMathToEmitC ()
std::unique_ptr<::mlir::PasscreateConvertMathToEmitC (ConvertMathToEmitCOptions options)
std::unique_ptr<::mlir::PasscreateConvertMathToFuncs ()
std::unique_ptr<::mlir::PasscreateConvertMathToFuncs (ConvertMathToFuncsOptions options)
std::unique_ptr<::mlir::PasscreateConvertMathToLibmPass ()
void populateMathToLibmConversionPatterns (RewritePatternSet &patterns, PatternBenefit benefit=1)
 Populate the given list with patterns that convert from Math to Libm calls.
std::unique_ptr<::mlir::PasscreateConvertMathToLLVMPass ()
std::unique_ptr<::mlir::PasscreateConvertMathToLLVMPass (ConvertMathToLLVMPassOptions options)
void populateMathToLLVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, bool approximateLog1p=true, PatternBenefit benefit=1)
void registerConvertMathToLLVMInterface (DialectRegistry &registry)
std::unique_ptr<::mlir::PasscreateConvertMathToROCDL ()
std::unique_ptr<::mlir::PasscreateConvertMathToROCDL (ConvertMathToROCDLOptions options)
void populateMathToROCDLConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, std::optional< amdgpu::Chipset > chipset)
 Populate the given list with patterns that convert from Math to ROCDL calls.
void populateMathToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating Math ops to SPIR-V ops.
std::unique_ptr<::mlir::PasscreateConvertMathToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertMathToXeVM ()
std::unique_ptr<::mlir::PasscreateConvertMathToXeVM (ConvertMathToXeVMOptions options)
void populateMathToXeVMConversionPatterns (RewritePatternSet &patterns, bool convertArith)
 Populate the given list with patterns that convert from Math to XeVM calls.
void populateMemRefToEmitCTypeConversion (TypeConverter &typeConverter)
void populateMemRefToEmitCConversionPatterns (RewritePatternSet &patterns, const TypeConverter &converter)
void registerConvertMemRefToEmitCInterface (DialectRegistry &registry)
std::unique_ptr<::mlir::PasscreateConvertMemRefToEmitC ()
std::unique_ptr<::mlir::PasscreateConvertMemRefToEmitC (ConvertMemRefToEmitCOptions options)
std::unique_ptr<::mlir::PasscreateFinalizeMemRefToLLVMConversionPass ()
std::unique_ptr<::mlir::PasscreateFinalizeMemRefToLLVMConversionPass (FinalizeMemRefToLLVMConversionPassOptions options)
void populateFinalizeMemRefToLLVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, SymbolTableCollection *symbolTables=nullptr)
 Collect a set of patterns to convert memory-related operations from the MemRef dialect to the LLVM dialect.
void registerConvertMemRefToLLVMInterface (DialectRegistry &registry)
void populateMemRefToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating MemRef ops to SPIR-V ops.
std::unique_ptr<::mlir::PasscreateConvertMemRefToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertMemRefToSPIRVPass (ConvertMemRefToSPIRVPassOptions options)
std::unique_ptr< OperationPass<> > createMapMemRefStorageClassPass ()
 Creates a pass to map numeric MemRef memory spaces to symbolic SPIR-V storage classes.
std::unique_ptr<::mlir::PasscreateConvertNVGPUToNVVMPass ()
void populateNVGPUToNVVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns)
std::unique_ptr<::mlir::PasscreateConvertNVVMToLLVMPass ()
void populateNVVMToLLVMConversionPatterns (RewritePatternSet &patterns)
void registerConvertNVVMToLLVMInterface (DialectRegistry &registry)
std::unique_ptr<::mlir::PasscreateConvertOpenACCToSCFPass ()
void populateOpenACCToSCFConversionPatterns (RewritePatternSet &patterns)
 Collect the patterns to convert from the OpenACC dialect to OpenACC with SCF dialect.
std::unique_ptr<::mlir::PasscreateConvertOpenMPToLLVMPass ()
void configureOpenMPToLLVMConversionLegality (ConversionTarget &target, const LLVMTypeConverter &typeConverter)
 Configure dynamic conversion legality of regionless operations from OpenMP to LLVM.
void populateOpenMPToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Populate the given list with patterns that convert from OpenMP to LLVM.
void registerConvertOpenMPToLLVMInterface (DialectRegistry &registry)
 Registers the ConvertToLLVMPatternInterface interface in the OpenMP dialect.
std::unique_ptr<::mlir::PasscreateConvertAffineForToGPUPass ()
std::unique_ptr<::mlir::PasscreateConvertAffineForToGPUPass (ConvertAffineForToGPUPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertPDLToPDLInterpPass ()
std::unique_ptr<::mlir::PasscreateConvertParallelLoopToGpuPass ()
std::unique_ptr<::mlir::PasscreateConvertSCFToOpenMPPass ()
std::unique_ptr<::mlir::PasscreateConvertSCFToOpenMPPass (ConvertSCFToOpenMPPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertSPIRVToLLVMPass ()
std::unique_ptr<::mlir::PasscreateConvertSPIRVToLLVMPass (ConvertSPIRVToLLVMPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertShapeConstraintsPass ()
std::unique_ptr<::mlir::PasscreateConvertShapeToStandardPass ()
std::unique_ptr<::mlir::PasscreateConvertShardToMPIPass ()
std::unique_ptr<::mlir::PasscreateConvertTensorToLinalgPass ()
std::unique_ptr<::mlir::PasscreateConvertTensorToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertTensorToSPIRVPass (ConvertTensorToSPIRVPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertVectorToAMX ()
std::unique_ptr<::mlir::PasscreateConvertVectorToArmSMEPass ()
std::unique_ptr<::mlir::PasscreateConvertVectorToLLVMPass ()
std::unique_ptr<::mlir::PasscreateConvertVectorToLLVMPass (ConvertVectorToLLVMPassOptions options)
std::unique_ptr<::mlir::PasscreateConvertVectorToSPIRVPass ()
std::unique_ptr<::mlir::PasscreateConvertVectorToXeGPU ()
std::unique_ptr<::mlir::PasscreateConvertXeGPUToXeVMPass ()
std::unique_ptr<::mlir::PasscreateConvertXeVMToLLVMPass ()
std::unique_ptr<::mlir::PasscreateLowerHostCodeToLLVMPass ()
std::unique_ptr<::mlir::PasscreateReconcileUnrealizedCastsPass ()
std::unique_ptr<::mlir::PasscreateSCFToControlFlowPass ()
std::unique_ptr<::mlir::PasscreateSCFToControlFlowPass (SCFToControlFlowPassOptions options)
std::unique_ptr<::mlir::PasscreateSCFToEmitC ()
std::unique_ptr<::mlir::PasscreateSCFToSPIRV ()
std::unique_ptr<::mlir::PasscreateTosaToArithPass ()
std::unique_ptr<::mlir::PasscreateTosaToArithPass (TosaToArithPassOptions options)
std::unique_ptr<::mlir::PasscreateTosaToMLProgram ()
std::unique_ptr<::mlir::PasscreateTosaToSCFPass ()
std::unique_ptr<::mlir::PasscreateTosaToTensorPass ()
std::unique_ptr<::mlir::PasscreateUBToLLVMConversionPass ()
std::unique_ptr<::mlir::PasscreateUBToLLVMConversionPass (UBToLLVMConversionPassOptions options)
std::unique_ptr<::mlir::PasscreateUBToSPIRVConversionPass ()
std::unique_ptr< OperationPass< ModuleOp > > createConvertPDLToPDLInterpPass (DenseMap< Operation *, PDLPatternConfigSet * > &configMap)
 Creates and returns a pass to convert PDL ops to PDL interpreter ops.
void populateSCFToControlFlowConversionPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to convert SCF operations to CFG branch-based operations within the ControlFlow dialect.
void populateSCFToEmitCConversionPatterns (RewritePatternSet &patterns, TypeConverter &typeConverter)
 Collect a set of patterns to convert SCF operations to the EmitC dialect.
void registerConvertSCFToEmitCInterface (DialectRegistry &registry)
LogicalResult convertAffineLoopNestToGPULaunch (affine::AffineForOp forOp, unsigned numBlockDims, unsigned numThreadDims)
 Convert a perfect affine loop nest with the outermost loop identified by forOp into a gpu::Launch operation.
void populateParallelLoopToGPUPatterns (RewritePatternSet &patterns)
 Adds the conversion pattern from scf.parallel to gpu.launch to the provided pattern list.
void configureParallelLoopToGPULegality (ConversionTarget &target)
 Configures the rewrite target such that only scf.parallel operations that are not rewritten by the provided patterns are legal.
void finalizeParallelLoopToGPUConversion (Operation *op)
 Clean up after applyPartialConversion/applyFullConversion call.
void populateSCFToSPIRVPatterns (const 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.
std::unique_ptr< OperationPass<> > createConvertSCFToSPIRVPass ()
 Creates a pass to convert SCF ops into SPIR-V ops.
void populateShapeToStandardConversionPatterns (RewritePatternSet &patterns)
void populateConvertShapeConstraintsConversionPatterns (RewritePatternSet &patterns)
unsigned storageClassToAddressSpace (spirv::ClientAPI clientAPI, spirv::StorageClass storageClass)
void encodeBindAttribute (ModuleOp module)
 Encodes global variable's descriptor set and binding into its name if they both exist.
void populateSPIRVToLLVMTypeConversion (LLVMTypeConverter &typeConverter, spirv::ClientAPI clientAPIForAddressSpaceMapping=spirv::ClientAPI::Unknown)
 Populates type conversions with additional SPIR-V types.
void populateSPIRVToLLVMConversionPatterns (const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns, spirv::ClientAPI clientAPIForAddressSpaceMapping=spirv::ClientAPI::Unknown)
 Populates the given list with patterns that convert from SPIR-V to LLVM.
void populateSPIRVToLLVMFunctionConversionPatterns (const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns)
 Populates the given list with patterns for function conversion from SPIR-V to LLVM.
void populateSPIRVToLLVMModuleConversionPatterns (const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns)
 Populates the given patterns for module conversion from SPIR-V to LLVM.
void populateTensorToLinalgPatterns (RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating tensor ops to Linalg ops.
void populateTensorToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, int64_t byteCountThreshold, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating tensor ops to SPIR-V ops.
void populateVectorToAMXConversionPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to convert from the vector to AMX ops.
void populateVectorToArmSMEPatterns (RewritePatternSet &patterns, MLIRContext &ctx)
 Collect a set of patterns to lower Vector ops to ArmSME ops that map to LLVM intrinsics.
void populatePrepareVectorToMMAPatterns (RewritePatternSet &patterns, bool useNvGpu=false)
 Patterns to transform vector ops into a canonical form to convert to MMA matrix operations.
LogicalResult convertVectorToMMAOps (RewriterBase &rewriter, Operation *rootOp)
 Convert vector ops to MMA matrix operations nested under rootOp.
LogicalResult convertVectorToNVVMCompatibleMMASync (RewriterBase &rewriter, Operation *rootOp)
 Convert vector ops ops nested under rootOp to vector and GPU operaitons compatible with the nvvm.mma.sync lowering path.
std::unique_ptr< PasscreateConvertVectorToGPUPass (bool useNvGpu=false)
 Convert from vector to GPU ops.
void populateVectorToLLVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, bool reassociateFPReductions=false, bool force32BitVectorIndices=false, bool useVectorAlignment=false)
 Collect a set of patterns to convert from the Vector dialect to LLVM.
void populateVectorToSCFConversionPatterns (RewritePatternSet &patterns, const VectorTransferToSCFOptions &options=VectorTransferToSCFOptions())
 Collect a set of patterns to convert from the Vector dialect to SCF + func.
std::unique_ptr< PasscreateConvertVectorToSCFPass (const VectorTransferToSCFOptions &options=VectorTransferToSCFOptions())
 Create a pass to convert a subset of vector ops to SCF.
void populateVectorToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating Vector Ops to SPIR-V ops.
void populateVectorReductionToSPIRVDotProductPatterns (RewritePatternSet &patterns)
 Appends patterns to convert vector reduction of the form:
void populateVectorToXeGPUConversionPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to convert from the vector to XeGPU ops.
void populateXeGPUToXeVMConversionPatterns (const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns)
void populateXeVMToLLVMConversionPatterns (ConversionTarget &target, RewritePatternSet &patterns)
void registerConvertXeVMToLLVMInterface (DialectRegistry &registry)
void setupDebuggerExecutionContextHook (tracing::ExecutionContext &executionContext)
void populateAMXLegalizeForLLVMExportPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Collect a set of patterns to lower AMX ops to ops that map to LLVM intrinsics.
void configureAMXLegalizeForExportTarget (LLVMConversionTarget &target)
 Configure the target to support lowering AMX ops to ops that map to LLVM intrinsics.
void registerConvertAMXToLLVMInterface (DialectRegistry &registry)
 Register LLVM conversion interface for AMX dialect.
std::optional< SmallVector< OpFoldResult > > inferExpandShapeOutputShape (OpBuilder &b, Location loc, ShapedType expandedType, ArrayRef< ReassociationIndices > reassociation, ArrayRef< OpFoldResult > inputShape)
 Infer the output shape for a {memref|tensor}.expand_shape when it is possible to do so.
detail::op_matcher< arith::ConstantIndexOpmatchConstantIndex ()
 Matches a ConstantIndexOp.
llvm::SmallBitVector getPositionsOfShapeOne (unsigned rank, ArrayRef< int64_t > shape)
Value getValueOrCreateConstantIntOp (OpBuilder &b, Location loc, OpFoldResult ofr)
 Converts an OpFoldResult to a Value.
Value getValueOrCreateConstantIndexOp (OpBuilder &b, Location loc, OpFoldResult ofr)
 Converts an OpFoldResult to a Value.
SmallVector< ValuegetValueOrCreateConstantIndexOp (OpBuilder &b, Location loc, ArrayRef< OpFoldResult > valueOrAttrVec)
 Similar to the other overload, but converts multiple OpFoldResults into Values.
Value getValueOrCreateCastToIndexLike (OpBuilder &b, Location loc, Type targetType, Value value)
 Create a cast from an index-like value (index or integer) to another index-like value.
Value convertScalarToDtype (OpBuilder &b, Location loc, Value operand, Type toType, bool isUnsignedCast)
 Converts a scalar value operand to type toType.
Value createScalarOrSplatConstant (OpBuilder &builder, Location loc, Type type, const APInt &value)
 Create a constant of type type at location loc whose value is value (an APInt or APFloat whose type must match the element type of type).
Value createScalarOrSplatConstant (OpBuilder &builder, Location loc, Type type, int64_t value)
Value createScalarOrSplatConstant (OpBuilder &builder, Location loc, Type type, const APFloat &value)
Type getType (OpFoldResult ofr)
 Returns the int type of the integer in ofr.
void populateArmSVELegalizeForLLVMExportPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Collect a set of patterns to lower ArmSVE ops to ops that map to LLVM intrinsics.
void populateLowerContractionToSVEI8MMPatterns (RewritePatternSet &patterns)
void populateLowerContractionToSVEBFMMLAPatterns (RewritePatternSet &patterns)
void configureArmSVELegalizeForExportTarget (LLVMConversionTarget &target)
 Configure the target to support lowering ArmSVE ops to ops that map to LLVM intrinsics.
std::unique_ptr<::mlir::PasscreateAsyncFuncToAsyncRuntimePass ()
std::unique_ptr<::mlir::PasscreateAsyncParallelForPass ()
std::unique_ptr<::mlir::PasscreateAsyncParallelForPass (AsyncParallelForPassOptions options)
std::unique_ptr<::mlir::PasscreateAsyncRuntimePolicyBasedRefCountingPass ()
std::unique_ptr<::mlir::PasscreateAsyncRuntimeRefCountingOptPass ()
std::unique_ptr<::mlir::PasscreateAsyncRuntimeRefCountingPass ()
std::unique_ptr<::mlir::PasscreateAsyncToAsyncRuntimePass ()
void populateAsyncFuncToAsyncRuntimeConversionPatterns (RewritePatternSet &patterns, ConversionTarget &target)
void registerAsyncFuncToAsyncRuntimePass ()
void registerAsyncFuncToAsyncRuntimePassPass ()
void registerAsyncParallelForPass ()
void registerAsyncParallelForPassPass ()
void registerAsyncRuntimePolicyBasedRefCountingPass ()
void registerAsyncRuntimePolicyBasedRefCountingPassPass ()
void registerAsyncRuntimeRefCountingOptPass ()
void registerAsyncRuntimeRefCountingOptPassPass ()
void registerAsyncRuntimeRefCountingPass ()
void registerAsyncRuntimeRefCountingPassPass ()
void registerAsyncToAsyncRuntimePass ()
void registerAsyncToAsyncRuntimePassPass ()
void registerAsyncPasses ()
template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref< std::optional<ResultElementValueT>(ElementValueT, ElementValueT)>>
Attribute constFoldBinaryOpConditional (ArrayRef< Attribute > operands, Type resultType, CalculationT &&calculate)
 Performs constant folding calculate with element-wise behavior on the two attributes in operands and returns the result if possible.
template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref< std::optional<ResultElementValueT>(ElementValueT, ElementValueT)>>
Attribute constFoldBinaryOpConditional (ArrayRef< Attribute > operands, CalculationT &&calculate)
 Performs constant folding calculate with element-wise behavior on the two attributes in operands and returns the result if possible.
template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = void, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<ResultElementValueT(ElementValueT, ElementValueT)>>
Attribute constFoldBinaryOp (ArrayRef< Attribute > operands, Type resultType, CalculationT &&calculate)
template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<ResultElementValueT(ElementValueT, ElementValueT)>>
Attribute constFoldBinaryOp (ArrayRef< Attribute > operands, CalculationT &&calculate)
template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<std::optional<ResultElementValueT>(ElementValueT)>>
Attribute constFoldUnaryOpConditional (ArrayRef< Attribute > operands, Type resultType, CalculationT &&calculate)
 Performs constant folding calculate with element-wise behavior on the one attributes in operands and returns the result if possible.
template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<std::optional<ResultElementValueT>(ElementValueT)>>
Attribute constFoldUnaryOpConditional (ArrayRef< Attribute > operands, CalculationT &&calculate)
 Performs constant folding calculate with element-wise behavior on the one attributes in operands and returns the result if possible.
template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<ResultElementValueT(ElementValueT)>>
Attribute constFoldUnaryOp (ArrayRef< Attribute > operands, Type resultType, CalculationT &&calculate)
template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<ResultElementValueT(ElementValueT)>>
Attribute constFoldUnaryOp (ArrayRef< Attribute > operands, CalculationT &&calculate)
template<class AttrElementT, class TargetAttrElementT, class ElementValueT = typename AttrElementT::ValueType, class TargetElementValueT = typename TargetAttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class CalculationT = function_ref<TargetElementValueT(ElementValueT, bool)>>
Attribute constFoldCastOp (ArrayRef< Attribute > operands, Type resType, CalculationT &&calculate)
void populateEmitCSizeTTypeConversions (TypeConverter &converter)
void populateCallOpTypeConversionPattern (RewritePatternSet &patterns, const TypeConverter &converter, PatternBenefit benefit=1)
 Add a pattern to the given pattern list to convert the operand and result types of a CallOp with the given type converter.
void populateBranchOpInterfaceTypeConversionPattern (RewritePatternSet &patterns, const TypeConverter &converter, function_ref< bool(BranchOpInterface branchOp, int idx)> shouldConvertBranchOperand=nullptr, PatternBenefit benefit=1)
 Add a pattern to the given pattern list to rewrite branch operations to use operands that have been legalized by the conversion framework.
bool isLegalForBranchOpInterfaceTypeConversionPattern (Operation *op, const TypeConverter &converter)
 Return true if op is a BranchOpInterface op whose operands are all legal according to converter.
void populateReturnOpTypeConversionPattern (RewritePatternSet &patterns, const TypeConverter &converter, PatternBenefit benefit=1)
 Add a pattern to the given pattern list to rewrite return ops to use operands that have been legalized by the conversion framework.
bool isLegalForReturnOpTypeConversionPattern (Operation *op, const TypeConverter &converter, bool returnOpAlwaysLegal=false)
 For ReturnLike ops (except return), return True.
bool isNotBranchOpInterfaceOrReturnLikeOp (Operation *op)
 Return true if op is neither BranchOpInterface nor ReturnLike.
void promoteToWorkgroupMemory (gpu::GPUFuncOp op, unsigned arg)
 Promotes a function argument to workgroup memory in the given function.
std::unique_ptr<::mlir::PasscreateGpuAsyncRegionPass ()
std::unique_ptr<::mlir::PasscreateGpuDecomposeMemrefsPass ()
std::unique_ptr<::mlir::PasscreateGpuEliminateBarriers ()
std::unique_ptr<::mlir::PasscreateGpuKernelOutliningPass ()
std::unique_ptr<::mlir::PasscreateGpuKernelOutliningPass (GpuKernelOutliningPassOptions options)
std::unique_ptr<::mlir::PasscreateGpuLaunchSinkIndexComputationsPass ()
std::unique_ptr<::mlir::PasscreateGpuMapParallelLoopsPass ()
std::unique_ptr<::mlir::PasscreateGpuMapParallelLoopsPass (GpuMapParallelLoopsPassOptions options)
std::unique_ptr<::mlir::PasscreateGpuModuleToBinaryPass ()
std::unique_ptr<::mlir::PasscreateGpuModuleToBinaryPass (GpuModuleToBinaryPassOptions options)
std::unique_ptr<::mlir::PasscreateGpuNVVMAttachTarget ()
std::unique_ptr<::mlir::PasscreateGpuNVVMAttachTarget (GpuNVVMAttachTargetOptions options)
std::unique_ptr<::mlir::PasscreateGpuROCDLAttachTarget ()
std::unique_ptr<::mlir::PasscreateGpuROCDLAttachTarget (GpuROCDLAttachTargetOptions options)
std::unique_ptr<::mlir::PasscreateGpuSPIRVAttachTarget ()
std::unique_ptr<::mlir::PasscreateGpuSPIRVAttachTarget (GpuSPIRVAttachTargetOptions options)
std::unique_ptr<::mlir::PasscreateGpuXeVMAttachTarget ()
std::unique_ptr<::mlir::PasscreateGpuXeVMAttachTarget (GpuXeVMAttachTargetOptions options)
void populateGpuGlobalIdPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to rewrite GlobalIdOp op within the GPU dialect.
void populateGpuSubgroupIdPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to rewrite SubgroupIdOp op within the GPU dialect.
void populateGpuShufflePatterns (RewritePatternSet &patterns)
 Collect a set of patterns to rewrite shuffle ops within the GPU dialect.
void populateGpuAllReducePatterns (RewritePatternSet &patterns)
 Collect a set of patterns to rewrite all-reduce ops within the GPU dialect.
void populateGpuBreakDownSubgroupReducePatterns (RewritePatternSet &patterns, unsigned maxShuffleBitwidth=32, PatternBenefit benefit=1)
 Collect a set of patterns to break down subgroup_reduce ops into smaller ones supported by the target of size <= maxShuffleBitwidth, where size is the subgroup_reduce value bitwidth.
void populateGpuLowerSubgroupReduceToShufflePatterns (RewritePatternSet &patterns, unsigned subgroupSize, unsigned shuffleBitwidth=32, PatternBenefit benefit=1)
 Collect a set of patterns to lower gpu.subgroup_reduce into gpu.shuffle ops over shuffleBitwidth scalar types.
void populateGpuLowerClusteredSubgroupReduceToShufflePatterns (RewritePatternSet &patterns, unsigned subgroupSize, unsigned shuffleBitwidth=32, PatternBenefit benefit=1)
 Disjoint counterpart of populateGpuLowerSubgroupReduceToShufflePatterns that only matches gpu.subgroup_reduce ops with a cluster_size.
void populateGpuLowerSubgroupReduceToDPPPatterns (RewritePatternSet &patterns, unsigned subgroupSize, amdgpu::Chipset chipset, PatternBenefit benefit=1)
 Collect a set of patterns to lower gpu.subgroup_reduce into amdgpu.dpp ops over scalar types.
void populateGpuLowerClusteredSubgroupReduceToDPPPatterns (RewritePatternSet &patterns, unsigned subgroupSize, amdgpu::Chipset chipset, PatternBenefit benefit=1)
 Disjoint counterpart of populateGpuLowerSubgroupReduceToDPPPatterns that only matches gpu.subgroup_reduce ops with a cluster_size.
void populateGpuRewritePatterns (RewritePatternSet &patterns)
 Collect all patterns to rewrite ops within the GPU dialect.
void populateGpuDecomposeMemrefsPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to decompose memrefs ops.
void populateGpuEliminateBarriersPatterns (RewritePatternSet &patterns)
 Erase barriers that do not enforce conflicting memory side effects.
void populateGpuPromoteShuffleToAMDGPUPatterns (RewritePatternSet &patterns, std::optional< amdgpu::Chipset > maybeChipset)
 Tries to promote gpu.shuffles to specialized AMDGPU intrinsics.
void registerGpuAsyncRegionPass ()
void registerGpuAsyncRegionPassPass ()
void registerGpuDecomposeMemrefsPass ()
void registerGpuDecomposeMemrefsPassPass ()
void registerGpuEliminateBarriers ()
void registerGpuEliminateBarriersPass ()
void registerGpuKernelOutliningPass ()
void registerGpuKernelOutliningPassPass ()
void registerGpuLaunchSinkIndexComputationsPass ()
void registerGpuLaunchSinkIndexComputationsPassPass ()
void registerGpuMapParallelLoopsPass ()
void registerGpuMapParallelLoopsPassPass ()
void registerGpuModuleToBinaryPass ()
void registerGpuModuleToBinaryPassPass ()
void registerGpuNVVMAttachTarget ()
void registerGpuNVVMAttachTargetPass ()
void registerGpuROCDLAttachTarget ()
void registerGpuROCDLAttachTargetPass ()
void registerGpuSPIRVAttachTarget ()
void registerGpuSPIRVAttachTargetPass ()
void registerGpuXeVMAttachTarget ()
void registerGpuXeVMAttachTargetPass ()
void registerGPUPasses ()
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.
LogicalResult sinkOperationsIntoLaunchOp (gpu::LaunchOp launchOp, llvm::function_ref< bool(Operation *)> isSinkingBeneficiary)
 Sink operations into the launchOp to reduce the number of values that are used within the region of the operation, but defined outside of the region.
std::unique_ptr<::mlir::PasscreateConvertElementwiseToLinalgPass ()
std::unique_ptr<::mlir::PasscreateConvertLinalgToAffineLoopsPass ()
std::unique_ptr<::mlir::PasscreateConvertLinalgToLoopsPass ()
std::unique_ptr<::mlir::PasscreateConvertLinalgToParallelLoopsPass ()
std::unique_ptr<::mlir::PasscreateLinalgBlockPackMatmul ()
std::unique_ptr<::mlir::PasscreateLinalgBlockPackMatmul (LinalgBlockPackMatmulOptions options)
std::unique_ptr<::mlir::PasscreateLinalgDetensorizePass ()
std::unique_ptr<::mlir::PasscreateLinalgDetensorizePass (LinalgDetensorizePassOptions options)
std::unique_ptr<::mlir::PasscreateLinalgElementwiseOpFusionPass ()
std::unique_ptr<::mlir::PasscreateLinalgFoldIntoElementwisePass ()
std::unique_ptr<::mlir::PasscreateLinalgFoldUnitExtentDimsPass ()
std::unique_ptr<::mlir::PasscreateLinalgFoldUnitExtentDimsPass (LinalgFoldUnitExtentDimsPassOptions options)
std::unique_ptr<::mlir::PasscreateLinalgGeneralizeNamedOpsPass ()
std::unique_ptr<::mlir::PasscreateLinalgInlineScalarOperandsPass ()
std::unique_ptr<::mlir::PasscreateLinalgMorphOpsPass ()
std::unique_ptr<::mlir::PasscreateLinalgMorphOpsPass (LinalgMorphOpsPassOptions options)
std::unique_ptr<::mlir::PasscreateLinalgSpecializeGenericOpsPass ()
std::unique_ptr<::mlir::PasscreateSimplifyDepthwiseConvPass ()
void registerConvertElementwiseToLinalgPass ()
void registerConvertElementwiseToLinalgPassPass ()
void registerConvertLinalgToAffineLoopsPass ()
void registerConvertLinalgToAffineLoopsPassPass ()
void registerConvertLinalgToLoopsPass ()
void registerConvertLinalgToLoopsPassPass ()
void registerConvertLinalgToParallelLoopsPass ()
void registerConvertLinalgToParallelLoopsPassPass ()
void registerLinalgBlockPackMatmul ()
void registerLinalgBlockPackMatmulPass ()
void registerLinalgDetensorizePass ()
void registerLinalgDetensorizePassPass ()
void registerLinalgElementwiseOpFusionPass ()
void registerLinalgElementwiseOpFusionPassPass ()
void registerLinalgFoldIntoElementwisePass ()
void registerLinalgFoldIntoElementwisePassPass ()
void registerLinalgFoldUnitExtentDimsPass ()
void registerLinalgFoldUnitExtentDimsPassPass ()
void registerLinalgGeneralizeNamedOpsPass ()
void registerLinalgGeneralizeNamedOpsPassPass ()
void registerLinalgInlineScalarOperandsPass ()
void registerLinalgInlineScalarOperandsPassPass ()
void registerLinalgMorphOpsPass ()
void registerLinalgMorphOpsPassPass ()
void registerLinalgSpecializeGenericOpsPass ()
void registerLinalgSpecializeGenericOpsPassPass ()
void registerSimplifyDepthwiseConvPass ()
void registerSimplifyDepthwiseConvPassPass ()
void registerLinalgPasses ()
ParseResult parseSemiFunctionType (OpAsmParser &parser, Type &argumentType, Type &resultType, bool resultOptional=true)
 Parses a single non-function type or a function type with at least one argument.
ParseResult parseSemiFunctionType (OpAsmParser &parser, Type &argumentType, SmallVectorImpl< Type > &resultTypes)
void printSemiFunctionType (OpAsmPrinter &printer, Operation *op, Type argumentType, TypeRange resultType)
 Prints argument and result types in a syntax similar to that of FunctionType but allowing and requiring one to omit the parens around the argument type in absence of result types, and without the trailing -> ().
void printSemiFunctionType (OpAsmPrinter &printer, Operation *op, Type argumentType, Type resultType, bool resultOptional=true)
void populateMathAlgebraicSimplificationPatterns (RewritePatternSet &patterns)
void populatePolynomialApproximateTanhPattern (RewritePatternSet &patterns)
void populatePolynomialApproximateErfPattern (RewritePatternSet &patterns)
void populatePolynomialApproximateErfcPattern (RewritePatternSet &patterns)
void populateMathF32ExpansionPatterns (RewritePatternSet &patterns, llvm::function_ref< bool(StringRef)> predicate, PatternBenefit=1)
void populateMathPolynomialApproximationPatterns (RewritePatternSet &patterns, llvm::function_ref< bool(StringRef)> predicate, PatternBenefit=1)
void populateMathPolynomialApproximationPatterns (RewritePatternSet &patterns, const MathPolynomialApproximationOptions &options={})
void populateUpliftToFMAPatterns (RewritePatternSet &patterns)
raw_ostreamoperator<< (raw_ostream &os, const Range &range)
SmallVector< Range, 8 > getOrCreateRanges (OffsetSizeAndStrideOpInterface op, OpBuilder &b, Location loc)
 Return the list of Range (i.e.
void registerOptimizeSharedMemory ()
void registerOptimizeSharedMemoryPass ()
void registerNVGPUPasses ()
std::unique_ptr< PasscreateForLoopSpecializationPass ()
 Creates a pass that specializes for loop for unrolling and vectorization.
std::unique_ptr< PasscreateForLoopPeelingPass ()
 Creates a pass that peels for loops at their upper bounds for better vectorization.
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.
std::unique_ptr< PasscreateTestSCFParallelLoopCollapsingPass ()
 Creates a pass that transforms a single ParallelLoop over N induction variables into another ParallelLoop over less than N induction variables.
std::unique_ptr< PasscreateParallelLoopFusionPass ()
 Creates a loop fusion pass which fuses parallel loops.
std::unique_ptr< PasscreateParallelLoopSpecializationPass ()
 Creates a pass that specializes parallel loop for unrolling and vectorization.
std::unique_ptr< PasscreateParallelLoopTilingPass (llvm::ArrayRef< int64_t > tileSize={}, bool noMinMaxBounds=false)
 Creates a pass which tiles innermost parallel loops.
std::unique_ptr< PasscreateForLoopRangeFoldingPass ()
 Creates a pass which folds arith ops on induction variable into loop range.
std::unique_ptr< PasscreateForallToForLoopPass ()
 Creates a pass that converts SCF forall loops to SCF for loops.
std::unique_ptr< PasscreateForallToParallelLoopPass ()
 Creates a pass that converts SCF forall loops to SCF parallel loops.
std::unique_ptr< PasscreateParallelForToNestedForsPass ()
 Creates a pass that converts SCF forall loops to SCF parallel loops.
std::unique_ptr< PasscreateForToWhileLoopPass ()
void registerSCFForLoopCanonicalization ()
void registerSCFForLoopCanonicalizationPass ()
void registerSCFForLoopPeeling ()
void registerSCFForLoopPeelingPass ()
void registerSCFForLoopRangeFolding ()
void registerSCFForLoopRangeFoldingPass ()
void registerSCFForLoopSpecialization ()
void registerSCFForLoopSpecializationPass ()
void registerSCFForToWhileLoop ()
void registerSCFForToWhileLoopPass ()
void registerSCFForallToForLoop ()
void registerSCFForallToForLoopPass ()
void registerSCFForallToParallelLoop ()
void registerSCFForallToParallelLoopPass ()
void registerSCFParallelForToNestedFors ()
void registerSCFParallelForToNestedForsPass ()
void registerSCFParallelLoopFusion ()
void registerSCFParallelLoopFusionPass ()
void registerSCFParallelLoopSpecialization ()
void registerSCFParallelLoopSpecializationPass ()
void registerSCFParallelLoopTiling ()
void registerSCFParallelLoopTilingPass ()
void registerTestSCFParallelLoopCollapsing ()
void registerTestSCFParallelLoopCollapsingPass ()
void registerSCFPasses ()
SmallVector< scf::ForOp > replaceLoopNestWithNewYields (RewriterBase &rewriter, MutableArrayRef< scf::ForOp > loopNest, ValueRange newIterOperands, const NewYieldValuesFn &newYieldValuesFn, bool replaceIterOperandsUsesInLoop=true)
 Update a perfectly nested loop nest to yield new values from the innermost loop and propagating it up through the loop nest.
FailureOr< func::FuncOp > outlineSingleBlockRegion (RewriterBase &rewriter, Location loc, Region &region, StringRef funcName, func::CallOp *callOp=nullptr)
 Outline a region with a single block into a new FuncOp.
LogicalResult outlineIfOp (RewriterBase &b, scf::IfOp ifOp, func::FuncOp *thenFn, StringRef thenFnName, func::FuncOp *elseFn, StringRef elseFnName)
 Outline the then and/or else regions of ifOp as follows:
bool getInnermostParallelLoops (Operation *rootOp, SmallVectorImpl< scf::ParallelOp > &result)
 Get a list of innermost parallel loops contained in rootOp.
std::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.
LogicalResult coalesceLoops (MutableArrayRef< scf::ForOp > loops)
 Replace a perfect nest of "for" loops with a single linearized loop.
LogicalResult coalesceLoops (RewriterBase &rewriter, MutableArrayRef< scf::ForOp >)
LogicalResult coalescePerfectlyNestedSCFForLoops (scf::ForOp op)
 Walk an affine.for to find a band to coalesce.
void collapseParallelLoops (RewriterBase &rewriter, scf::ParallelOp loops, ArrayRef< std::vector< unsigned > > combinedDimensions)
 Take the ParallelLoop and for each set of dimension indices, combine them into a single dimension.
FailureOr< UnrolledLoopInfoloopUnrollByFactor (scf::ForOp forOp, uint64_t unrollFactor, function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn=nullptr)
 Unrolls this for operation by the specified unroll factor.
LogicalResult loopUnrollFull (scf::ForOp forOp)
 Unrolls this loop completely.
LogicalResult loopUnrollJamByFactor (scf::ForOp forOp, uint64_t unrollFactor)
 Unrolls and jams this scf.for operation by the specified unroll factor.
Range emitNormalizedLoopBounds (RewriterBase &rewriter, Location loc, OpFoldResult lb, OpFoldResult ub, OpFoldResult step)
 Materialize bounds and step of a zero-based and unit-step loop derived by normalizing the specified bounds and step.
void denormalizeInductionVariable (RewriterBase &rewriter, Location loc, Value normalizedIv, OpFoldResult origLb, OpFoldResult origStep)
 Get back the original induction variable values after loop normalization.
TileLoops extractFixedOuterLoops (scf::ForOp rootFOrOp, ArrayRef< int64_t > sizes)
SmallVector< Loops, 8 > tile (ArrayRef< scf::ForOp > forOps, ArrayRef< Value > sizes, ArrayRef< scf::ForOp > targets)
 Performs tiling fo imperfectly nested loops (with interchange) by strip-mining the forOps by sizes and sinking them, in their order of occurrence in forOps, under each of the targets.
Loops tile (ArrayRef< scf::ForOp > forOps, ArrayRef< Value > sizes, scf::ForOp target)
 Performs tiling (with interchange) by strip-mining the forOps by sizes and sinking them, in their order of occurrence in forOps, under target.
Loops tilePerfectlyNested (scf::ForOp rootForOp, ArrayRef< Value > sizes)
 Tile a nest of scf::ForOp loops rooted at rootForOp with the given (parametric) sizes.
void getPerfectlyNestedLoops (SmallVectorImpl< scf::ForOp > &nestedLoops, scf::ForOp root)
 Get perfectly nested sequence of loops starting at root of loop nest (the first op being another AffineFor, and the second op - a terminator).
scf::ForallOp fuseIndependentSiblingForallLoops (scf::ForallOp target, scf::ForallOp source, RewriterBase &rewriter)
 Given two scf.forall loops, target and source, fuses target into source.
scf::ForOp fuseIndependentSiblingForLoops (scf::ForOp target, scf::ForOp source, RewriterBase &rewriter)
 Given two scf.for loops, target and source, fuses target into source.
FailureOr< scf::ForallOp > normalizeForallOp (RewriterBase &rewriter, scf::ForallOp forallOp)
 Normalize an scf.forall operation.
bool isPerfectlyNestedForLoops (MutableArrayRef< LoopLikeOpInterface > loops)
 Check if the provided loops are perfectly nested for-loops.
void generateUnrolledLoop (Block *loopBodyBlock, Value iv, uint64_t unrollFactor, function_ref< Value(unsigned, Value, OpBuilder)> ivRemapFn, function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn, ValueRange iterArgs, ValueRange yieldedValues, IRMapping *clonedToSrcOpsMap=nullptr)
 Generate unrolled copies of an scf loop's 'loopBodyBlock', with 'iterArgs' and 'yieldedValues' as the block arguments and yielded values of the loop.
FailureOr< scf::ParallelOp > parallelLoopUnrollByFactors (scf::ParallelOp op, ArrayRef< uint64_t > unrollFactors, RewriterBase &rewriter, function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn=nullptr, IRMapping *clonedToSrcOpsMap=nullptr)
 Unroll this scf::Parallel loop by the specified unroll factors.
llvm::SmallVector< int64_tgetConstLoopTripCounts (mlir::LoopLikeOpInterface loopOp)
 Get constant trip counts for each of the induction variables of the given loop operation.
std::unique_ptr<::mlir::PasscreateOutlineShapeComputationPass ()
std::unique_ptr<::mlir::PasscreateRemoveShapeConstraintsPass ()
std::unique_ptr<::mlir::PasscreateShapeToShapeLoweringPass ()
void populateShapeRewritePatterns (RewritePatternSet &patterns)
 Collects a set of patterns to rewrite ops within the Shape dialect.
void populateRemoveShapeConstraintsPatterns (RewritePatternSet &patterns)
void registerOutlineShapeComputationPass ()
void registerOutlineShapeComputationPassPass ()
void registerRemoveShapeConstraintsPass ()
void registerRemoveShapeConstraintsPassPass ()
void registerShapeToShapeLoweringPass ()
void registerShapeToShapeLoweringPassPass ()
void registerShapePasses ()
void populateSparseAssembler (RewritePatternSet &patterns, bool directOut)
std::unique_ptr< PasscreateSparseAssembler ()
std::unique_ptr< PasscreateSparseAssembler (bool directOut)
void populateSparseReinterpretMap (RewritePatternSet &patterns, ReinterpretMapScope scope, sparse_tensor::LoopOrderingStrategy strategy=sparse_tensor::LoopOrderingStrategy::kDefault)
std::unique_ptr< PasscreateSparseReinterpretMapPass ()
std::unique_ptr< PasscreateSparseReinterpretMapPass (ReinterpretMapScope scope)
std::unique_ptr< PasscreateSparseReinterpretMapPass (ReinterpretMapScope scope, sparse_tensor::LoopOrderingStrategy strategy)
void populatePreSparsificationRewriting (RewritePatternSet &patterns)
std::unique_ptr< PasscreatePreSparsificationRewritePass ()
void populateSparsificationPatterns (RewritePatternSet &patterns, const SparsificationOptions &options=SparsificationOptions())
 Sets up sparsification rewriting rules with the given options.
std::unique_ptr< PasscreateSparsificationPass ()
std::unique_ptr< PasscreateSparsificationPass (const SparsificationOptions &options)
void populateStageSparseOperationsPatterns (RewritePatternSet &patterns)
 Sets up StageSparseOperation rewriting rules.
std::unique_ptr< PasscreateStageSparseOperationsPass ()
void populateLowerSparseOpsToForeachPatterns (RewritePatternSet &patterns, bool enableRT, bool enableConvert)
std::unique_ptr< PasscreateLowerSparseOpsToForeachPass ()
std::unique_ptr< PasscreateLowerSparseOpsToForeachPass (bool enableRT, bool enableConvert)
void populateLowerForeachToSCFPatterns (RewritePatternSet &patterns)
std::unique_ptr< PasscreateLowerForeachToSCFPass ()
void populateLowerSparseIterationToSCFPatterns (const TypeConverter &converter, RewritePatternSet &patterns)
std::unique_ptr< PasscreateLowerSparseIterationToSCFPass ()
void populateSparseTensorConversionPatterns (const TypeConverter &typeConverter, RewritePatternSet &patterns)
 Sets up sparse tensor conversion rules.
std::unique_ptr< PasscreateSparseTensorConversionPass ()
void populateSparseTensorCodegenPatterns (const TypeConverter &typeConverter, RewritePatternSet &patterns, bool createSparseDeallocs, bool enableBufferInitialization)
 Sets up sparse tensor codegen rules.
std::unique_ptr< PasscreateSparseTensorCodegenPass ()
std::unique_ptr< PasscreateSparseTensorCodegenPass (bool createSparseDeallocs, bool enableBufferInitialization)
void populateSparseBufferRewriting (RewritePatternSet &patterns, bool enableBufferInitialization)
std::unique_ptr< PasscreateSparseBufferRewritePass ()
std::unique_ptr< PasscreateSparseBufferRewritePass (bool enableBufferInitialization)
void populateSparseVectorizationPatterns (RewritePatternSet &patterns, unsigned vectorLength, bool enableVLAVectorization, bool enableSIMDIndex32)
 Populates the given patterns list with vectorization rules.
std::unique_ptr< PasscreateSparseVectorizationPass ()
std::unique_ptr< PasscreateSparseVectorizationPass (unsigned vectorLength, bool enableVLAVectorization, bool enableSIMDIndex32)
void populateSparseGPUCodegenPatterns (RewritePatternSet &patterns, unsigned numThreads)
void populateSparseGPULibgenPatterns (RewritePatternSet &patterns, bool enableRT)
std::unique_ptr< PasscreateSparseGPUCodegenPass ()
std::unique_ptr< PasscreateSparseGPUCodegenPass (unsigned numThreads, bool enableRT)
void populateStorageSpecifierToLLVMPatterns (const TypeConverter &converter, RewritePatternSet &patterns)
std::unique_ptr< PasscreateStorageSpecifierToLLVMPass ()
bufferization::OneShotBufferizationOptions getBufferizationOptionsForSparsification (bool analysisOnly)
std::unique_ptr< PasscreateSparsificationAndBufferizationPass ()
std::unique_ptr< PasscreateSparsificationAndBufferizationPass (const bufferization::OneShotBufferizationOptions &bufferizationOptions, const SparsificationOptions &sparsificationOptions, bool createSparseDeallocs, bool enableRuntimeLibrary, bool enableBufferInitialization, unsigned vectorLength, bool enableVLAVectorization, bool enableSIMDIndex32, bool enableGPULibgen, SparseEmitStrategy emitStrategy, SparseParallelizationStrategy parallelizationStrategy)
std::unique_ptr< PasscreateSparseSpaceCollapsePass ()
void registerLowerForeachToSCF ()
void registerLowerForeachToSCFPass ()
void registerLowerSparseIterationToSCF ()
void registerLowerSparseIterationToSCFPass ()
void registerLowerSparseOpsToForeach ()
void registerLowerSparseOpsToForeachPass ()
void registerPreSparsificationRewrite ()
void registerPreSparsificationRewritePass ()
void registerSparseAssembler ()
void registerSparseAssemblerPass ()
void registerSparseBufferRewrite ()
void registerSparseBufferRewritePass ()
void registerSparseGPUCodegen ()
void registerSparseGPUCodegenPass ()
void registerSparseReinterpretMap ()
void registerSparseReinterpretMapPass ()
void registerSparseSpaceCollapse ()
void registerSparseSpaceCollapsePass ()
void registerSparseTensorCodegen ()
void registerSparseTensorCodegenPass ()
void registerSparseTensorConversionPass ()
void registerSparseTensorConversionPassPass ()
void registerSparseVectorization ()
void registerSparseVectorizationPass ()
void registerSparsificationAndBufferization ()
void registerSparsificationAndBufferizationPass ()
void registerSparsificationPass ()
void registerSparsificationPassPass ()
void registerStageSparseOperations ()
void registerStageSparseOperationsPass ()
void registerStorageSpecifierToLLVM ()
void registerStorageSpecifierToLLVMPass ()
void registerSparseTensorPasses ()
void populateBuiltinFuncToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating the builtin func op to the SPIR-V dialect.
void populateFuncOpVectorRewritePatterns (RewritePatternSet &patterns)
void populateReturnOpVectorRewritePatterns (RewritePatternSet &patterns)
DiagnosedDefiniteFailure emitDefiniteFailure (Location loc, const Twine &message)
 Emits a definite failure with the given message.
DiagnosedDefiniteFailure emitDefiniteFailure (Operation *op, const Twine &message={})
DiagnosedSilenceableFailure emitSilenceableFailure (Location loc, const Twine &message={})
 Emits a silenceable failure with the given message.
DiagnosedSilenceableFailure emitSilenceableFailure (Operation *op, const Twine &message={})
SmallVector< int64_tcomputeSuffixProduct (ArrayRef< int64_t > sizes)
 Given a set of sizes, return the suffix product.
SmallVector< int64_tcomputeStrides (ArrayRef< int64_t > sizes)
SmallVector< int64_tcomputeElementwiseMul (ArrayRef< int64_t > v1, ArrayRef< int64_t > v2)
 Return a vector containing llvm::zip_equal(v1, v2) multiplied elementwise.
int64_t computeSum (ArrayRef< int64_t > basis)
 Self-explicit.
int64_t computeProduct (ArrayRef< int64_t > basis)
 Self-explicit.
int64_t computeMaxLinearIndex (ArrayRef< int64_t > basis)
 Return the number of elements of basis (i.e.
int64_t linearize (ArrayRef< int64_t > offsets, ArrayRef< int64_t > basis)
 Return the linearized index of 'offsets' w.r.t.
SmallVector< int64_tdelinearize (int64_t linearIndex, ArrayRef< int64_t > strides)
 Given the strides together with a linear index in the dimension space, return the vector-space offsets in each dimension for a de-linearized index.
std::optional< SmallVector< int64_t > > computeShapeRatio (ArrayRef< int64_t > shape, ArrayRef< int64_t > subShape)
 Return the multi-dimensional integral ratio of subShape to the trailing dimensions of shape.
SmallVector< AffineExprcomputeSuffixProduct (ArrayRef< AffineExpr > sizes)
 Given a set of sizes, return the suffix product.
SmallVector< AffineExprcomputeStrides (ArrayRef< AffineExpr > sizes)
SmallVector< AffineExprcomputeElementwiseMul (ArrayRef< AffineExpr > v1, ArrayRef< AffineExpr > v2)
 Return a vector containing llvm::zip_equal(v1, v2) multiplied elementwise.
AffineExpr computeSum (MLIRContext *ctx, ArrayRef< AffineExpr > basis)
 Self-explicit.
AffineExpr computeProduct (MLIRContext *ctx, ArrayRef< AffineExpr > basis)
 Self-explicit.
AffineExpr computeMaxLinearIndex (MLIRContext *ctx, ArrayRef< AffineExpr > basis)
 Return the number of elements of basis (i.e.
AffineExpr linearize (MLIRContext *ctx, ArrayRef< AffineExpr > offsets, ArrayRef< AffineExpr > basis)
 Return the linearized index of 'offsets' w.r.t.
AffineExpr linearize (MLIRContext *ctx, ArrayRef< AffineExpr > offsets, ArrayRef< int64_t > basis)
SmallVector< AffineExprdelinearize (AffineExpr linearIndex, ArrayRef< AffineExpr > strides)
 Given the strides together with a linear index in the dimension space, return the vector-space offsets in each dimension for a de-linearized index.
SmallVector< AffineExprdelinearize (AffineExpr linearIndex, ArrayRef< int64_t > strides)
template<typename T>
SmallVector< T > applyPermutation (ArrayRef< T > input, ArrayRef< int64_t > permutation)
template<typename T>
SmallVector< T > applyPermutation (const SmallVectorImpl< T > &input, ArrayRef< int64_t > permutation)
template<typename T, unsigned N>
void applyPermutationToVector (SmallVector< T, N > &inVec, ArrayRef< int64_t > permutation)
 Apply the permutation defined by permutation to inVec.
SmallVector< int64_tinvertPermutationVector (ArrayRef< int64_t > permutation)
 Helper method to apply to inverse a permutation.
bool isIdentityPermutation (ArrayRef< int64_t > permutation)
 Returns true if permutation is an identity permutation.
bool isPermutationVector (ArrayRef< int64_t > interchange)
 Method to check if an interchange vector is a permutation.
SmallVector< int64_tcomputePermutationVector (int64_t permSize, ArrayRef< int64_t > positions, ArrayRef< int64_t > desiredPositions)
 Return a permutation vector of size permSize that would result in moving positions into desiredPositions.
SmallVector< int64_tdropDims (ArrayRef< int64_t > inputPerm, ArrayRef< int64_t > dropPositions)
 Returns a permutation vector that drop the input dims in dropPositions from inputPerm.
SmallVector< int64_tgetI64SubArray (ArrayAttr arrayAttr, unsigned dropFront=0, unsigned dropBack=0)
 Helper to return a subset of arrayAttr as a vector of int64_t.
std::pair< AffineExpr, SmallVector< OpFoldResult > > computeLinearIndex (OpFoldResult sourceOffset, ArrayRef< OpFoldResult > strides, ArrayRef< OpFoldResult > indices)
 Compute linear index from provided strides and indices, assuming strided layout.
std::pair< AffineExpr, SmallVector< OpFoldResult > > computeLinearIndex (OpFoldResult sourceOffset, ArrayRef< int64_t > strides, ArrayRef< Value > indices)
constexpr StringRef getReassociationAttrName ()
 Attribute name for the ArrayAttr which encodes reassociation indices.
std::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.
SmallVector< SmallVector< AffineExpr, 2 >, 2 > convertReassociationIndicesToExprs (MLIRContext *context, ArrayRef< ReassociationIndices > reassociationIndices)
 Convert reassociation indices to affine expressions.
SmallVector< AffineMap, 4 > getSymbolLessAffineMaps (ArrayRef< ReassociationExprs > reassociation)
 Constructs affine maps out of Array<Array<AffineExpr>>.
ArrayAttr getReassociationIndicesAttribute (Builder &b, ArrayRef< ReassociationIndices > reassociation)
 Wraps a list of reassociations in an ArrayAttr.
SmallVector< ReassociationIndices, 2 > convertReassociationMapsToIndices (ArrayRef< ReassociationExprs > reassociationExprs)
 Convert Array<Array<AffineExpr>> to Array<Array<int64_t>>.
std::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.
std::optional< SmallVector< ReassociationIndices > > getReassociationIndicesForCollapse (ArrayRef< int64_t > sourceShape, ArrayRef< int64_t > targetShape)
 Returns the reassociation maps to collapse sourceShape to targetShape if possible.
bool isReassociationValid (ArrayRef< AffineMap > reassociation, int *invalidIndex=nullptr)
 Return true if the reassociation specification is valid, false otherwise.
template<typename ReshapeOpTy, typename InverseReshapeOpTy>
static OpFoldResult foldReshapeOp (ReshapeOpTy reshapeOp, ArrayRef< Attribute > operands)
llvm::SmallBitVector getSlicedDimensions (ArrayRef< OpFoldResult > sliceInputShape, ArrayRef< Range > sliceParams)
 The input parameters offsets, sizes, strides specify a rectangular non rank-reducing slice of the collapse_shape output.
llvm::SmallBitVector getLinearizedDimensions (ArrayRef< ReassociationIndices > reassociationIndices)
 Determine which dimensions are linearized by a tensor.collapse_shape op by inspecting its reassociation indices.
bool isZeroInteger (OpFoldResult v)
 Return true if v is an IntegerAttr with value 0.
bool isOneInteger (OpFoldResult v)
 Return true if v is an IntegerAttr with value 1.
std::tuple< SmallVector< OpFoldResult >, SmallVector< OpFoldResult >, SmallVector< OpFoldResult > > getOffsetsSizesAndStrides (ArrayRef< Range > ranges)
 Given an array of Range values, return a tuple of (offset vector, sizes vector, and strides vector) formed by separating out the individual elements of each range.
void dispatchIndexOpFoldResult (OpFoldResult ofr, SmallVectorImpl< Value > &dynamicVec, SmallVectorImpl< int64_t > &staticVec)
 Helper function to dispatch an OpFoldResult into staticVec if: a) it is an IntegerAttr In other cases, the OpFoldResult is dispached to the dynamicVec.
void dispatchIndexOpFoldResults (ArrayRef< OpFoldResult > ofrs, SmallVectorImpl< Value > &dynamicVec, SmallVectorImpl< int64_t > &staticVec)
 Helper function to dispatch multiple OpFoldResults according to the behavior of dispatchIndexOpFoldResult(OpFoldResult ofr for a single OpFoldResult.
std::pair< int64_t, OpFoldResultgetSimplifiedOfrAndStaticSizePair (OpFoldResult ofr, Builder &b)
 Given OpFoldResult representing dim size value (*), generates a pair of sizes:
template<typename IntTy>
SmallVector< IntTy > extractFromIntegerArrayAttr (Attribute attr)
 Extract integer values from the assumed ArrayAttr of IntegerAttr.
OpFoldResult getAsOpFoldResult (Value val)
 Given a value, try to extract a constant Attribute.
SmallVector< OpFoldResultgetAsOpFoldResult (ValueRange values)
 Given an array of values, try to extract a constant Attribute from each value.
SmallVector< OpFoldResultgetAsOpFoldResult (ArrayAttr arrayAttr)
 Convert arrayAttr to a vector of OpFoldResult.
OpFoldResult getAsIndexOpFoldResult (MLIRContext *ctx, int64_t val)
 Convert int64_t to integer attributes of index type and return them as OpFoldResult.
SmallVector< OpFoldResultgetAsIndexOpFoldResult (MLIRContext *ctx, ArrayRef< int64_t > values)
std::optional< std::pair< APInt, bool > > getConstantAPIntValue (OpFoldResult ofr)
 If ofr is a constant integer or an IntegerAttr, return the integer.
std::optional< int64_tgetConstantIntValue (OpFoldResult ofr)
 If ofr is a constant integer or an IntegerAttr, return the integer.
std::optional< SmallVector< int64_t > > getConstantIntValues (ArrayRef< OpFoldResult > ofrs)
 If all ofrs are constant integers or IntegerAttrs, return the integers.
bool isConstantIntValue (OpFoldResult ofr, int64_t value)
 Return true if ofr is constant integer equal to value.
bool areAllConstantIntValue (ArrayRef< OpFoldResult > ofrs, int64_t value)
 Return true if all of ofrs are constant integers equal to value.
bool areConstantIntValues (ArrayRef< OpFoldResult > ofrs, ArrayRef< int64_t > values)
 Return true if all of ofrs are constant integers equal to the corresponding value in values.
bool isEqualConstantIntOrValue (OpFoldResult ofr1, OpFoldResult ofr2)
 Return true if ofr1 and ofr2 are the same integer constant attribute values or the same SSA value.
bool isEqualConstantIntOrValueArray (ArrayRef< OpFoldResult > ofrs1, ArrayRef< OpFoldResult > ofrs2)
SmallVector< OpFoldResultgetMixedValues (ArrayRef< int64_t > staticValues, ValueRange dynamicValues, MLIRContext *context)
 Return a vector of OpFoldResults with the same size a staticValues, but all elements for which ShapedType::isDynamic is true, will be replaced by dynamicValues.
SmallVector< OpFoldResultgetMixedValues (ArrayRef< int64_t > staticValues, ValueRange dynamicValues, Builder &b)
std::pair< SmallVector< int64_t >, SmallVector< Value > > decomposeMixedValues (ArrayRef< OpFoldResult > mixedValues)
 Decompose a vector of mixed static or dynamic values into the corresponding pair of arrays.
SmallVector< ValuegetValuesSortedByKey (ArrayRef< Attribute > keys, ArrayRef< Value > values, llvm::function_ref< bool(Attribute, Attribute)> compare)
 Helper to sort values according to matching keys.
SmallVector< OpFoldResultgetValuesSortedByKey (ArrayRef< Attribute > keys, ArrayRef< OpFoldResult > values, llvm::function_ref< bool(Attribute, Attribute)> compare)
SmallVector< int64_tgetValuesSortedByKey (ArrayRef< Attribute > keys, ArrayRef< int64_t > values, llvm::function_ref< bool(Attribute, Attribute)> compare)
bool hasValidSizesOffsets (SmallVector< int64_t > sizesOrOffsets)
 Helper function to check whether the passed in sizes or offsets are valid.
bool hasValidStrides (SmallVector< int64_t > strides)
 Helper function to check whether the passed in strides are valid.
LogicalResult foldDynamicIndexList (SmallVectorImpl< OpFoldResult > &ofrs, bool onlyNonNegative=false, bool onlyNonZero=false)
 Returns "success" when any of the elements in ofrs is a constant value.
LogicalResult foldDynamicOffsetSizeList (SmallVectorImpl< OpFoldResult > &offsetsOrSizes)
 Returns "success" when any of the elements in offsetsOrSizes is a constant value.
LogicalResult foldDynamicStrideList (SmallVectorImpl< OpFoldResult > &strides)
 Returns "success" when any of the elements in strides is a constant value.
std::optional< APInt > constantTripCount (OpFoldResult lb, OpFoldResult ub, OpFoldResult step, bool isSigned, llvm::function_ref< std::optional< llvm::APSInt >(Value, Value, bool)> computeUbMinusLb)
 Return the number of iterations for a loop with a lower bound lb, upper bound ub and step step.
bool isRowMajorMatmul (ArrayAttr indexingMaps)
 Tests whether the given maps describe a row major matmul.
bool isColumnMajorMatmul (ArrayAttr indexingMaps)
 Tests whether the given maps describe a column major matmul.
bool isRowMajorBatchMatmul (ArrayAttr indexingMaps)
 Tests whether the given maps describe a row major batch matmul.
bool isVecmat (ArrayAttr indexingMaps)
 Tests whether the given maps describe a vector matrix multiplication.
bool isBatchVecmat (ArrayAttr indexingMaps)
 Tests whether the given maps describe a batch vector matrix multiplication.
bool isMatvec (ArrayAttr indexingMaps)
 Tests whether the given maps describe a matrix vector multiplication.
bool isBatchMatvec (ArrayAttr indexingMaps)
 Tests whether the given maps describe a batch matrix vector multiplication.
void findPositionsOfType (ArrayRef< utils::IteratorType > iteratorTypes, utils::IteratorType iteratorTypeName, SmallVectorImpl< unsigned > &res)
 Return positions in iteratorTypes that match iteratorTypeName.
Operationclone (OpBuilder &b, Operation *op, TypeRange newResultTypes, ValueRange newOperands)
template<typename OpT>
OpT clone (OpBuilder &b, OpT op, TypeRange newResultTypes, ValueRange newOperands)
OperationcloneWithoutRegions (OpBuilder &b, Operation *op, TypeRange newResultTypes, ValueRange newOperands)
SmallVector< NamedAttributegetPrunedAttributeList (Operation *op, ArrayRef< StringRef > elidedAttrs)
void populateX86VectorLegalizeForLLVMExportPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Collect a set of patterns to lower X86Vector ops to ops that map to LLVM intrinsics.
void configureX86VectorLegalizeForExportTarget (LLVMConversionTarget &target)
 Configure the target to support lowering X86Vector ops to ops that map to LLVM intrinsics.
int JitRunnerMain (int argc, char **argv, const DialectRegistry &registry, JitRunnerConfig config={})
 Entry point for all CPU runners.
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.
void registerAllDialects (DialectRegistry &registry)
 Add all the MLIR dialects to the provided registry.
void registerAllDialects (MLIRContext &context)
 Append all the MLIR dialects to the registry contained in the given context.
void registerAllExtensions (DialectRegistry &registry)
 This function may be called to register all MLIR dialect extensions with the provided registry.
void registerAllPasses ()
void registerFromLLVMIRTranslation ()
void registerFromSPIRVTranslation ()
void registerFromWasmTranslation ()
void registerToCppTranslation ()
void registerToLLVMIRTranslation ()
void registerToSPIRVTranslation ()
void registerAllTranslations ()
bool operator!= (RegionBranchPoint lhs, RegionBranchPoint rhs)
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, RegionBranchPoint point)
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, RegionSuccessor successor)
bool insideMutuallyExclusiveRegions (Operation *a, Operation *b)
 Return true if a and b are in mutually exclusive regions as per RegionBranchOpInterface.
RegiongetEnclosingRepetitiveRegion (Operation *op)
 Return the first enclosing region of the given op that may be executed repetitively as per RegionBranchOpInterface or nullptr if no such region exists.
RegiongetEnclosingRepetitiveRegion (Value value)
 Return the first enclosing region of the given Value that may be executed repetitively as per RegionBranchOpInterface or nullptr if no such region exists.
raw_ostreamoperator<< (raw_ostream &os, const ConstantIntRanges &range)
raw_ostreamoperator<< (raw_ostream &, const IntegerValueRange &)
SmallVector< IntegerValueRangegetIntValueRanges (ArrayRef< OpFoldResult > values, GetIntRangeFn getIntRange, int32_t indexBitwidth)
 Helper function to collect the integer range values of an array of op fold results.
raw_ostreamoperator<< (raw_ostream &os, const StridedMetadataRange &range)
 Print the strided metadata to os.
LogicalResult reifyResultShapes (OpBuilder &b, Operation *op, ReifiedRankedShapedTypeDims &reifiedReturnShapes)
 Reify the shape of the result of an operation (typically in terms of the shape of its operands).
FailureOr< SmallVector< OpFoldResult > > reifyShapeOfResult (OpBuilder &b, Operation *op, int resultIndex)
FailureOr< OpFoldResultreifyDimOfResult (OpBuilder &b, Operation *op, int resultIndex, int dim)
bool hasUnknownEffects (Operation *op)
 Return "true" if op has unknown effects.
template<typename EffectTy>
bool hasSingleEffect (Operation *op)
 Returns "true" if op has only an effect of type EffectTy.
template<typename EffectTy>
bool hasSingleEffect (Operation *op, Value value)
 Returns "true" if op has only an effect of type EffectTy on value.
template<typename ValueTy, typename EffectTy>
bool hasSingleEffect (Operation *op, ValueTy value)
 Returns "true" if op has only an effect of type EffectTy on value of type ValueTy.
template<typename... EffectTys>
bool hasEffect (Operation *op)
 Returns "true" if op has an effect of type EffectTy.
template<typename... EffectTys>
bool hasEffect (Operation *op, Value value)
 Returns "true" if op has an effect of type EffectTy on value.
template<typename ValueTy, typename... EffectTys>
bool hasEffect (Operation *op, ValueTy value)
 Returns "true" if op has an effect of type EffectTy on value of type ValueTy.
template<typename... EffectTys>
bool mightHaveEffect (Operation *op)
 Returns "true" if op might have an effect of type EffectTy.
template<typename... EffectTys>
bool mightHaveEffect (Operation *op, Value value)
 Returns "true" if op might have an effect of type EffectTy on value.
template<typename ValueTy, typename... EffectTys>
bool mightHaveEffect (Operation *op, ValueTy value)
 Returns "true" if op might have an effect of type EffectTy on value of type ValueTy.
bool isOpTriviallyDead (Operation *op)
 Return true if the given operation is unused, and has no side effects on memory that prevent erasing.
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.
bool isMemoryEffectFree (Operation *op)
 Returns true if the given operation is free of memory effects.
std::optional< llvm::SmallVector< MemoryEffects::EffectInstance > > getEffectsRecursively (Operation *rootOp)
 Returns the side effects of an operation.
bool isSpeculatable (Operation *op)
 Returns true if the given operation is speculatable, i.e.
bool isPure (Operation *op)
 Returns true if the given operation is pure, i.e., is speculatable that does not touch memory.
SliceBoundsVerificationResult verifyInBoundsSlice (ArrayRef< int64_t > shape, ArrayRef< int64_t > staticOffsets, ArrayRef< int64_t > staticSizes, ArrayRef< int64_t > staticStrides, bool generateErrorMessage=false)
 Verify that the offsets/sizes/strides-style access into the given shape is in-bounds.
SliceBoundsVerificationResult verifyInBoundsSlice (ArrayRef< int64_t > shape, ArrayRef< OpFoldResult > mixedOffsets, ArrayRef< OpFoldResult > mixedSizes, ArrayRef< OpFoldResult > mixedStrides, bool generateErrorMessage=false)
void printDynamicIndexList (OpAsmPrinter &printer, Operation *op, OperandRange values, ArrayRef< int64_t > integers, ArrayRef< bool > scalableFlags, TypeRange valueTypes=TypeRange(), AsmParser::Delimiter delimiter=AsmParser::Delimiter::Square)
 Printer hooks for custom directive in assemblyFormat.
void printDynamicIndexList (OpAsmPrinter &printer, Operation *op, OperandRange values, ArrayRef< int64_t > integers, TypeRange valueTypes=TypeRange(), AsmParser::Delimiter delimiter=AsmParser::Delimiter::Square)
ParseResult parseDynamicIndexList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &values, DenseI64ArrayAttr &integers, DenseBoolArrayAttr &scalableFlags, SmallVectorImpl< Type > *valueTypes=nullptr, AsmParser::Delimiter delimiter=AsmParser::Delimiter::Square)
 Parser hooks for custom directive in assemblyFormat.
ParseResult parseDynamicIndexList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &values, DenseI64ArrayAttr &integers, SmallVectorImpl< Type > *valueTypes=nullptr, AsmParser::Delimiter delimiter=AsmParser::Delimiter::Square)
LogicalResult verifyListOfOperandsOrIntegers (Operation *op, StringRef name, unsigned expectedNumElements, ArrayRef< int64_t > attr, ValueRange values)
 Verify that a the values has as many elements as the number of entries in attr for which isDynamic evaluates to true.
inline ::llvm::hash_code hash_value (AffineExpr arg)
 Make AffineExpr hashable.
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.
AffineExpr getAffineSymbolExpr (unsigned position, MLIRContext *context)
AffineExpr getAffineConstantExpr (int64_t constant, MLIRContext *context)
SmallVector< AffineExprgetAffineConstantExprs (ArrayRef< int64_t > constants, 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.
raw_ostreamoperator<< (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.
template<typename... AffineExprTy>
void bindDims (MLIRContext *ctx, AffineExprTy &...exprs)
 Bind a list of AffineExpr references to DimExpr at positions: [0 .
template<typename AffineExprTy>
void bindDimsList (MLIRContext *ctx, MutableArrayRef< AffineExprTy > exprs)
template<typename... AffineExprTy>
void bindSymbols (MLIRContext *ctx, AffineExprTy &...exprs)
 Bind a list of AffineExpr references to SymbolExpr at positions: [0 .
template<typename AffineExprTy>
void bindSymbolsList (MLIRContext *ctx, MutableArrayRef< AffineExprTy > exprs)
std::optional< int64_tgetBoundForAffineExpr (AffineExpr expr, unsigned numDims, unsigned numSymbols, ArrayRef< std::optional< int64_t > > constLowerBounds, ArrayRef< std::optional< int64_t > > constUpperBounds, bool isUpper)
 Get a lower or upper (depending on isUpper) bound for expr while using the constant lower and upper bounds for its inputs provided in constLowerBounds and constUpperBounds.
inline ::llvm::hash_code hash_value (AffineMap arg)
AffineMap simplifyAffineMap (AffineMap map)
 Simplifies an affine map by simplifying its underlying AffineExpr results.
AffineMap compressDims (AffineMap map, const llvm::SmallBitVector &unusedDims)
 Drop the dims that are listed in unusedDims.
AffineMap compressUnusedDims (AffineMap map)
 Drop the dims that are not used.
SmallVector< AffineMapcompressUnusedDims (ArrayRef< AffineMap > maps)
 Drop the dims that are not used by any of the individual maps in maps.
AffineMap compressSymbols (AffineMap map, const llvm::SmallBitVector &unusedSymbols)
 Drop the symbols that are listed in unusedSymbols.
AffineMap compressUnusedSymbols (AffineMap map)
 Drop the symbols that are not used.
SmallVector< AffineMapcompressUnusedSymbols (ArrayRef< AffineMap > maps)
 Drop the symbols that are not used by any of the individual maps in maps.
AffineMap foldAttributesIntoMap (Builder &b, AffineMap map, ArrayRef< OpFoldResult > operands, SmallVector< Value > &remainingValues)
 Fold all attributes among the given operands into the affine map.
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.
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.
AffineMap inverseAndBroadcastProjectedPermutation (AffineMap map)
 Return the reverse map of a projected permutation where the projected dimensions are transformed into 0s.
AffineMap concatAffineMaps (ArrayRef< AffineMap > maps, MLIRContext *context)
 Concatenates a list of maps into a single AffineMap, stepping over potentially empty maps.
AffineMap projectDims (AffineMap map, const llvm::SmallBitVector &projectedDimensions, bool compressDimsFlag=false)
 Returns the map that results from projecting out the dimensions specified in projectedDimensions.
AffineMap projectSymbols (AffineMap map, const llvm::SmallBitVector &projectedSymbols, bool compressSymbolsFlag=false)
 Symbol counterpart of projectDims.
AffineMap getProjectedMap (AffineMap map, const llvm::SmallBitVector &projectedDimensions, bool compressDimsFlag=true, bool compressSymbolsFlag=true)
 Calls projectDims(map, projectedDimensions, compressDimsFlag).
llvm::SmallBitVector getUnusedDimsBitVector (ArrayRef< AffineMap > maps)
llvm::SmallBitVector getUnusedSymbolsBitVector (ArrayRef< AffineMap > maps)
AffineMap expandDimsToRank (AffineMap map, int64_t rank, const llvm::SmallBitVector &projectedDimensions)
 Expand map to operate on rank dims while projecting out the dims in projectedDimensions.
raw_ostreamoperator<< (raw_ostream &os, AffineMap map)
template<typename T>
SmallVector< T > applyPermutationMap (AffineMap map, llvm::ArrayRef< T > source)
 Apply a permutation from map to source and return the result.
template<typename AffineExprContainer>
static void getMaxDimAndSymbol (ArrayRef< AffineExprContainer > exprsList, int64_t &maxDim, int64_t &maxSym)
 Calculates maximum dimension and symbol positions from the expressions in exprsLists and stores them in maxDim and maxSym respectively.
StringRef toString (AsmResourceEntryKind kind)
void registerAsmPrinterCLOptions ()
 Register a set of useful command-line options that can be used to configure various flags within the AsmPrinter.
raw_ostreamoperator<< (raw_ostream &os, Attribute attr)
inline ::llvm::hash_code hash_value (Attribute arg)
inline ::llvm::hash_code hash_value (const NamedAttribute &arg)
raw_ostreamoperator<< (raw_ostream &, Block &)
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.
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.
bool operator!= (StringAttr lhs, StringRef rhs)
bool operator== (StringRef lhs, StringAttr rhs)
bool operator!= (StringRef lhs, StringAttr rhs)
AffineMap makeStridedLinearLayoutMap (ArrayRef< int64_t > strides, int64_t offset, MLIRContext *context)
 Given a list of strides (in which ShapedType::kDynamic represents a dynamic value), return the single result AffineMap which represents the linearized strided layout map.
bool isValidVectorTypeElementType (::mlir::Type type)
std::optional< llvm::SmallDenseSet< unsigned > > computeRankReductionMask (ArrayRef< int64_t > originalShape, ArrayRef< int64_t > reducedShape, bool matchDynamic=false)
 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.
SliceVerificationResult isRankReducedType (ShapedType originalType, ShapedType candidateReducedType)
 Check if originalType can be rank reduced to candidateReducedType type by dropping some dimensions with static size 1.
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.
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)}.
raw_ostreamoperator<< (raw_ostream &os, const DiagnosticArgument &arg)
raw_ostreamoperator<< (raw_ostream &os, const Diagnostic &diag)
InFlightDiagnostic emitError (Location loc)
 Utility method to emit an error message using this location.
InFlightDiagnostic emitError (Location loc, const Twine &message)
InFlightDiagnostic emitWarning (Location loc)
 Utility method to emit a warning message using this location.
InFlightDiagnostic emitWarning (Location loc, const Twine &message)
InFlightDiagnostic emitRemark (Location loc)
 Utility method to emit a remark message using this location.
InFlightDiagnostic emitRemark (Location loc, const Twine &message)
template<typename... Args>
LogicalResult emitOptionalError (std::optional< Location > loc, Args &&...args)
 Overloads of the above emission functions that take an optionally null location.
template<typename... Args>
LogicalResult emitOptionalWarning (std::optional< Location > loc, Args &&...args)
template<typename... Args>
LogicalResult emitOptionalRemark (std::optional< Location > loc, Args &&...args)
inline ::llvm::hash_code hash_value (IntegerSet arg)
raw_ostreamoperator<< (raw_ostream &os, const Location &loc)
inline ::llvm::hash_code hash_value (Location arg)
bool isStrictFileLineColLoc (Location loc)
 Returns true iff the given location is a FileLineColRange with exactly one line and column.
detail::constant_op_matcher m_Constant ()
 Matches a constant foldable operation.
detail::AttrOpMatcher m_Attr (StringRef attrName)
 Matches a named attribute operation.
detail::NameOpMatcher m_Op (StringRef opName)
 Matches a named operation.
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.
template<typename AttrT>
detail::AttrOpBinder< AttrT > m_Attr (StringRef attrName, AttrT *bindValue)
 Matches a named attribute operation and writes the value to bind_value.
detail::constant_float_predicate_matcher m_AnyZeroFloat ()
 Matches a constant scalar / vector splat / tensor splat float (both positive and negative) zero.
detail::constant_float_predicate_matcher m_PosZeroFloat ()
 Matches a constant scalar / vector splat / tensor splat float positive zero.
detail::constant_float_predicate_matcher m_NegZeroFloat ()
 Matches a constant scalar / vector splat / tensor splat float negative zero.
detail::constant_float_predicate_matcher m_OneFloat ()
 Matches a constant scalar / vector splat / tensor splat float ones.
detail::constant_float_predicate_matcher m_NaNFloat ()
 Matches a constant scalar / vector splat / tensor splat float ones.
detail::constant_float_predicate_matcher m_PosInfFloat ()
 Matches a constant scalar / vector splat / tensor splat float positive infinity.
detail::constant_float_predicate_matcher m_NegInfFloat ()
 Matches a constant scalar / vector splat / tensor splat float negative infinity.
detail::constant_int_predicate_matcher m_Zero ()
 Matches a constant scalar / vector splat / tensor splat integer zero.
detail::constant_int_predicate_matcher m_NonZero ()
 Matches a constant scalar / vector splat / tensor splat integer that is any non-zero value.
detail::constant_int_range_predicate_matcher m_IntRangeWithoutZeroU ()
 Matches a constant scalar / vector splat / tensor splat integer or a unsigned integer range that does not contain zero.
detail::constant_int_range_predicate_matcher m_IntRangeWithoutZeroS ()
 Matches a constant scalar / vector splat / tensor splat integer or a signed integer range that does not contain zero.
detail::constant_int_range_predicate_matcher m_IntRangeWithoutNegOneS ()
 Matches a constant scalar / vector splat / tensor splat integer or a signed integer range that does not contain minus one.
detail::constant_int_predicate_matcher m_One ()
 Matches a constant scalar / vector splat / tensor splat integer one.
template<typename OpClass>
detail::op_matcher< OpClass > m_Op ()
 Matches the given OpClass.
template<typename Pattern>
bool matchPattern (Value value, const Pattern &pattern)
 Entry point for matching a pattern over a Value.
template<typename Pattern>
bool matchPattern (Operation *op, const Pattern &pattern)
 Entry point for matching a pattern over an Operation.
template<typename Pattern>
bool matchPattern (Attribute attr, const Pattern &pattern)
 Entry point for matching a pattern over an Attribute.
detail::constant_float_value_binder m_ConstantFloat (FloatAttr::ValueType *bind_value)
 Matches a constant holding a scalar/vector/tensor float (splat) and writes the float value to bind_value.
detail::constant_int_value_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.
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.
LogicalResult convertFromAttribute (int64_t &storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert an IntegerAttr attribute to an int64_t, or return an error if the attribute isn't an IntegerAttr.
Attribute convertToAttribute (MLIRContext *ctx, int64_t storage)
 Convert the provided int64_t to an IntegerAttr attribute.
LogicalResult convertFromAttribute (int32_t &storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert an IntegerAttr attribute to an int32_t, or return an error if the attribute isn't an IntegerAttr.
Attribute convertToAttribute (MLIRContext *ctx, int32_t storage)
 Convert the provided int32_t to an IntegerAttr attribute.
LogicalResult convertFromAttribute (int8_t &storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert an IntegerAttr attribute to an int8_t, or return an error if the attribute isn't an IntegerAttr.
Attribute convertToAttribute (MLIRContext *ctx, int8_t storage)
 Convert the provided int8_t to an IntegerAttr attribute.
LogicalResult convertFromAttribute (uint8_t &storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert an IntegerAttr attribute to an uint8_t, or return an error if the attribute isn't an IntegerAttr.
Attribute convertToAttribute (MLIRContext *ctx, uint8_t storage)
 Convert the provided uint8_t to an IntegerAttr attribute.
LogicalResult convertFromAttribute (std::string &storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Extract the string from attr into storage.
Attribute convertToAttribute (MLIRContext *ctx, const std::string &storage)
 Convert the given string into a StringAttr.
LogicalResult convertFromAttribute (bool &storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Extract the boolean from attr into storage.
Attribute convertToAttribute (MLIRContext *ctx, bool storage)
 Convert the given string into a BooleanAttr.
LogicalResult convertFromAttribute (MutableArrayRef< int64_t > storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert a DenseI64ArrayAttr to the provided storage.
LogicalResult convertFromAttribute (MutableArrayRef< int32_t > storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert a DenseI32ArrayAttr to the provided storage.
LogicalResult convertFromAttribute (SmallVectorImpl< int64_t > &storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert a DenseI64ArrayAttr to the provided storage, which will be cleared before writing.
LogicalResult convertFromAttribute (SmallVectorImpl< int32_t > &storage, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert a DenseI32ArrayAttr to the provided storage, which will be cleared before writing.
Attribute convertToAttribute (MLIRContext *ctx, ArrayRef< int64_t > storage)
 Convert the provided ArrayRef<int64_t> to a DenseI64ArrayAttr attribute.
Attribute convertToAttribute (MLIRContext *ctx, ArrayRef< int32_t > storage)
 Convert the provided ArrayRef<int32_t> to a DenseI32ArrayAttr attribute.
bool operator== (OpState lhs, OpState rhs)
bool operator!= (OpState lhs, OpState rhs)
raw_ostreamoperator<< (raw_ostream &os, OpFoldResult ofr)
 Allow printing to a stream.
raw_ostreamoperator<< (raw_ostream &os, OpState op)
 Allow printing to a stream.
raw_ostreamoperator<< (raw_ostream &os, const Operation &op)
raw_ostreamoperator<< (raw_ostream &os, OpWithFlags opWithFlags)
raw_ostreamoperator<< (raw_ostream &os, const OpWithState &opWithState)
raw_ostreamoperator<< (raw_ostream &os, OperationName info)
llvm::hash_code hash_value (OperationName arg)
 LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE ()
 Enable Bitmask enums for OperationEquivalence::Flags.
llvm::hash_code hash_value (const AsmDialectResourceHandle &param)
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, std::enable_if_t<!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 > * = 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 T>
std::enable_if_t< std::is_same< AsmPrinter, AsmPrinterT >::value &&std::is_convertible< T &, ValueRange >::value, AsmPrinterT & > operator<< (AsmPrinterT &p, const T &other)=delete
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, std::enable_if_t< std::is_convertible< T &, ValueRange >::value &&!std::is_convertible< T &, Value & >::value, T > * = nullptr>
OpAsmPrinteroperator<< (OpAsmPrinter &p, const T &values)
OpAsmPrinteroperator<< (OpAsmPrinter &p, Block *value)
void printDimensionList (OpAsmPrinter &printer, Operation *op, ArrayRef< int64_t > dimensions)
ParseResult parseDimensionList (OpAsmParser &parser, DenseI64ArrayAttr &dimensions)
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, Region &region)
bool mayHaveSSADominance (Region &region)
 Return "true" if the given region may have SSA dominance.
bool mayBeGraphRegion (Region &region)
 Return "true" if the given region may be a graph region without SSA dominance.
raw_ostreamoperator<< (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.
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.
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.
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.
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.
template<typename FuncT>
void parallelFor (MLIRContext *context, size_t begin, size_t end, FuncT &&func)
 Invoke the given function on the elements between [begin, end) asynchronously.
inline ::llvm::hash_code hash_value (TypeRange arg)
 Make TypeRange hashable.
raw_ostreamoperator<< (raw_ostream &os, const TypeRange &types)
 Emit a type range to the given output stream.
template<typename RangeT>
bool operator== (ArrayRef< Type > lhs, const ValueTypeRange< RangeT > &rhs)
raw_ostreamoperator<< (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.
Type getElementTypeOrSelf (Attribute attr)
 Return the element type or return the type itself.
Type getElementTypeOrSelf (Value val)
SmallVector< Type, 10 > getFlattenedTypes (TupleType t)
 Get the types within a nested Tuple.
bool isOpaqueTypeWithName (Type type, StringRef dialect, StringRef typeData)
 Return true if the specified type is an opaque type with the specified dialect and typeData.
LogicalResult verifyCompatibleShape (ArrayRef< int64_t > shape1, ArrayRef< int64_t > shape2)
 Returns success if the given two shapes are compatible.
LogicalResult verifyCompatibleShape (Type type1, Type type2)
 Returns success if the given two types have compatible shape.
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.
LogicalResult verifyCompatibleShapes (TypeRange types)
 Returns success if all given types have compatible shapes.
LogicalResult verifyCompatibleDims (ArrayRef< int64_t > dims)
 Dimensions are compatible if all non-dynamic dims are equal.
TypeRange insertTypesInto (TypeRange oldTypes, ArrayRef< unsigned > indices, TypeRange newTypes, SmallVectorImpl< Type > &storage)
 Insert a set of newTypes into oldTypes at the given indices.
TypeRange filterTypesOut (TypeRange types, const BitVector &indices, SmallVectorImpl< Type > &storage)
 Filters out any elements referenced by indices.
raw_ostreamoperator<< (raw_ostream &os, const IRUnit &unit)
raw_ostreamoperator<< (raw_ostream &os, Value value)
inline ::llvm::hash_code hash_value (Value arg)
 Make Value hashable.
LogicalResult verify (Operation *op, bool verifyRecursively=true)
 Perform (potentially expensive) checks of invariants, used to detect compiler bugs, on this operation and any nested operations.
LogicalResult parseSourceFile (const llvm::SourceMgr &sourceMgr, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 This parses the file specified by the indicated SourceMgr and appends parsed operations to the given block.
LogicalResult parseSourceFile (const std::shared_ptr< llvm::SourceMgr > &sourceMgr, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR).
LogicalResult parseSourceFile (llvm::StringRef filename, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 This parses the file specified by the indicated filename and appends parsed operations to the given block.
LogicalResult parseSourceFile (llvm::StringRef filename, llvm::SourceMgr &sourceMgr, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 This parses the file specified by the indicated filename using the provided SourceMgr and appends parsed operations to the given block.
LogicalResult parseSourceFile (llvm::StringRef filename, const std::shared_ptr< llvm::SourceMgr > &sourceMgr, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR).
LogicalResult parseSourceString (llvm::StringRef sourceStr, Block *block, const ParserConfig &config, StringRef sourceName="", LocationAttr *sourceFileLoc=nullptr)
 This parses the IR string and appends parsed operations to the given block.
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > parseSourceFile (const llvm::SourceMgr &sourceMgr, const ParserConfig &config)
 This parses the file specified by the indicated SourceMgr.
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > parseSourceFile (const std::shared_ptr< llvm::SourceMgr > &sourceMgr, const ParserConfig &config)
 An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR).
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > parseSourceFile (StringRef filename, const ParserConfig &config)
 This parses the file specified by the indicated filename.
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > parseSourceFile (llvm::StringRef filename, llvm::SourceMgr &sourceMgr, const ParserConfig &config)
 This parses the file specified by the indicated filename using the provided SourceMgr.
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > parseSourceFile (llvm::StringRef filename, const std::shared_ptr< llvm::SourceMgr > &sourceMgr, const ParserConfig &config)
 An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR).
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > parseSourceString (llvm::StringRef sourceStr, const ParserConfig &config, StringRef sourceName="")
 This parses the provided string containing MLIR.
std::string makeReproducer (StringRef anchorName, const llvm::iterator_range< OpPassManager::pass_iterator > &passes, Operation *op, StringRef outputFile, bool disableThreads=false, bool verifyPasses=false)
void registerPassManagerCLOptions ()
 Register a set of useful command-line options that can be used to configure a pass manager.
LogicalResult applyPassManagerCLOptions (PassManager &pm)
 Apply any values provided to the pass manager options that were registered with 'registerPassManagerOptions'.
void applyDefaultTimingPassManagerCLOptions (PassManager &pm)
 Apply any values provided to the timing manager options that were registered with registerDefaultTimingManagerOptions.
void printRegisteredPasses ()
 Prints the passes that were previously registered and stored in passRegistry.
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.
void registerPass (const PassAllocatorFunction &function)
 Register a specific dialect pass allocator function with the system, typically used through the PassRegistration template.
LogicalResult parsePassPipeline (StringRef pipeline, OpPassManager &pm, raw_ostream &errorStream=llvm::errs())
 Parse the textual representation of a pass pipeline, adding the result to 'pm' on success.
FailureOr< OpPassManagerparsePassPipeline (StringRef pipeline, raw_ostream &errorStream=llvm::errs())
 Parse the given textual representation of a pass pipeline, and return the parsed pipeline on success.
std::unique_ptr<::mlir::PasscreateOptReductionPass ()
std::unique_ptr<::mlir::PasscreateOptReductionPass (OptReductionPassOptions options)
std::unique_ptr<::mlir::PasscreateReductionTreePass ()
std::unique_ptr<::mlir::PasscreateReductionTreePass (ReductionTreePassOptions options)
void registerOptReductionPass ()
void registerOptReductionPassPass ()
void registerReductionTreePass ()
void registerReductionTreePassPass ()
void registerReducerPasses ()
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.
std::unique_ptr< llvm::MemoryBuffer > openInputFile (llvm::StringRef inputFilename, llvm::Align alignment, std::string *errorMessage=nullptr)
 Open the file specified by its name for reading, with the given buffer alignment constraint.
std::unique_ptr< llvm::ToolOutputFile > openOutputFile (llvm::StringRef outputFilename, std::string *errorMessage=nullptr)
 Open the file specified by its name for writing.
llvm::raw_ostream & thread_safe_nulls ()
 Returns a raw output stream that simply discards the output, but in a thread-safe manner.
void registerDefaultTimingManagerCLOptions ()
 Register a set of useful command-line options that can be used to configure a DefaultTimingManager.
void applyDefaultTimingManagerCLOptions (DefaultTimingManager &tm)
 Apply any values that were registered with 'registerDefaultTimingManagerOptions' to a DefaultTimingManager.
std::unique_ptr< OutputStrategycreateOutputStrategy (DefaultTimingManager::OutputFormat fmt, raw_ostream &os)
 Create an output strategy for the specified format, to be passed to DefaultTimingManager::setOutput().
LogicalResult splitAndProcessBuffer (std::unique_ptr< llvm::MemoryBuffer > originalBuffer, ChunkBufferHandler processChunkBuffer, raw_ostream &os, llvm::StringRef inputSplitMarker=kDefaultSplitMarker, llvm::StringRef outputSplitMarker="")
 Splits the specified buffer on a marker (// ----- by default), processes each chunk independently according to the normal processChunkBuffer logic, and writes all results to os.
LogicalResult splitAndProcessBuffer (std::unique_ptr< llvm::MemoryBuffer > originalBuffer, NoSourceChunkBufferHandler processChunkBuffer, raw_ostream &os, llvm::StringRef inputSplitMarker=kDefaultSplitMarker, llvm::StringRef outputSplitMarker="")
 Same as above, but for case where the original buffer is not used while processing the chunk.
inline ::llvm::hash_code hash_value (TypeID id)
 Enable hashing TypeID.
void registerIRDLToCppTranslation ()
static void registerAllToLLVMIRTranslations (DialectRegistry &registry)
 Registers all dialects that can be translated to LLVM IR and the corresponding translation interfaces.
static void registerAllGPUToLLVMIRTranslations (DialectRegistry &registry)
 Registers all the translations to LLVM IR required by GPU passes.
static void registerAllFromLLVMIRTranslations (DialectRegistry &registry)
 Registers all dialects that can be translated from LLVM IR and the corresponding translation interfaces.
void registerArmNeonDialectTranslation (DialectRegistry &registry)
 Register the ArmNeon dialect and the translation from it to the LLVM IR in the given registry;.
void registerArmNeonDialectTranslation (MLIRContext &context)
 Register the ArmNeon dialect and the translation from it in the registry associated with the given context.
void registerArmSMEDialectTranslation (DialectRegistry &registry)
 Register the ArmSME dialect and the translation from it to the LLVM IR in the given registry;.
void registerArmSMEDialectTranslation (MLIRContext &context)
 Register the ArmSME dialect and the translation from it in the registry associated with the given context.
void registerArmSVEDialectTranslation (DialectRegistry &registry)
 Register the ArmSVE dialect and the translation from it to the LLVM IR in the given registry;.
void registerArmSVEDialectTranslation (MLIRContext &context)
 Register the ArmSVE dialect and the translation from it in the registry associated with the given context.
void registerBuiltinDialectTranslation (DialectRegistry &registry)
 Register the translation from the builtin dialect to the LLVM IR in the given registry.
void registerBuiltinDialectTranslation (MLIRContext &context)
 Register the translation from the builtin dialect in the registry associated with the given context.
void registerGPUDialectTranslation (DialectRegistry &registry)
 Register the GPU dialect and the translation from it to the LLVM IR in the given registry;.
void registerGPUDialectTranslation (MLIRContext &context)
 Register the GPU dialect and the translation from it in the registry associated with the given context.
void registerLLVMDialectImport (DialectRegistry &registry)
 Registers the LLVM dialect and its import from LLVM IR in the given registry.
void registerLLVMDialectImport (MLIRContext &context)
 Registers the LLVM dialect and its import from LLVM IR with the given context.
void registerLLVMDialectTranslation (DialectRegistry &registry)
 Register the LLVM dialect and the translation from it to the LLVM IR in the given registry;.
void registerLLVMDialectTranslation (MLIRContext &context)
 Register the LLVM dialect and the translation from it in the registry associated with the given context.
void registerNVVMDialectImport (DialectRegistry &registry)
 Registers the NVVM dialect and its import from LLVM IR in the given registry.
void registerNVVMDialectImport (MLIRContext &context)
 Registers the NVVM dialect and its import from LLVM IR with the given context.
void registerNVVMDialectTranslation (DialectRegistry &registry)
 Register the NVVM dialect and the translation from it to the LLVM IR in the given registry;.
void registerNVVMDialectTranslation (MLIRContext &context)
 Register the NVVM dialect and the translation from it in the registry associated with the given context.
void registerOpenACCDialectTranslation (DialectRegistry &registry)
 Register the OpenACC dialect and the translation to the LLVM IR in the given registry;.
void registerOpenACCDialectTranslation (MLIRContext &context)
 Register the OpenACC dialect and the translation in the registry associated with the given context.
void registerOpenMPDialectTranslation (DialectRegistry &registry)
 Register the OpenMP dialect and the translation from it to the LLVM IR in the given registry;.
void registerOpenMPDialectTranslation (MLIRContext &context)
 Register the OpenMP dialect and the translation from it in the registry associated with the given context.
void registerPtrDialectTranslation (DialectRegistry &registry)
 Register the ptr dialect and the translation from it to the LLVM IR in the given registry;.
void registerPtrDialectTranslation (MLIRContext &context)
 Register the ptr dialect and the translation from it in the registry associated with the given context.
void registerROCDLDialectTranslation (DialectRegistry &registry)
 Register the ROCDL dialect and the translation from it to the LLVM IR in the given registry;.
void registerROCDLDialectTranslation (MLIRContext &context)
 Register the ROCDL dialect and the translation from it in the registry associated with the given context.
void registerSPIRVDialectTranslation (DialectRegistry &registry)
 Register the SPIR-V dialect and the translation from it to the LLVM IR in the given registry;.
void registerSPIRVDialectTranslation (MLIRContext &context)
 Register the SPIR-V dialect and the translation from it in the registry associated with the given context.
void registerVCIXDialectTranslation (DialectRegistry &registry)
 Register the VCIX dialect and the translation from it to the LLVM IR in the given registry.
void registerVCIXDialectTranslation (MLIRContext &context)
 Register the VCIX dialect and the translation from it in the registry associated with the given context.
void registerXeVMDialectTranslation (mlir::DialectRegistry &registry)
 Register the XeVM dialect and the translation from it to the LLVM IR in the given registry;.
void registerXeVMDialectTranslation (mlir::MLIRContext &context)
 Register the XeVM dialect and the translation from it in the registry associated with the given context.
std::unique_ptr< llvm::Module > translateModuleToLLVMIR (Operation *module, llvm::LLVMContext &llvmContext, llvm::StringRef name="LLVMDialectModule", bool disableVerification=false)
 Translates a given LLVM dialect module into an LLVM IR module living in the given context.
OwningOpRef< ModuleOp > translateLLVMIRToModule (std::unique_ptr< llvm::Module > llvmModule, MLIRContext *context, bool emitExpensiveWarnings=true, bool dropDICompositeTypeElements=false, bool loadAllDialects=true, bool preferUnregisteredIntrinsics=false, bool importStructsAsLiterals=false)
 Translates the LLVM module into an MLIR module living in the given context.
DataLayoutSpecInterface translateDataLayout (const llvm::DataLayout &dataLayout, MLIRContext *context)
 Translate the given LLVM data layout into an MLIR equivalent using the DLTI dialect.
llvm::LogicalResult MlirLspServerMain (int argc, char **argv, DialectRegistry &registry)
 Implementation for tools like mlir-lsp-server.
llvm::LogicalResult MlirLspServerMain (int argc, char **argv, lsp::DialectRegistryFn registry_fn)
 Implementation for tools like mlir-lsp-server.
std::string registerCLIOptions (llvm::StringRef toolName, DialectRegistry &registry)
 Register basic command line options.
std::pair< std::string, std::string > parseCLIOptions (int argc, char **argv, llvm::StringRef helpHeader)
 Parse command line options.
std::pair< std::string, std::string > registerAndParseCLIOptions (int argc, char **argv, llvm::StringRef toolName, DialectRegistry &registry)
 Register and parse command line options.
LogicalResult MlirOptMain (llvm::raw_ostream &outputStream, std::unique_ptr< llvm::MemoryBuffer > buffer, DialectRegistry &registry, const MlirOptMainConfig &config)
 Perform the core processing behind mlir-opt.
LogicalResult MlirOptMain (int argc, char **argv, llvm::StringRef toolName, DialectRegistry &registry)
 Implementation for tools like mlir-opt.
LogicalResult MlirOptMain (int argc, char **argv, llvm::StringRef inputFilename, llvm::StringRef outputFilename, DialectRegistry &registry)
 Implementation for tools like mlir-opt.
int asMainReturnCode (LogicalResult r)
 Helper wrapper to return the result of MlirOptMain directly from main.
llvm::LogicalResult MlirPdllLspServerMain (int argc, char **argv)
 Implementation for tools like mlir-pdll-lsp-server.
LogicalResult mlirQueryMain (int argc, char **argv, MLIRContext &context, const mlir::query::matcher::Registry &matcherRegistry)
LogicalResult mlirReduceMain (int argc, char **argv, MLIRContext &context)
int MlirTblgenMain (int argc, char **argv)
 Main Program for tools like 'mlir-tblgen' with custom backends.
LogicalResult mlirTranslateMain (int argc, char **argv, StringRef toolName)
 Translate to/from an MLIR module from/to an external representation (e.g.
void registerTranslationCLOptions ()
 Register command-line options used by the translation registry.
OwningOpRef< Operation * > parseSourceFileForTool (const std::shared_ptr< llvm::SourceMgr > &sourceMgr, const ParserConfig &config, bool insertImplicitModule)
 This parses the file specified by the indicated SourceMgr.
llvm::LogicalResult TableGenLspServerMain (int argc, char **argv)
 Implementation for tools like tblgen-lsp-server.
void populateBubbleDownMemorySpaceCastPatterns (RewritePatternSet &patterns, PatternBenefit benefit)
 Collect a set of patterns to bubble-down memory-space cast operations.
FailureOr< booltransformCFGToSCF (Region &region, CFGToSCFInterface &interface, DominanceInfo &dominanceInfo)
 Transformation lifting any dialect implementing control flow graph operations to a dialect implementing structured control flow operations.
void populateCommutativityUtilsPatterns (RewritePatternSet &patterns)
 Populates the commutativity utility patterns.
size_t controlFlowSink (RegionRange regions, DominanceInfo &domInfo, function_ref< bool(Operation *, Region *)> shouldMoveIntoRegion, function_ref< void(Operation *, Region *)> moveIntoRegion)
 Given a list of regions, perform control flow sinking on them.
void getSinglyExecutedRegionsToSink (RegionBranchOpInterface branch, SmallVectorImpl< Region * > &regions)
 Populates regions with regions of the provided region branch op that are executed at most once at that are reachable given the current operands of the op.
void eliminateCommonSubExpressions (RewriterBase &rewriter, DominanceInfo &domInfo, Operation *op, bool *changed=nullptr)
 Eliminate common subexpressions within the given operation.
LogicalResult applyPatternsGreedily (Region &region, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
 Rewrite ops in the given region, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached.
LogicalResult applyPatternsAndFoldGreedily (Region &region, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
 Same as applyPatternsAndGreedily above with folding.
LogicalResult applyPatternsGreedily (Operation *op, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
 Rewrite ops nested under the given operation, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached.
LogicalResult applyPatternsAndFoldGreedily (Operation *op, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
 Same as applyPatternsGreedily above with folding.
LogicalResult applyOpPatternsGreedily (ArrayRef< Operation * > ops, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr, bool *allErased=nullptr)
 Rewrite the specified ops by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached.
 LLVM_DEPRECATED ("Use applyOpPatternsGreedily() instead", "applyOpPatternsGreedily") inline LogicalResult applyOpPatternsAndFold(ArrayRef< Operation * > ops
 Same as applyOpPatternsGreedily with folding.
LogicalResult inlineRegion (InlinerInterface &interface, function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback, Region *src, Operation *inlinePoint, IRMapping &mapper, ValueRange resultsToReplace, TypeRange regionResultTypes, std::optional< Location > inlineLoc=std::nullopt, bool shouldCloneInlinedRegion=true)
 This function inlines a region, 'src', into another.
LogicalResult inlineRegion (InlinerInterface &interface, function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback, Region *src, Block *inlineBlock, Block::iterator inlinePoint, IRMapping &mapper, ValueRange resultsToReplace, TypeRange regionResultTypes, std::optional< Location > inlineLoc=std::nullopt, bool shouldCloneInlinedRegion=true)
LogicalResult inlineRegion (InlinerInterface &interface, function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback, Region *src, Operation *inlinePoint, ValueRange inlinedOperands, ValueRange resultsToReplace, std::optional< Location > inlineLoc=std::nullopt, 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.
LogicalResult inlineRegion (InlinerInterface &interface, function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback, Region *src, Block *inlineBlock, Block::iterator inlinePoint, ValueRange inlinedOperands, ValueRange resultsToReplace, std::optional< Location > inlineLoc=std::nullopt, bool shouldCloneInlinedRegion=true)
LogicalResult inlineCall (InlinerInterface &interface, function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback, 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.
std::unique_ptr<::mlir::PasscreateLocationSnapshot ()
std::unique_ptr<::mlir::PasscreateLocationSnapshot (LocationSnapshotOptions options)
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.
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.
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.
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.
size_t moveLoopInvariantCode (ArrayRef< Region * > regions, function_ref< bool(Value, Region *)> isDefinedOutsideRegion, function_ref< bool(Operation *, Region *)> shouldMoveOutOfRegion, function_ref< void(Operation *, Region *)> moveOutOfRegion)
 Given a list of regions, perform loop-invariant code motion.
size_t moveLoopInvariantCode (LoopLikeOpInterface loopLike)
 Move side-effect free loop invariant code out of a loop-like op using methods provided by the interface.
LoopLikeOpInterface hoistLoopInvariantSubsets (RewriterBase &rewriter, LoopLikeOpInterface loopLike)
 Hoist loop-invariant tensor subsets (subset extraction and subset insertion ops) from loop-like ops.
LogicalResult tryToPromoteMemorySlots (ArrayRef< PromotableAllocationOpInterface > allocators, OpBuilder &builder, const DataLayout &dataLayout, DominanceInfo &dominance, Mem2RegStatistics statistics={})
 Attempts to promote the memory slots of the provided allocators.
std::unique_ptr<::mlir::PasscreateBubbleDownMemorySpaceCasts ()
std::unique_ptr<::mlir::PasscreateCompositeFixedPointPass ()
std::unique_ptr<::mlir::PasscreateCompositeFixedPointPass (CompositeFixedPointPassOptions options)
std::unique_ptr<::mlir::PasscreateMem2Reg ()
std::unique_ptr<::mlir::PasscreateMem2Reg (Mem2RegOptions options)
std::unique_ptr<::mlir::PasscreateSROA ()
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).
std::unique_ptr< PasscreateCanonicalizerPass (const GreedyRewriteConfig &config, ArrayRef< std::string > disabledPatterns={}, ArrayRef< std::string > enabledPatterns={})
 Creates an instance of the Canonicalizer pass with the specified config.
std::unique_ptr< PasscreateControlFlowSinkPass ()
 Creates a pass to perform control-flow sinking.
std::unique_ptr< PasscreateCSEPass ()
 Creates a pass to perform common sub expression elimination.
std::unique_ptr< PasscreatePrintIRPass (const PrintIRPassOptions &={})
 Creates a pass to print IR on the debug stream.
std::unique_ptr< PasscreateGenerateRuntimeVerificationPass ()
 Creates a pass that generates IR to verify ops at runtime.
std::unique_ptr< PasscreateLoopInvariantCodeMotionPass ()
 Creates a loop invariant code motion pass that hoists loop invariant instructions out of the loop.
std::unique_ptr< PasscreateLoopInvariantSubsetHoistingPass ()
 Creates a pass that hoists loop-invariant subset ops.
std::unique_ptr< PasscreateStripDebugInfoPass ()
 Creates a pass to strip debug information from a function.
std::unique_ptr< PasscreatePrintOpStatsPass (raw_ostream &os=llvm::errs())
 Creates a pass which prints the list of ops and the number of occurrences in the module.
std::unique_ptr< PasscreatePrintOpStatsPass (raw_ostream &os, bool printAsJSON)
 Creates a pass which prints the list of ops and the number of occurrences in the module with the output format option.
std::unique_ptr< PasscreateInlinerPass ()
 Creates a pass which inlines calls and callable operations as defined by the CallGraph.
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.
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.
std::unique_ptr< PasscreateRemoveDeadValuesPass ()
 Creates an optimization pass to remove dead values.
std::unique_ptr< PasscreateSCCPPass ()
 Creates a pass which performs sparse conditional constant propagation over nested operations.
std::unique_ptr< PasscreateSymbolDCEPass ()
 Creates a pass which delete symbol operations that are unreachable.
std::unique_ptr< PasscreateSymbolPrivatizePass (ArrayRef< std::string > excludeSymbols={})
 Creates a pass which marks top-level symbol operations as private unless listed in excludeSymbols.
std::unique_ptr< PasscreateTopologicalSortPass ()
 Creates a pass that recursively sorts nested regions without SSA dominance topologically such that, as much as possible, users of values appear after their producers.
std::unique_ptr< PasscreateCompositeFixedPointPass (std::string name, llvm::function_ref< void(OpPassManager &)> populateFunc, int maxIterations=10)
 Create composite pass, which runs provided set of passes until fixed point or maximum number of iterations reached.
void registerBubbleDownMemorySpaceCasts ()
void registerBubbleDownMemorySpaceCastsPass ()
void registerCSE ()
void registerCSEPass ()
void registerCanonicalizer ()
void registerCanonicalizerPass ()
void registerCompositeFixedPointPass ()
void registerCompositeFixedPointPassPass ()
void registerControlFlowSink ()
void registerControlFlowSinkPass ()
void registerGenerateRuntimeVerification ()
void registerGenerateRuntimeVerificationPass ()
void registerInliner ()
void registerInlinerPass ()
void registerLocationSnapshot ()
void registerLocationSnapshotPass ()
void registerLoopInvariantCodeMotion ()
void registerLoopInvariantCodeMotionPass ()
void registerLoopInvariantSubsetHoisting ()
void registerLoopInvariantSubsetHoistingPass ()
void registerMem2Reg ()
void registerMem2RegPass ()
void registerPrintIRPass ()
void registerPrintIRPassPass ()
void registerPrintOpStats ()
void registerPrintOpStatsPass ()
void registerRemoveDeadValues ()
void registerRemoveDeadValuesPass ()
void registerSCCP ()
void registerSCCPPass ()
void registerSROA ()
void registerSROAPass ()
void registerStripDebugInfo ()
void registerStripDebugInfoPass ()
void registerSymbolDCE ()
void registerSymbolDCEPass ()
void registerSymbolPrivatize ()
void registerSymbolPrivatizePass ()
void registerTopologicalSort ()
void registerTopologicalSortPass ()
void registerViewOpGraph ()
void registerViewOpGraphPass ()
void registerTransformsPasses ()
template<typename Range>
bool areValuesDefinedAbove (Range values, Region &limit)
 Check if all values in the provided range are defined above the limit region.
void replaceAllUsesInRegionWith (Value orig, Value replacement, Region &region)
 Replace all uses of orig within the given region with replacement.
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.
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.
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.
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.
SmallVector< ValuemakeRegionIsolatedFromAbove (RewriterBase &rewriter, Region &region, llvm::function_ref< bool(Operation *)> cloneOperationIntoRegion=[](Operation *) { return false;})
 Make a region isolated from above.
LogicalResult moveOperationDependencies (RewriterBase &rewriter, Operation *op, Operation *insertionPoint, DominanceInfo &dominance)
 Move SSA values used within an operation before an insertion point, so that the operation itself (or its replacement) can be moved to the insertion point.
LogicalResult moveOperationDependencies (RewriterBase &rewriter, Operation *op, Operation *insertionPoint)
LogicalResult moveValueDefinitions (RewriterBase &rewriter, ValueRange values, Operation *insertionPoint, DominanceInfo &dominance)
 Move definitions of values before an insertion point.
LogicalResult moveValueDefinitions (RewriterBase &rewriter, ValueRange values, Operation *insertionPoint)
LogicalResult simplifyRegions (RewriterBase &rewriter, MutableArrayRef< Region > regions, bool mergeBlocks=true)
 Run a set of structural simplifications over the given regions.
LogicalResult eraseUnreachableBlocks (RewriterBase &rewriter, MutableArrayRef< Region > regions)
 Erase the unreachable blocks within the provided regions.
LogicalResult runRegionDCE (RewriterBase &rewriter, MutableArrayRef< Region > regions)
 This function returns success if any operations or arguments were deleted, failure otherwise.
LogicalResult tryToDestructureMemorySlots (ArrayRef< DestructurableAllocationOpInterface > allocators, OpBuilder &builder, const DataLayout &dataLayout, SROAStatistics statistics={})
 Attempts to destructure the slots of destructurable allocators.
std::unique_ptr< PasscreatePrintOpGraphPass (raw_ostream &os=llvm::errs())
 Creates a pass to print op graphs.
void walkAndApplyPatterns (Operation *op, const FrozenRewritePatternSet &patterns, RewriterBase::Listener *listener=nullptr)
 A fast walk-based pattern rewrite driver.
LLVM::LLVMFuncOp getOrDefineFunction (Operation *moduleOp, Location loc, OpBuilder &b, StringRef name, LLVM::LLVMFunctionType type)
 Note that these functions don't take a SymbolTable because GPU module lowerings can have name collisions as an intermediate state.
LLVM::GlobalOp getOrCreateStringConstant (OpBuilder &b, Location loc, Operation *moduleOp, Type llvmI8, StringRef namePrefix, StringRef str, uint64_t alignment=0, unsigned addrSpace=0)
 Create a global that contains the given string.
static bool createElementwiseOp (ConversionPatternRewriter &builder, gpu::SubgroupMmaElementwiseOp op, Type coopType, ValueRange operands)
 Creates a SPIR-V op to replace the given GPU subgroup mma elementwise op when the elementwise op directly supports with cooperative matrix type.
bool allOperandsHaveSameCoopMatrixType (ValueRange operands)
template<typename K, typename V>
static SmallVector< V > getValuesSortedByKeyImpl (ArrayRef< K > keys, ArrayRef< V > values, llvm::function_ref< bool(K, K)> compare)
 Helper to sort values according to matching keys.
void printDimensionList (OpAsmPrinter &printer, Operation *op, ArrayRef< int64_t > dimensions)
void registerTestRoundtripSPIRV ()
void registerTestRoundtripDebugSPIRV ()
static void reconcileUnrealizedCasts (const DenseMap< UnrealizedConversionCastOp, UnresolvedMaterializationInfo > &castOps, SmallVectorImpl< UnrealizedConversionCastOp > *remainingCastOps)
static void findReachableBlocks (Region &region, DenseSet< Block * > &reachableBlocks)

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.
template<typename... Ts>
constexpr bool has_sub_attr_or_type_v
const char *const kDefaultSplitMarker = "// -----"
const FrozenRewritePatternSetpatterns
const FrozenRewritePatternSet GreedyRewriteConfig config = GreedyRewriteConfig()
const FrozenRewritePatternSet GreedyRewriteConfig boolchanged = nullptr

Detailed Description

Include the generated interface declarations.

Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

The pass expands memref operations that modify the metadata of a memref (sizes, offset, strides) into a sequence of easier to analyze constructs.

RewritePattern API.

This header declares functions that assist transformations in the MemRef dialect.

In particular, this pass transforms operations into explicit sequence of operations that model the effect of this operation on the different metadata. This pass uses affine constructs to materialize these effects.

See https://llvm.org/LICENSE.txt for license information. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Typedef Documentation

◆ AllocFunType

Definition at line 37 of file MemRefUtils.h.

◆ AttributeStorageAllocator

◆ AttrSubElementReplacements

◆ ChunkBufferHandler

Initial value:
function_ref<LogicalResult(
std::unique_ptr<llvm::MemoryBuffer> chunkBuffer,
const llvm::MemoryBufferRef &sourceBuffer, raw_ostream &os)>
llvm::function_ref< Fn > function_ref
Definition LLVM.h:152

Definition at line 30 of file ToolUtilities.h.

◆ DataLayoutEntryKey

Definition at line 31 of file DataLayoutInterfaces.h.

◆ DataLayoutEntryList

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

Definition at line 34 of file DataLayoutInterfaces.h.

◆ DataLayoutEntryListRef

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

Definition at line 35 of file DataLayoutInterfaces.h.

◆ DataLayoutIdentifiedEntryMap

Initial value:
::llvm::MapVector<::mlir::StringAttr, ::mlir::DataLayoutEntryInterface>

Definition at line 38 of file DataLayoutInterfaces.h.

◆ DefaultAttributeStorage

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

Definition at line 199 of file AttributeSupport.h.

◆ DefaultTypeStorage

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

Definition at line 194 of file TypeSupport.h.

◆ DenseBoolArrayAttr

◆ DenseBoolResourceElementsAttr

Initial value:
Base class for DenseResourceElementsAttr that is instantiated and specialized for each supported elem...

Definition at line 817 of file BuiltinAttributes.h.

◆ DenseF32ArrayAttr

Definition at line 771 of file BuiltinAttributes.h.

◆ DenseF32ResourceElementsAttr

◆ DenseF64ArrayAttr

Definition at line 772 of file BuiltinAttributes.h.

◆ DenseF64ResourceElementsAttr

◆ DenseI16ArrayAttr

Definition at line 768 of file BuiltinAttributes.h.

◆ DenseI16ResourceElementsAttr

◆ DenseI32ArrayAttr

Definition at line 769 of file BuiltinAttributes.h.

◆ DenseI32ResourceElementsAttr

◆ DenseI64ArrayAttr

◆ DenseI64ResourceElementsAttr

◆ DenseI8ArrayAttr

Definition at line 767 of file BuiltinAttributes.h.

◆ DenseI8ResourceElementsAttr

◆ DenseMap

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

Definition at line 126 of file LLVM.h.

◆ DenseMapInfo

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

Definition at line 122 of file LLVM.h.

◆ DenseResourceElementsHandle

Definition at line 702 of file BuiltinAttributes.h.

◆ DenseSet

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

Definition at line 128 of file LLVM.h.

◆ DenseUI16ResourceElementsAttr

◆ DenseUI32ResourceElementsAttr

◆ DenseUI64ResourceElementsAttr

◆ DenseUI8ResourceElementsAttr

◆ DialectAllocatorFunction

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

Definition at line 27 of file DialectRegistry.h.

◆ DialectAllocatorFunctionRef

◆ DialectRegistrationFunction

Interface of the function that adds all dialects and dialect extensions used for the translation to the given DialectRegistry.

Definition at line 57 of file Translation.h.

◆ DominanceInfoNode

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

Definition at line 30 of file Dominance.h.

◆ DynamicDialectPopulationFunction

Initial value:
std::function<void(MLIRContext *, DynamicDialect *)>
A dialect that can be defined at runtime.
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:63

Definition at line 29 of file DialectRegistry.h.

◆ ElementWiseVisitor

template<typename T>
using mlir::ElementWiseVisitor = 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 131 of file MemRefUtils.h.

◆ ForwardSliceOptions

Definition at line 56 of file SliceAnalysis.h.

◆ function_ref

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

Definition at line 152 of file LLVM.h.

◆ GenFunction

Initial value:
std::function<bool(const llvm::RecordKeeper &records, raw_ostream &os)>

Generator function to invoke.

Definition at line 24 of file GenInfo.h.

◆ GetIntRangeFn

Helper callback type to get the integer range of a value.

Definition at line 172 of file InferIntRangeInterface.h.

◆ Loops

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

Tile a nest of standard for loops rooted at rootForOp by finding such parametric tile sizes that the outer loops have a fixed number of iterations as defined in sizes.

Definition at line 154 of file Utils.h.

◆ LoweringCallback

Initial value:
std::function<std::unique_ptr<llvm::Module>(
Operation *, llvm::LLVMContext &, StringRef)>
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88

Definition at line 47 of file GPUCommonPass.h.

◆ MemorySpaceMapping

using mlir::MemorySpaceMapping = std::function<unsigned(gpu::AddressSpace)>

A function that maps a MemorySpace enum to a target-specific integer value.

Definition at line 70 of file GPUCommonPass.h.

◆ MemrefValue

A value with a memref type.

Definition at line 26 of file MemRefUtils.h.

◆ NewYieldValuesFn

Initial value:
std::function<SmallVector<Value>(
b
Return true if permutation is a valid permutation of the outer_dims_perm (case OuterOrInnerPerm::Oute...
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
Definition Location.h:76
This class helps build Operations.
Definition Builders.h:207

A function that returns the additional yielded values during replaceWithAdditionalYields.

newBbArgs are the newly added region iter_args. This function should return as many values as there are block arguments in newBbArgs.

Definition at line 25 of file LoopLikeInterface.h.

◆ NoSourceChunkBufferHandler

Initial value:
function_ref<LogicalResult(
std::unique_ptr<llvm::MemoryBuffer> chunkBuffer, raw_ostream &os)>

Definition at line 33 of file ToolUtilities.h.

◆ OpAsmSetBlockNameFn

A functor used to set the name of blocks in regions directly nested under an operation.

Definition at line 36 of file OpAsmSupport.h.

◆ OpAsmSetNameFn

using mlir::OpAsmSetNameFn = function_ref<void(StringRef)>

A functor used to set the name of the result.

See 'getAsmResultNames' below for more details.

Definition at line 28 of file OpAsmSupport.h.

◆ OpAsmSetValueNameFn

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 32 of file OpAsmSupport.h.

◆ OperandElementTypeRange

◆ PassAllocatorFunction

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

Definition at line 41 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 360 of file MlirOptMain.h.

◆ PassRegistryFunction

Initial value:
std::function<LogicalResult(
OpPassManager &, StringRef options,
function_ref<LogicalResult(const Twine &)> errorHandler)>
static llvm::ManagedStatic< PassManagerOptions > options
This class represents a pass manager that runs passes on either a specific operation type,...
Definition PassManager.h:46

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

◆ ReassociationExprs

Definition at line 29 of file ReshapeOpsUtils.h.

◆ ReassociationIndices

Definition at line 27 of file Utils.h.

◆ ReassociationIndicesRef

Definition at line 28 of file ReshapeOpsUtils.h.

◆ ReifiedRankedShapedTypeDims

◆ ReproducerStreamFactory

Initial value:
std::function<std::unique_ptr<ReproducerStream>(std::string &error)>

Method type for constructing ReproducerStream.

Definition at line 222 of file PassManager.h.

◆ ResultElementTypeRange

◆ SetIntLatticeFn

Initial value:
This lattice value represents the integer range of an SSA value.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition Value.h:96

Similar to SetIntRangeFn, but operating on IntegerValueRange lattice values.

This is the setResultRanges callback for the IntegerValueRange based interface method.

Definition at line 168 of file InferIntRangeInterface.h.

◆ SetIntRangeFn

Initial value:
A set of arbitrary-precision integers representing bounds on a given integer value.

The type of the setResultRanges callback provided to ops implementing InferIntRangeInterface.

It should be called once for each integer result value and be passed the ConstantIntRanges corresponding to that value.

Definition at line 162 of file InferIntRangeInterface.h.

◆ SetStridedMetadataRangeFn

Initial value:
A class that represents the strided metadata range information, including offsets,...

Callback function type for setting the strided metadata of a value.

Definition at line 139 of file InferStridedMetadataInterface.h.

◆ SetVector

template<typename T, typename Vector = llvm::SmallVector<T, 0>, typename Set = DenseSet<T>, unsigned N = 0>
using mlir::SetVector = llvm::SetVector<T, Vector, Set, N>

Definition at line 131 of file LLVM.h.

◆ StringSet

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

Definition at line 133 of file LLVM.h.

◆ StringSwitch

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

Definition at line 141 of file LLVM.h.

◆ TargetDeviceSpecEntry

using mlir::TargetDeviceSpecEntry = std::pair<StringAttr, TargetDeviceSpecInterface>

Definition at line 37 of file DataLayoutInterfaces.h.

◆ TargetDeviceSpecListRef

using mlir::TargetDeviceSpecListRef = llvm::ArrayRef<TargetDeviceSpecInterface>

Definition at line 36 of file DataLayoutInterfaces.h.

◆ TileLoops

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

Definition at line 155 of file Utils.h.

◆ TransitiveFilter

◆ TranslateFromMLIRFunction

Initial value:
std::function<LogicalResult(Operation *, 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 operation.

Definition at line 43 of file Translation.h.

◆ TranslateFunction

Initial value:
std::function<LogicalResult(
const std::shared_ptr<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 51 of file Translation.h.

◆ TranslateRawSourceMgrToMLIRFunction

Initial value:
std::function<OwningOpRef<Operation *>(llvm::SourceMgr &sourceMgr,

Definition at line 30 of file Translation.h.

◆ TranslateSourceMgrToMLIRFunction

Initial value:
std::function<OwningOpRef<Operation *>(
const std::shared_ptr<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 Operation in the given context and return a pointer to it, or a nullptr in case of any error.

Definition at line 28 of file Translation.h.

◆ TranslateStringRefToMLIRFunction

Initial value:
std::function<OwningOpRef<Operation *>(llvm::StringRef, MLIRContext *)>

Interface of the function that translates the given string to MLIR.

The implementation should create a new MLIR Operation in the given context. If source-related error reporting is required from within the function, use TranslateSourceMgrToMLIRFunction instead.

Definition at line 38 of file Translation.h.

◆ TypedValue

template<typename Ty, typename Value = mlir::Value>
using mlir::TypedValue
Initial value:
std::conditional_t<std::is_same_v<Ty, mlir::Type>,
TypedValue is a Value with a statically know type.
Definition Value.h:434

If Ty is mlir::Type this will select Value instead of having a wrapper around it.

This helps resolve ambiguous conversion issues.

Definition at line 497 of file Value.h.

◆ TypeRangeRangeIterator

Initial value:
llvm::mapped_iterator<llvm::iota_range<unsigned>::iterator,
std::function<TypeRange(unsigned)>>

Definition at line 88 of file TypeRange.h.

◆ TypeStorageAllocator

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

Definition at line 202 of file TypeSupport.h.

◆ TypeSubElementReplacements

◆ TypeSwitch

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

Definition at line 144 of file LLVM.h.

◆ ValueDimList

using mlir::ValueDimList = SmallVector<std::pair<Value, std::optional<int64_t>>>

Definition at line 51 of file ValueBoundsOpInterface.h.

◆ WalkCallback

A callback that is invoked for each value encountered during the walk of the slice.

The callback takes the current value, and returns the walk continuation, which determines if the walk should proceed and if yes, with which values.

Definition at line 81 of file SliceWalk.h.

Enumeration Type Documentation

◆ AffineExprKind

enum class 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.

◆ AsmResourceEntryKind

enum class mlir::AsmResourceEntryKind
strong

This enum represents the different kinds of resource values.

Enumerator
Blob 

A blob of data with an accompanying alignment.

Bool 

A boolean value.

String 

A string value.

Definition at line 280 of file AsmState.h.

◆ ChangeResult

enum class mlir::ChangeResult
nodiscardstrong

A result type used to indicate if a change happened.

Boolean operations on ChangeResult behave as though Change is truth.

Enumerator
NoChange 
Change 

Definition at line 37 of file DataFlowFramework.h.

◆ DeletionKind

enum class mlir::DeletionKind
strong

Returned by operation promotion logic requesting the deletion of an operation.

Enumerator
Keep 

Keep the operation after promotion.

Delete 

Delete the operation after promotion.

Definition at line 35 of file MemorySlotInterfaces.h.

◆ DiagnosticSeverity

enum class mlir::DiagnosticSeverity
strong

Defines the different supported severity of a diagnostic.

Enumerator
Note 
Warning 
Error 
Remark 

Definition at line 41 of file Diagnostics.h.

◆ GreedyRewriteStrictness

enum class mlir::GreedyRewriteStrictness
strong

This enum controls which ops are put on the worklist during a greedy pattern rewrite.

Enumerator
AnyOp 

No restrictions wrt. which ops are processed.

ExistingAndNewOps 

Only pre-existing and newly created ops are processed.

ExistingOps 

Only pre-existing ops are processed.

Definition at line 23 of file GreedyPatternRewriteDriver.h.

◆ GreedySimplifyRegionLevel

Enumerator
Disabled 

Disable region control-flow simplification.

Normal 

Run the normal simplification (e.g. dead args elimination).

Aggressive 

Run extra simplificiations (e.g.

block merging), these can be more costly or have some tradeoffs associated.

Definition at line 32 of file GreedyPatternRewriteDriver.h.

◆ HoistingKind

enum class mlir::HoistingKind : uint8_t
strong
Enumerator
None 
Loop 
Block 

Definition at line 21 of file AllocationOpInterface.h.

◆ OpAsmAliasResult

enum class mlir::OpAsmAliasResult
strong

Holds the result of OpAsm{Dialect,Attr,Type}Interface::getAlias hook call.

Enumerator
NoAlias 

The object (type or attribute) is not supported by the hook and an alias was not provided.

OverridableAlias 

An alias was provided, but it might be overriden by other hook.

FinalAlias 

An alias was provided and it should be used (no other hooks will be checked).

Definition at line 39 of file OpAsmSupport.h.

◆ PassDisplayMode

enum class mlir::PassDisplayMode
strong

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

Enumerator
List 
Pipeline 

Definition at line 199 of file PassManager.h.

◆ ReductionTilingStrategy

enum class mlir::ReductionTilingStrategy
strong

Tiling can be thought of as splitting a dimension into 2 and materializing the outer dimension as a loop:

op[original] -> op[original / x, x] -> loop[original] { op[x] }

For parallel dimensions, the split can only happen in one way, with both dimensions being parallel. For reduction dimensions however, there is a choice in how we split the reduction dimension. This enum exposes this choice.

Enumerator
FullReduction 
PartialReductionOuterReduction 
PartialReductionOuterParallel 

Definition at line 48 of file TilingInterface.h.

◆ RegionKind

enum class 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.

◆ ReinterpretMapScope

enum class mlir::ReinterpretMapScope
strong

Defines a scope for reinterpret map pass.

Enumerator
kAll 
kGenericOnly 
kExceptGeneric 

Definition at line 45 of file Passes.h.

◆ RemarkFormat

enum class mlir::RemarkFormat
strong
Enumerator
REMARK_FORMAT_STDOUT 
REMARK_FORMAT_YAML 
REMARK_FORMAT_BITSTREAM 

Definition at line 41 of file MlirOptMain.h.

◆ RemarkPolicy

enum class mlir::RemarkPolicy
strong
Enumerator
REMARK_POLICY_ALL 
REMARK_POLICY_FINAL 

Definition at line 47 of file MlirOptMain.h.

◆ SliceVerificationResult

enum class mlir::SliceVerificationResult
strong

Enum that captures information related to verifier error conditions on slice insert/extract type of ops.

Enumerator
Success 
RankTooLarge 
SizeMismatch 
ElemTypeMismatch 
MemSpaceMismatch 
LayoutMismatch 

Definition at line 356 of file BuiltinTypes.h.

◆ SparseEmitStrategy

enum class mlir::SparseEmitStrategy
strong

Defines a scope for reinterpret map pass.

Enumerator
kFunctional 
kSparseIterator 
kDebugInterface 

Definition at line 52 of file Passes.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 36 of file Passes.h.

◆ SPIRVSubByteTypeStorage

enum class mlir::SPIRVSubByteTypeStorage
strong

How sub-byte values are storaged in memory.

Enumerator
Packed 

Sub-byte values are tightly packed without any padding, e.g., 4xi2 -> i8.

Definition at line 33 of file SPIRVConversion.h.

◆ TraversalMode

Defines the traversal method options to be used in the reduction tree traversal.

Enumerator
SinglePath 
Backtrack 
MultiPath 

Definition at line 36 of file ReductionNode.h.

◆ VerbosityLevel

enum class mlir::VerbosityLevel
strong

enum class to indicate the verbosity level of the diagnostic filter.

Enumerator
ErrorsOnly 
ErrorsAndWarnings 
ErrorsWarningsAndRemarks 

Definition at line 35 of file MlirOptMain.h.

◆ WalkOrder

enum class mlir::WalkOrder
strong

Traversal order for region, block and operation walk utilities.

Enumerator
PreOrder 
PostOrder 

Definition at line 28 of file Visitors.h.

Function Documentation

◆ addressSpaceToStorageClass()

spirv::StorageClass mlir::addressSpaceToStorageClass ( gpu::AddressSpace addressSpace)

Definition at line 12 of file AttrToSPIRVConverter.cpp.

◆ 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 1517 of file FlatLinearValueConstraints.cpp.

References mlir::Builder::getAffineDimExpr(), mlir::Builder::getAffineSymbolExpr(), mlir::AffineMap::getContext(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumSymbols(), mlir::AffineMap::replaceDimsAndSymbols(), and replacement().

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

◆ allOperandsHaveSameCoopMatrixType()

bool mlir::allOperandsHaveSameCoopMatrixType ( ValueRange operands)

Definition at line 85 of file WmmaOpsToSPIRV.cpp.

References mlir::Value::getType(), and mlir::ValueRange::getType().

◆ applyDefaultTimingManagerCLOptions()

void mlir::applyDefaultTimingManagerCLOptions ( DefaultTimingManager & tm)

Apply any values that were registered with 'registerDefaultTimingManagerOptions' to a DefaultTimingManager.

Definition at line 617 of file Timing.cpp.

References createOutputStrategy(), options, mlir::DefaultTimingManager::setDisplayMode(), mlir::DefaultTimingManager::setEnabled(), and mlir::DefaultTimingManager::setOutput().

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

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

◆ applyOpPatternsGreedily()

LogicalResult mlir::applyOpPatternsGreedily ( ArrayRef< Operation * > ops,
const FrozenRewritePatternSet & patterns,
GreedyRewriteConfig config = GreedyRewriteConfig(),
bool * changed = nullptr,
bool * allErased = nullptr )

Rewrite the specified ops by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached.

The greedy rewrite may prematurely stop after a maximum number of iterations, which can be configured in the configuration parameter.

Also performs simple dead-code elimination before attempting to match any of the provided patterns.

Newly created ops and other pre-existing ops that use results of rewritten ops or supply operands to such ops are also processed, unless such ops are excluded via config.strictMode. Any other ops remain unmodified (i.e., regardless of strictMode).

In addition to strictness, a region scope can be specified. Only ops within the scope are simplified. This is similar to applyPatternsGreedily, where only ops within the given region/op are simplified by default. If no scope is specified, it is assumed to be the first common enclosing region of the given ops.

Note that ops in ops could be erased as result of folding, becoming dead, or via pattern rewrites. If more far reaching simplification is desired, applyPatternsGreedily should be used.

Returns "success" if the iterative process converged (i.e., fixpoint was reached) and no more patterns can be matched. changed is set to "true" if the IR was modified at all. allOpsErased is set to "true" if all ops in ops were erased.

Definition at line 1030 of file GreedyPatternRewriteDriver.cpp.

References changed, config, findAncestorOpInRegion(), findCommonAncestor(), patterns, success(), and verify().

Referenced by mlir::affine::affineForOpBodySkew(), applyPatterns(), and mlir::affine::simplifyAffineMinMaxOps().

◆ applyPassManagerCLOptions()

LogicalResult mlir::applyPassManagerCLOptions ( PassManager & pm)

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

Definition at line 145 of file PassManagerOptions.cpp.

References emitError(), mlir::PassManager::enableCrashReproducerGeneration(), mlir::PassManager::enableStatistics(), mlir::PassManager::getContext(), mlir::MLIRContext::isMultithreadingEnabled(), options, and success().

Referenced by performActions().

◆ applyPatternsAndFoldGreedily() [1/2]

LogicalResult mlir::applyPatternsAndFoldGreedily ( Operation * op,
const FrozenRewritePatternSet & patterns,
GreedyRewriteConfig config = GreedyRewriteConfig(),
bool * changed = nullptr )
inline

Same as applyPatternsGreedily above with folding.

FIXME: Remove this once transition to above is complieted.

Definition at line 236 of file GreedyPatternRewriteDriver.h.

References applyPatternsAndFoldGreedily(), applyPatternsGreedily(), changed, config, and patterns.

◆ applyPatternsAndFoldGreedily() [2/2]

LogicalResult mlir::applyPatternsAndFoldGreedily ( Region & region,
const FrozenRewritePatternSet & patterns,
GreedyRewriteConfig config = GreedyRewriteConfig(),
bool * changed = nullptr )
inline

Same as applyPatternsAndGreedily above with folding.

FIXME: Remove this once transition to above is completed.

Definition at line 184 of file GreedyPatternRewriteDriver.h.

References applyPatternsAndFoldGreedily(), applyPatternsGreedily(), changed, config, and patterns.

Referenced by applyPatternsAndFoldGreedily(), and applyPatternsAndFoldGreedily().

◆ applyPatternsGreedily() [1/2]

LogicalResult mlir::applyPatternsGreedily ( Operation * op,
const FrozenRewritePatternSet & patterns,
GreedyRewriteConfig config = GreedyRewriteConfig(),
bool * changed = nullptr )
inline

Rewrite ops nested under the given operation, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached.

The greedy rewrite may prematurely stop after a maximum number of iterations, which can be configured in the configuration parameter.

Also performs simple dead-code elimination before attempting to match any of the provided patterns.

This overload runs a separate greedy rewrite for each region of the specified op. A region scope can be set in the configuration parameter. By default, the scope is set to the region of the current greedy rewrite. Only in-scope ops are added to the worklist and only in-scope ops and the specified op itself are allowed to be modified by the patterns.

Note: The specified op may be modified, but it may not be removed by the patterns.

Returns "success" if the iterative process converged (i.e., fixpoint was reached) and no more patterns can be matched within the region. changed is set to "true" if the IR was modified at all.

Note: This method does not apply patterns to the given operation itself.

Definition at line 217 of file GreedyPatternRewriteDriver.h.

References applyPatternsGreedily(), changed, config, mlir::Operation::getRegions(), and patterns.

◆ applyPatternsGreedily() [2/2]

LogicalResult mlir::applyPatternsGreedily ( Region & region,
const FrozenRewritePatternSet & patterns,
GreedyRewriteConfig config = GreedyRewriteConfig(),
bool * changed = nullptr )

Rewrite ops in the given region, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached.

The greedy rewrite may prematurely stop after a maximum number of iterations, which can be configured in the configuration parameter.

Also performs simple dead-code elimination before attempting to match any of the provided patterns.

A region scope can be set in the configuration parameter. By default, the scope is set to the specified region. Only in-scope ops are added to the worklist and only in-scope ops are allowed to be modified by the patterns.

Returns "success" if the iterative process converged (i.e., fixpoint was reached) and no more patterns can be matched within the region. changed is set to "true" if the IR was modified at all.

Note: This method does not apply patterns to the region's parent operation.

Definition at line 913 of file GreedyPatternRewriteDriver.cpp.

References changed, config, mlir::Region::getContext(), mlir::Region::getParentOp(), mlir::Operation::hasTrait(), patterns, and verify().

Referenced by applyPatternsAndFoldGreedily(), applyPatternsAndFoldGreedily(), applyPatternsGreedily(), mlirApplyPatternsAndFoldGreedily(), mlirApplyPatternsAndFoldGreedilyWithOp(), SimplifyAffineMinMaxPass::runOnOperation(), mlir::spirv::unrollVectorsInFuncBodies(), and mlir::spirv::unrollVectorsInSignatures().

◆ applyPermutation() [1/2]

◆ applyPermutation() [2/2]

template<typename T>
SmallVector< T > mlir::applyPermutation ( const SmallVectorImpl< T > & input,
ArrayRef< int64_t > permutation )

Definition at line 215 of file IndexingUtils.h.

References applyPermutation().

◆ applyPermutationMap()

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

◆ applyPermutationToVector()

template<typename T, unsigned N>
void mlir::applyPermutationToVector ( SmallVector< T, N > & inVec,
ArrayRef< int64_t > permutation )

Apply the permutation defined by permutation to inVec.

Element i in inVec is mapped to location j = permutation[i]. E.g.: for an input vector ‘inVec = ['a’, 'b', 'c'] and a permutation vector permutation = [2, 0, 1], this function leaves inVec = ['c', 'a', / 'b']`.

Definition at line 226 of file IndexingUtils.h.

References applyPermutation().

Referenced by mlir::linalg::commonPermutationOfPackAndUnPackOp(), computePackUnPackPerm(), mlir::tensor::computeTransposedType(), mlir::linalg::getPackedOuterShapeWithoutTransposition(), mlir::linalg::getPackOpResultTypeShape(), getPackUnpackRankReducedPerm(), mlir::linalg::interchangeGenericOp(), mlir::linalg::lowerPack(), mlir::linalg::lowerUnPack(), mlir::linalg::DecomposeOuterUnitDimsUnPackOpPattern::matchAndRewrite(), permuteShape(), tileLinalgOpImpl(), and mlir::detail::TileOffsetRangeImpl::TileOffsetRangeImpl().

◆ areAllConstantIntValue()

bool mlir::areAllConstantIntValue ( ArrayRef< OpFoldResult > ofrs,
int64_t value )

Return true if all of ofrs are constant integers equal to value.

Definition at line 159 of file StaticValueUtils.cpp.

References isConstantIntValue().

◆ areConstantIntValues()

bool mlir::areConstantIntValues ( ArrayRef< OpFoldResult > ofrs,
ArrayRef< int64_t > values )

Return true if all of ofrs are constant integers equal to the corresponding value in values.

Definition at line 164 of file StaticValueUtils.cpp.

References getConstantIntValues().

◆ 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 26 of file RegionUtils.h.

Referenced by checkAffineLoopNestMappableImpl(), and coalescePerfectlyNestedSCFForLoops().

◆ asMainReturnCode()

int mlir::asMainReturnCode ( LogicalResult r)
inline

Helper wrapper to return the result of MlirOptMain directly from main.

Example:

int main(int argc, char **argv) {
  // ...
  return mlir::asMainReturnCode(mlir::MlirOptMain(
      argc, argv, /* ... *&zwj;/);
}

Definition at line 421 of file MlirOptMain.h.

◆ barePtrFuncArgTypeConverter()

LogicalResult mlir::barePtrFuncArgTypeConverter ( const 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 826 of file TypeConverter.cpp.

References mlir::LLVMTypeConverter::convertCallingConventionType(), and result.

◆ bindDims()

◆ bindDimsList()

template<typename AffineExprTy>
void mlir::bindDimsList ( MLIRContext * ctx,
MutableArrayRef< AffineExprTy > exprs )

Definition at line 316 of file AffineExpr.h.

References getAffineDimExpr().

Referenced by mlir::linalg::computePaddedShape().

◆ bindSymbols()

◆ bindSymbolsList()

template<typename AffineExprTy>
void mlir::bindSymbolsList ( MLIRContext * ctx,
MutableArrayRef< AffineExprTy > exprs )

◆ clone() [1/2]

◆ clone() [2/2]

template<typename OpT>
OpT mlir::clone ( OpBuilder & b,
OpT op,
TypeRange newResultTypes,
ValueRange newOperands )

Definition at line 145 of file StructuredOpsUtils.h.

References b, and clone().

◆ cloneWithoutRegions()

◆ coalesceLoops() [1/2]

LogicalResult 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 986 of file Utils.cpp.

References coalesceLoops().

Referenced by coalesceLoops(), and coalescePerfectlyNestedSCFForLoops().

◆ coalesceLoops() [2/2]

◆ coalescePerfectlyNestedSCFForLoops()

LogicalResult mlir::coalescePerfectlyNestedSCFForLoops ( scf::ForOp op)

Walk an affine.for to find a band to coalesce.

Definition at line 994 of file Utils.cpp.

References areValuesDefinedAbove(), coalesceLoops(), getPerfectlyNestedLoops(), result, and success().

◆ collapseParallelLoops()

void mlir::collapseParallelLoops ( RewriterBase & rewriter,
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 1069 of file Utils.cpp.

References mlir::arith::ConstantIndexOp::create(), denormalizeInductionVariable(), emitNormalizedLoopBounds(), getValueOrCreateConstantIntOp(), replaceAllUsesInRegionWith(), mlir::OpBuilder::setInsertionPoint(), and mlir::OpBuilder::setInsertionPointToStart().

◆ composeReassociationIndices()

std::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 360 of file ReshapeOpsUtils.cpp.

References indices.

◆ compressDims()

AffineMap mlir::compressDims ( AffineMap map,
const llvm::SmallBitVector & unusedDims )

Drop the dims that are listed in unusedDims.

Definition at line 710 of file AffineMap.cpp.

References projectDims().

Referenced by compressUnusedDims().

◆ compressSymbols()

AffineMap mlir::compressSymbols ( AffineMap map,
const llvm::SmallBitVector & unusedSymbols )

Drop the symbols that are listed in unusedSymbols.

Definition at line 724 of file AffineMap.cpp.

References projectSymbols().

Referenced by compressUnusedSymbols().

◆ compressUnusedDims() [1/2]

AffineMap mlir::compressUnusedDims ( AffineMap map)

Drop the dims that are not used.

Definition at line 715 of file AffineMap.cpp.

References compressDims(), and getUnusedDimsBitVector().

Referenced by compressUnusedDims(), mlir::vector::inferTransferOpMaskType(), and reindexIndexingMap().

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

References compressUnusedDims(), and compressUnusedListImpl().

◆ compressUnusedSymbols() [1/2]

AffineMap mlir::compressUnusedSymbols ( AffineMap map)

Drop the symbols that are not used.

Definition at line 729 of file AffineMap.cpp.

References compressSymbols(), and getUnusedSymbolsBitVector().

Referenced by compressUnusedSymbols(), getProjectedMap(), and mlirAffineMapCompressUnusedSymbols().

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

References compressUnusedListImpl(), and compressUnusedSymbols().

◆ computeElementwiseMul() [1/2]

SmallVector< AffineExpr > mlir::computeElementwiseMul ( ArrayRef< AffineExpr > v1,
ArrayRef< AffineExpr > v2 )

Return a vector containing llvm::zip_equal(v1, v2) multiplied elementwise.

It is the caller's responsibility to pass proper AffineExpr kind that result in valid AffineExpr (i.e. cannot multiply 2 AffineDimExpr or divide by an AffineDimExpr).

Return an empty vector if v1 and v2 are empty.

Definition at line 144 of file IndexingUtils.cpp.

References computeElementwiseMulImpl().

◆ computeElementwiseMul() [2/2]

SmallVector< int64_t > mlir::computeElementwiseMul ( ArrayRef< int64_t > v1,
ArrayRef< int64_t > v2 )

Return a vector containing llvm::zip_equal(v1, v2) multiplied elementwise.

Return an empty vector if v1 and v2 are empty.

Definition at line 79 of file IndexingUtils.cpp.

References computeElementwiseMulImpl().

Referenced by mlir::xegpu::genCoordinates(), mlir::detail::TileOffsetRangeImpl::getDynamicTileOffsets(), and mlir::detail::TileOffsetRangeImpl::getStaticTileOffsets().

◆ computeLinearIndex() [1/2]

std::pair< AffineExpr, SmallVector< OpFoldResult > > mlir::computeLinearIndex ( OpFoldResult sourceOffset,
ArrayRef< int64_t > strides,
ArrayRef< Value > indices )

◆ computeLinearIndex() [2/2]

std::pair< AffineExpr, SmallVector< OpFoldResult > > mlir::computeLinearIndex ( OpFoldResult sourceOffset,
ArrayRef< OpFoldResult > strides,
ArrayRef< OpFoldResult > indices )

Compute linear index from provided strides and indices, assuming strided layout.

Returns AffineExpr and list of values to apply to it, e.g.:

auto &&[expr, values] = computeLinearIndex(...); offset = affine::makeComposedFoldedAffineApply(builder, loc, expr, values);

Definition at line 286 of file IndexingUtils.cpp.

References bindSymbolsList(), getContext(), and indices.

Referenced by computeLinearIndex(), and getCollapsedIndices().

◆ computeMaxLinearIndex() [1/2]

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

Return the number of elements of basis (i.e.

the max linear index). Return 0 if basis is empty.

basis elements are asserted to be non-negative.

Return 0 if basis is empty.

Definition at line 69 of file IndexingUtils.h.

References computeProduct().

Referenced by handleMultidimensionalVectors(), and mlir::detail::TileOffsetRangeImpl::TileOffsetRangeImpl().

◆ computeMaxLinearIndex() [2/2]

AffineExpr mlir::computeMaxLinearIndex ( MLIRContext * ctx,
ArrayRef< AffineExpr > basis )
inline

Return the number of elements of basis (i.e.

the max linear index). Return 0 if basis is empty.

It is the caller's responsibility to pass proper AffineExpr kind that result in valid AffineExpr (i.e. cannot multiply 2 AffineDimExpr or divide by an AffineDimExpr).

basis elements are expected to bind to non-negative values.

Return the 0 AffineConstantExpr if basis is empty.

Definition at line 159 of file IndexingUtils.h.

References computeProduct().

◆ computePermutationVector()

SmallVector< int64_t > mlir::computePermutationVector ( int64_t permSize,
ArrayRef< int64_t > positions,
ArrayRef< int64_t > desiredPositions )

Return a permutation vector of size permSize that would result in moving positions into desiredPositions.

For example, permSize == 5, positions = {2, 4}, desiredPositions = {1, 0} would result in a {4, 2, 0, 1, 3} permutation vector.

Definition at line 217 of file IndexingUtils.cpp.

Referenced by computePackUnPackPerm(), and mlir::linalg::packMatmulGreedily().

◆ computeProduct() [1/2]

◆ computeProduct() [2/2]

AffineExpr mlir::computeProduct ( MLIRContext * ctx,
ArrayRef< AffineExpr > basis )

Self-explicit.

Definition at line 153 of file IndexingUtils.cpp.

References getAffineConstantExpr().

◆ computeRankReductionMask()

std::optional< llvm::SmallDenseSet< unsigned > > mlir::computeRankReductionMask ( ArrayRef< int64_t > originalShape,
ArrayRef< int64_t > reducedShape,
bool matchDynamic = false )

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 std::nullopt if reducedShape cannot be obtained by dropping only 1 entries in originalShape. If matchDynamic is true, then dynamic dims in originalShape and reducedShape will be considered matching with non-dynamic dims, unless the non-dynamic dim is from originalShape and equal to 1. For example, in ([1, 3, ?], [?, 5]), the mask would be {1, 0, 0}, since 3 and 5 will match with the corresponding dynamic dims.

Definition at line 456 of file BuiltinTypes.cpp.

Referenced by isRankReducedType().

◆ computeShapeRatio()

std::optional< SmallVector< int64_t > > mlir::computeShapeRatio ( ArrayRef< int64_t > shape,
ArrayRef< int64_t > subShape )

Return the multi-dimensional integral ratio of subShape to the trailing dimensions of shape.

This represents how many times subShape fits within shape. If integral division is not possible, return std::nullopt. The trailing subShape.size() entries of both shapes are assumed (and enforced) to only contain non-negative values.

Examples:

  • shapeRatio({3, 5, 8}, {2, 5, 2}) returns {3, 2, 1}.
  • shapeRatio({3, 8}, {2, 5, 2}) returns std::nullopt (subshape has higher rank).
  • shapeRatio({42, 2, 10, 32}, {2, 5, 2}) returns {42, 1, 2, 16} which is derived as {42(leading shape dim), 2/2, 10/5, 32/2}.
  • shapeRatio({42, 2, 11, 32}, {2, 5, 2}) returns std::nullopt which is derived as {42(leading shape dim), 2/2, 11/5(not divisible), 32/2}.

Definition at line 106 of file IndexingUtils.cpp.

References result.

Referenced by mlir::xegpu::extractVectorsWithShapeFromValue(), getTargetShape(), and mlir::detail::TileOffsetRangeImpl::TileOffsetRangeImpl().

◆ computeStrides() [1/2]

SmallVector< AffineExpr > mlir::computeStrides ( ArrayRef< AffineExpr > sizes)
inline

Definition at line 129 of file IndexingUtils.h.

References computeSuffixProduct().

◆ computeStrides() [2/2]

◆ computeSuffixProduct() [1/2]

SmallVector< AffineExpr > mlir::computeSuffixProduct ( ArrayRef< AffineExpr > sizes)

Given a set of sizes, return the suffix product.

When applied to slicing, this is the calculation needed to derive the strides (i.e. the number of linear indices to skip along the (k-1) most minor dimensions to get the next k-slice).

This is the basis to linearize an n-D offset confined to [0 ... sizes].

Assuming sizes is [s0, .. sn], return the vector<AffineExpr> [s1 * ... * sn, s2 * ... * sn, ..., sn, 1].

It is the caller's responsibility to pass proper AffineExpr kind that result in valid AffineExpr (i.e. cannot multiply 2 AffineDimExpr or divide by an AffineDimExpr).

sizes elements are expected to bind to non-negative values.

Return an empty vector if sizes is empty.

Definition at line 137 of file IndexingUtils.cpp.

References getAffineConstantExpr().

◆ computeSuffixProduct() [2/2]

SmallVector< int64_t > mlir::computeSuffixProduct ( ArrayRef< int64_t > sizes)

Given a set of sizes, return the suffix product.

When applied to slicing, this is the calculation needed to derive the strides (i.e. the number of linear indices to skip along the (k-1) most minor dimensions to get the next k-slice).

This is the basis to linearize an n-D offset confined to [0 ... sizes].

Assuming sizes is [s0, .. sn], return the vector<int64_t> [s1 * ... * sn, s2 * ... * sn, ..., sn, 1].

sizes elements s1 to sn are asserted to be non-negative.

Return an empty vector if sizes is empty.

Definition at line 71 of file IndexingUtils.cpp.

Referenced by computeStrides(), computeStrides(), getCollapsedIndices(), and getFatRawBufferTypeLike().

◆ computeSum() [1/2]

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

Self-explicit.

Referenced by HopperBuilder::buildBarrierArriveTx().

◆ computeSum() [2/2]

AffineExpr mlir::computeSum ( MLIRContext * ctx,
ArrayRef< AffineExpr > basis )

Self-explicit.

Definition at line 149 of file IndexingUtils.cpp.

References getAffineConstantExpr().

◆ computeTopologicalSorting()

bool mlir::computeTopologicalSorting ( MutableArrayRef< Operation * > ops,
function_ref< bool(Value, Operation *)> isOperandReady = nullptr )

Compute a topological ordering of the given ops.

This sort is not stable.

Note: If the specified ops contain incomplete/interrupted SSA use-def chains, the result may not actually be a topological sorting with respect to the entire program.

Definition at line 107 of file TopologicalSortUtils.cpp.

References isOpReady().

Referenced by makeRegionIsolatedFromAbove().

◆ concatAffineMaps()

AffineMap mlir::concatAffineMaps ( ArrayRef< AffineMap > maps,
MLIRContext * context )

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

References mlir::AffineMap::get().

Referenced by mlir::linalg::detail::canOpOperandsBeDroppedImpl(), mlir::linalg::dropUnitDims(), and isOpOperandCanBeDroppedAfterFusedLinalgs().

◆ configureAMXLegalizeForExportTarget()

void mlir::configureAMXLegalizeForExportTarget ( LLVMConversionTarget & target)

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

Definition at line 49 of file LegalizeForLLVMExport.cpp.

References target.

◆ configureArmSMEToLLVMConversionLegality()

void mlir::configureArmSMEToLLVMConversionLegality ( ConversionTarget & target)

Configure target to convert from the ArmSME dialect to LLVM intrinsics.

Definition at line 938 of file ArmSMEToLLVM.cpp.

References target.

◆ configureArmSVELegalizeForExportTarget()

void mlir::configureArmSVELegalizeForExportTarget ( LLVMConversionTarget & target)

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

Definition at line 218 of file LegalizeForLLVMExport.cpp.

References target.

◆ configureGpuToNVVMConversionLegality()

void mlir::configureGpuToNVVMConversionLegality ( ConversionTarget & target)

Configure target to convert from the GPU dialect to NVVM.

Definition at line 432 of file LowerGpuOpsToNVVMOps.cpp.

References target.

◆ configureGpuToNVVMTypeConverter()

void mlir::configureGpuToNVVMTypeConverter ( LLVMTypeConverter & converter)

Configure the LLVM type convert to convert types and address spaces from the GPU dialect to NVVM.

Definition at line 448 of file LowerGpuOpsToNVVMOps.cpp.

References convertMMAToLLVMType(), and populateGpuMemorySpaceAttributeConversions().

◆ configureGpuToROCDLConversionLegality()

void mlir::configureGpuToROCDLConversionLegality ( ConversionTarget & target)

Configure target to convert from the GPU dialect to ROCDL.

Definition at line 427 of file LowerGpuOpsToROCDLOps.cpp.

References target.

◆ configureOpenMPToLLVMConversionLegality()

void mlir::configureOpenMPToLLVMConversionLegality ( ConversionTarget & target,
const LLVMTypeConverter & typeConverter )

Configure dynamic conversion legality of regionless operations from OpenMP to LLVM.

Definition at line 119 of file OpenMPToLLVM.cpp.

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

References mlir::gpu::getMappingAttrName(), kVisitedAttrName, and target.

◆ configureX86VectorLegalizeForExportTarget()

void mlir::configureX86VectorLegalizeForExportTarget ( LLVMConversionTarget & target)

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

Definition at line 46 of file LegalizeForLLVMExport.cpp.

References target.

◆ constantTripCount()

std::optional< APInt > mlir::constantTripCount ( OpFoldResult lb,
OpFoldResult ub,
OpFoldResult step,
bool isSigned,
llvm::function_ref< std::optional< llvm::APSInt >(Value, Value, bool)> computeUbMinusLb )

Return the number of iterations for a loop with a lower bound lb, upper bound ub and step step.

The isSigned flag indicates whether the loop comparison between lb and ub is signed or unsigned. A negative step or a lower bound greater than the upper bound are considered invalid and will yield a zero trip count. The computeUbMinusLb callback is invoked to compute the difference between the upper and lower bound when not constant. It can be used by the client to compute a static difference when the bounds are not constant.

For example, the following code:

ub = arith.addi nsw lb, c16_i32 : i32 %1 = scf.for arg0 = lb to ub ...

where ub is computed as a static offset from lb. Note: the matched addition should be nsw/nuw (matching the loop comparison) to avoid overflow, otherwise an overflow would imply a zero trip count.

Compute the difference between the upper and lower bound: either from the constant value or using the computeUbMinusLb callback.

Non-constant bound, let's try to compute the difference between the upper and lower bound

Definition at line 278 of file StaticValueUtils.cpp.

References getConstantAPIntValue().

Referenced by getConstLoopTripCounts().

◆ constFoldBinaryOp() [1/2]

template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<ResultElementValueT(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOp ( ArrayRef< Attribute > operands,
CalculationT && calculate )

Definition at line 194 of file CommonFolders.h.

References b, and constFoldBinaryOpConditional().

◆ constFoldBinaryOp() [2/2]

template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = void, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<ResultElementValueT(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOp ( ArrayRef< Attribute > operands,
Type resultType,
CalculationT && calculate )

◆ constFoldBinaryOpConditional() [1/2]

template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref< std::optional<ResultElementValueT>(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOpConditional ( ArrayRef< Attribute > operands,
CalculationT && calculate )

Performs constant folding calculate with element-wise behavior on the two attributes in operands and returns the result if possible.

Uses the operand element type for the element type of the returned attribute. Optional PoisonAttr template argument allows to specify 'poison' attribute which will be directly propagated to result.

Definition at line 137 of file CommonFolders.h.

References constFoldBinaryOpConditional().

◆ constFoldBinaryOpConditional() [2/2]

template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref< std::optional<ResultElementValueT>(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOpConditional ( ArrayRef< Attribute > operands,
Type resultType,
CalculationT && calculate )

Performs constant folding calculate with element-wise behavior on the two attributes in operands and returns the result if possible.

Uses resultType for the type of the returned attribute. Optional PoisonAttr template argument allows to specify 'poison' attribute which will be directly propagated to result.

Definition at line 46 of file CommonFolders.h.

References mlir::DenseElementsAttr::get(), lhs, and rhs.

Referenced by constFoldBinaryOp(), constFoldBinaryOp(), and constFoldBinaryOpConditional().

◆ constFoldCastOp()

template<class AttrElementT, class TargetAttrElementT, class ElementValueT = typename AttrElementT::ValueType, class TargetElementValueT = typename TargetAttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class CalculationT = function_ref<TargetElementValueT(ElementValueT, bool)>>
Attribute mlir::constFoldCastOp ( ArrayRef< Attribute > operands,
Type resType,
CalculationT && calculate )

Definition at line 349 of file CommonFolders.h.

References mlir::DenseElementsAttr::get().

◆ constFoldUnaryOp() [1/2]

template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<ResultElementValueT(ElementValueT)>>
Attribute mlir::constFoldUnaryOp ( ArrayRef< Attribute > operands,
CalculationT && calculate )

Definition at line 334 of file CommonFolders.h.

References constFoldUnaryOpConditional().

◆ constFoldUnaryOp() [2/2]

template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<ResultElementValueT(ElementValueT)>>
Attribute mlir::constFoldUnaryOp ( ArrayRef< Attribute > operands,
Type resultType,
CalculationT && calculate )

Definition at line 318 of file CommonFolders.h.

References constFoldUnaryOpConditional().

◆ constFoldUnaryOpConditional() [1/2]

template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<std::optional<ResultElementValueT>(ElementValueT)>>
Attribute mlir::constFoldUnaryOpConditional ( ArrayRef< Attribute > operands,
CalculationT && calculate )

Performs constant folding calculate with element-wise behavior on the one attributes in operands and returns the result if possible.

Uses the operand element type for the element type of the returned attribute. Optional PoisonAttr template argument allows to specify 'poison' attribute which will be directly propagated to result.

Definition at line 282 of file CommonFolders.h.

References constFoldUnaryOpConditional().

◆ constFoldUnaryOpConditional() [2/2]

template<class AttrElementT, class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class ResultAttrElementT = AttrElementT, class ResultElementValueT = typename ResultAttrElementT::ValueType, class CalculationT = function_ref<std::optional<ResultElementValueT>(ElementValueT)>>
Attribute mlir::constFoldUnaryOpConditional ( ArrayRef< Attribute > operands,
Type resultType,
CalculationT && calculate )

Performs constant folding calculate with element-wise behavior on the one attributes in operands and returns the result if possible.

Uses resultType for the type of the returned attribute. Optional PoisonAttr template argument allows to specify 'poison' attribute which will be directly propagated to result.

Definition at line 215 of file CommonFolders.h.

References mlir::DenseElementsAttr::get().

Referenced by constFoldUnaryOp(), constFoldUnaryOp(), and constFoldUnaryOpConditional().

◆ controlFlowSink()

size_t mlir::controlFlowSink ( RegionRange regions,
DominanceInfo & domInfo,
function_ref< bool(Operation *, Region *)> shouldMoveIntoRegion,
function_ref< void(Operation *, Region *)> moveIntoRegion )

Given a list of regions, perform control flow sinking on them.

For each region, control-flow sinking moves operations that dominate the region but whose only users are in the region into the regions so that they aren't executed on paths where their results are not needed.

TODO: For the moment, this is a simple control-flow sink, i.e., no duplicating of ops. It should be made to accept a cost model to determine whether duplicating a particular op is profitable.

Example:

%0 = arith.addi %arg0, %arg1
scf.if %cond {
scf.yield %0
} else {
scf.yield %arg2
}

After control-flow sink:

scf.if %cond {
%0 = arith.addi %arg0, %arg1
scf.yield %0
} else {
scf.yield %arg2
}

Users must supply a callback shouldMoveIntoRegion that determines whether the given operation that only has users in the given operation should be moved into that region. If this returns true, moveIntoRegion is called on the same operation and region.

moveIntoRegion must move the operation into the region such that dominance of the operation is preserved; for example, by moving the operation to the start of the entry block. This ensures the preservation of SSA dominance of the operation's results.

Returns the number of operations sunk.

Definition at line 132 of file ControlFlowSinkUtils.cpp.

◆ convertAffineLoopNestToGPULaunch()

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

References patterns, and target.

◆ convertFromAttribute() [1/10]

LogicalResult mlir::convertFromAttribute ( bool & storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Extract the boolean from attr into storage.

If attr is not a BoolAttr, return failure and emit an error into the diagnostic from emitError.

Definition at line 101 of file ODSSupport.cpp.

References emitError(), and success().

◆ convertFromAttribute() [2/10]

LogicalResult mlir::convertFromAttribute ( int32_t & storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Convert an IntegerAttr attribute to an int32_t, or return an error if the attribute isn't an IntegerAttr.

If the optional diagnostic is provided an error message is also emitted.

Definition at line 37 of file ODSSupport.cpp.

References emitError(), and success().

◆ convertFromAttribute() [3/10]

LogicalResult mlir::convertFromAttribute ( int64_t & storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Convert an IntegerAttr attribute to an int64_t, or return an error if the attribute isn't an IntegerAttr.

If the optional diagnostic is provided an error message is also emitted.

Definition at line 22 of file ODSSupport.cpp.

References emitError(), and success().

◆ convertFromAttribute() [4/10]

LogicalResult mlir::convertFromAttribute ( int8_t & storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Convert an IntegerAttr attribute to an int8_t, or return an error if the attribute isn't an IntegerAttr.

If the optional diagnostic is provided an error message is also emitted.

Definition at line 52 of file ODSSupport.cpp.

References emitError(), and success().

◆ convertFromAttribute() [5/10]

LogicalResult mlir::convertFromAttribute ( MutableArrayRef< int32_t > storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Convert a DenseI32ArrayAttr to the provided storage.

It is expected that the storage has the same size as the array. An error is returned if the attribute isn't a DenseI32ArrayAttr or it does not have the same size. If the optional diagnostic is provided an error message is also emitted.

Definition at line 139 of file ODSSupport.cpp.

References convertDenseArrayFromAttr(), and emitError().

◆ convertFromAttribute() [6/10]

LogicalResult mlir::convertFromAttribute ( MutableArrayRef< int64_t > storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Convert a DenseI64ArrayAttr to the provided storage.

It is expected that the storage has the same size as the array. An error is returned if the attribute isn't a DenseI64ArrayAttr or it does not have the same size. If the optional diagnostic is provided an error message is also emitted.

Definition at line 133 of file ODSSupport.cpp.

References convertDenseArrayFromAttr(), and emitError().

◆ convertFromAttribute() [7/10]

LogicalResult mlir::convertFromAttribute ( SmallVectorImpl< int32_t > & storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Convert a DenseI32ArrayAttr to the provided storage, which will be cleared before writing.

It is expected that the storage has the same size as the array. An error is returned and emitted to the optional emitError function if the attribute isn't a DenseI32ArrayAttr.

Definition at line 166 of file ODSSupport.cpp.

References convertDenseArrayFromAttr(), and emitError().

◆ convertFromAttribute() [8/10]

LogicalResult mlir::convertFromAttribute ( SmallVectorImpl< int64_t > & storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Convert a DenseI64ArrayAttr to the provided storage, which will be cleared before writing.

An error is returned and emitted to the optional emitError function if the attribute isn't a DenseI64ArrayAttr.

Definition at line 160 of file ODSSupport.cpp.

References convertDenseArrayFromAttr(), and emitError().

◆ convertFromAttribute() [9/10]

LogicalResult mlir::convertFromAttribute ( std::string & storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Extract the string from attr into storage.

If attr is not a StringAttr, return failure and emit an error into the diagnostic from emitError.

Definition at line 86 of file ODSSupport.cpp.

References emitError(), and success().

◆ convertFromAttribute() [10/10]

LogicalResult mlir::convertFromAttribute ( uint8_t & storage,
Attribute attr,
function_ref< InFlightDiagnostic()> emitError )

Convert an IntegerAttr attribute to an uint8_t, or return an error if the attribute isn't an IntegerAttr.

If the optional diagnostic is provided an error message is also emitted.

Definition at line 69 of file ODSSupport.cpp.

References emitError(), and success().

◆ convertFuncOpToLLVMFuncOp()

FailureOr< LLVM::LLVMFuncOp > mlir::convertFuncOpToLLVMFuncOp ( FunctionOpInterface funcOp,
ConversionPatternRewriter & rewriter,
const LLVMTypeConverter & converter,
SymbolTableCollection * symbolTables = nullptr )

◆ convertMMAToLLVMType()

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

Return the LLVMStructureType corresponding to the MMAMatrixType type.

Definition at line 380 of file WmmaOpsToNvvm.cpp.

References getElementType(), mlir::gpu::MMAMatrixType::getOperand(), mlir::gpu::MMAMatrixType::getShape(), and mlir::NVVM::inferMMAType().

Referenced by configureGpuToNVVMTypeConverter().

◆ convertReassociationIndicesToExprs()

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

Convert reassociation indices to affine expressions.

Definition at line 396 of file ReshapeOpsUtils.cpp.

References getAffineDimExpr(), and indices.

◆ convertReassociationMapsToIndices()

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

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

Definition at line 433 of file ReshapeOpsUtils.cpp.

References indices.

◆ convertScalarToDtype()

Value mlir::convertScalarToDtype ( OpBuilder & b,
Location loc,
Value operand,
Type toType,
bool isUnsignedCast )

Converts a scalar value operand to type toType.

If the value doesn't convert, a warning will be issued and the operand is returned as is (which will presumably yield a verification issue downstream).

Definition at line 238 of file Utils.cpp.

References b, convertScalarToComplexDtype(), convertScalarToFpDtype(), convertScalarToIntDtype(), emitWarning(), mlir::Value::getType(), and result.

Referenced by mlir::linalg::createMul(), and mlir::sparse_tensor::genCast().

◆ convertToAttribute() [1/8]

Attribute mlir::convertToAttribute ( MLIRContext * ctx,
ArrayRef< int32_t > storage )

Convert the provided ArrayRef<int32_t> to a DenseI32ArrayAttr attribute.

Definition at line 177 of file ODSSupport.cpp.

References mlir::detail::DenseArrayAttrImpl< int32_t >::get().

◆ convertToAttribute() [2/8]

Attribute mlir::convertToAttribute ( MLIRContext * ctx,
ArrayRef< int64_t > storage )

Convert the provided ArrayRef<int64_t> to a DenseI64ArrayAttr attribute.

Definition at line 172 of file ODSSupport.cpp.

References mlir::detail::DenseArrayAttrImpl< int64_t >::get().

◆ convertToAttribute() [3/8]

Attribute mlir::convertToAttribute ( MLIRContext * ctx,
bool storage )

Convert the given string into a BooleanAttr.

Definition at line 110 of file ODSSupport.cpp.

References mlir::BoolAttr::get().

◆ convertToAttribute() [4/8]

Attribute mlir::convertToAttribute ( MLIRContext * ctx,
const std::string & storage )

Convert the given string into a StringAttr.

Note that this takes a reference to the storage of a string property, which is an std::string.

Definition at line 95 of file ODSSupport.cpp.

◆ convertToAttribute() [5/8]

Attribute mlir::convertToAttribute ( MLIRContext * ctx,
int32_t storage )

Convert the provided int32_t to an IntegerAttr attribute.

Definition at line 47 of file ODSSupport.cpp.

◆ convertToAttribute() [6/8]

Attribute mlir::convertToAttribute ( MLIRContext * ctx,
int64_t storage )

Convert the provided int64_t to an IntegerAttr attribute.

Definition at line 32 of file ODSSupport.cpp.

◆ convertToAttribute() [7/8]

Attribute mlir::convertToAttribute ( MLIRContext * ctx,
int8_t storage )

Convert the provided int8_t to an IntegerAttr attribute.

Convert the provided int8_t to an IntegerAttr attribute.

Definition at line 63 of file ODSSupport.cpp.

◆ convertToAttribute() [8/8]

Attribute mlir::convertToAttribute ( MLIRContext * ctx,
uint8_t storage )

Convert the provided uint8_t to an IntegerAttr attribute.

Convert the provided uint8_t to an IntegerAttr attribute.

Definition at line 80 of file ODSSupport.cpp.

◆ convertVectorToMMAOps()

LogicalResult mlir::convertVectorToMMAOps ( RewriterBase & rewriter,
Operation * rootOp )

Convert vector ops to MMA matrix operations nested under rootOp.

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 1240 of file VectorToGPU.cpp.

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

◆ convertVectorToNVVMCompatibleMMASync()

LogicalResult mlir::convertVectorToNVVMCompatibleMMASync ( RewriterBase & rewriter,
Operation * rootOp )

Convert vector ops ops nested under rootOp to vector and GPU operaitons compatible with the nvvm.mma.sync lowering path.

This will convert a slice of operations that can be legally lowered on this path while the rest of the vector operations are left untouched.

Definition at line 1273 of file VectorToGPU.cpp.

References convertConstantOpMmaSync(), convertContractOpToMmaSync(), convertExtractStridedSlice(), convertForOp(), convertTransferReadToLoads(), convertTransferWriteToStores(), convertYieldOp(), mlir::Operation::emitError(), mlir::Operation::emitOpError(), getOpToConvert(), and success().

◆ createArithToAMDGPUConversionPass() [1/2]

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

Definition at line 183 of file ArithToAMDGPU.cpp.

References result.

◆ createArithToAMDGPUConversionPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createArithToAMDGPUConversionPass ( ArithToAMDGPUConversionPassOptions options)

Definition at line 187 of file ArithToAMDGPU.cpp.

References result.

◆ createArithToAPFloatConversionPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 262 of file ArithToAPFloat.cpp.

◆ createArithToArmSMEConversionPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 337 of file ArithToArmSME.cpp.

◆ createArithToLLVMConversionPass() [1/2]

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

Definition at line 428 of file ArithToLLVM.cpp.

◆ createArithToLLVMConversionPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createArithToLLVMConversionPass ( ArithToLLVMConversionPassOptions options)

Definition at line 432 of file ArithToLLVM.cpp.

◆ createAsyncFuncToAsyncRuntimePass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 85 of file AsyncToAsyncRuntime.cpp.

◆ createAsyncParallelForPass() [1/2]

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

Definition at line 185 of file AsyncParallelFor.cpp.

◆ createAsyncParallelForPass() [2/2]

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

Definition at line 189 of file AsyncParallelFor.cpp.

References b.

◆ createAsyncRuntimePolicyBasedRefCountingPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 264 of file AsyncRuntimeRefCounting.cpp.

◆ createAsyncRuntimeRefCountingOptPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 339 of file AsyncRuntimeRefCountingOpt.cpp.

◆ createAsyncRuntimeRefCountingPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 414 of file AsyncRuntimeRefCounting.cpp.

◆ createAsyncToAsyncRuntimePass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 491 of file AsyncToAsyncRuntime.cpp.

References success().

◆ createBubbleDownMemorySpaceCasts()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 99 of file BubbleDownMemorySpaceCasts.cpp.

◆ createCanonicalizerPass() [1/2]

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

Creates an instance of the Canonicalizer pass, configured with default settings (which can be overridden by pass options on the command line).

Create a Canonicalizer pass.

Definition at line 74 of file Canonicalizer.cpp.

Referenced by mlir::tosa::addTosaToLinalgPasses(), mlir::bufferization::buildBufferDeallocationPipeline(), mlir::sparse_tensor::buildSparsifier(), and defaultInlinerOptPipeline().

◆ createCanonicalizerPass() [2/2]

std::unique_ptr< Pass > mlir::createCanonicalizerPass ( const GreedyRewriteConfig & config,
ArrayRef< std::string > disabledPatterns = {},
ArrayRef< std::string > enabledPatterns = {} )

Creates an instance of the Canonicalizer pass with the specified config.

disabledPatterns is a set of labels used to filter out input patterns with a debug label or debug name in this set. enabledPatterns is a set of labels used to filter out input patterns that do not have one of the labels in this set. Debug labels must be set explicitly on patterns or when adding them with RewritePatternSet::addWithLabel. Debug names may be empty, but patterns created with RewritePattern::create have their default debug name set to their type name.

Definition at line 80 of file Canonicalizer.cpp.

References config.

◆ createCompositeFixedPointPass() [1/3]

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

Definition at line 354 of file CompositePass.cpp.

◆ createCompositeFixedPointPass() [2/3]

std::unique_ptr<::mlir::Pass > mlir::createCompositeFixedPointPass ( CompositeFixedPointPassOptions options)

Definition at line 358 of file CompositePass.cpp.

◆ createCompositeFixedPointPass() [3/3]

std::unique_ptr< Pass > mlir::createCompositeFixedPointPass ( std::string name,
llvm::function_ref< void(OpPassManager &)> populateFunc,
int maxIterations = 10 )

Create composite pass, which runs provided set of passes until fixed point or maximum number of iterations reached.

Definition at line 101 of file CompositePass.cpp.

◆ createControlFlowSinkPass()

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

Creates a pass to perform control-flow sinking.

Definition at line 56 of file ControlFlowSink.cpp.

◆ createConvertAffineForToGPUPass() [1/2]

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

Definition at line 622 of file SCFToGPUPass.cpp.

◆ createConvertAffineForToGPUPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertAffineForToGPUPass ( ConvertAffineForToGPUPassOptions options)

Definition at line 626 of file SCFToGPUPass.cpp.

◆ createConvertAMDGPUToROCDLPass() [1/2]

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

Definition at line 524 of file AMDGPUToROCDL.cpp.

References load.

◆ createConvertAMDGPUToROCDLPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertAMDGPUToROCDLPass ( ConvertAMDGPUToROCDLPassOptions options)

Definition at line 528 of file AMDGPUToROCDL.cpp.

References load.

◆ createConvertArithToEmitC()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 701 of file ArithToEmitCPass.cpp.

◆ createConvertArithToSPIRVPass() [1/2]

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

Definition at line 795 of file ArithToSPIRV.cpp.

◆ createConvertArithToSPIRVPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertArithToSPIRVPass ( ConvertArithToSPIRVPassOptions options)

◆ createConvertArmNeon2dToIntrPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 875 of file ArmNeon2dToIntr.cpp.

◆ createConvertArmSMEToLLVMPass()

std::unique_ptr< Pass > mlir::createConvertArmSMEToLLVMPass ( bool dumpTileLiveRanges = false)

Create a pass to convert from the ArmSME dialect to LLVM intrinsics.

Definition at line 1019 of file ArmSMEToLLVM.cpp.

◆ createConvertArmSMEToSCFPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1023 of file ArmSMEToSCF.cpp.

◆ createConvertAsyncToLLVMPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1101 of file AsyncToLLVM.cpp.

References result, and success().

◆ createConvertBufferizationToMemRefPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1179 of file BufferizationToMemRef.cpp.

◆ createConvertComplexToLibm()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1353 of file ComplexToLibm.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertComplexToLLVMPass() [1/2]

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

Definition at line 1274 of file ComplexToLLVM.cpp.

◆ createConvertComplexToLLVMPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertComplexToLLVMPass ( ConvertComplexToLLVMPassOptions options)

Definition at line 1278 of file ComplexToLLVM.cpp.

◆ createConvertComplexToROCDLLibraryCalls()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1428 of file ComplexToROCDLLibraryCalls.cpp.

◆ createConvertComplexToSPIRVPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1503 of file ComplexToSPIRVPass.cpp.

◆ createConvertComplexToStandardPass() [1/2]

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

Definition at line 1598 of file ComplexToStandard.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertComplexToStandardPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertComplexToStandardPass ( ConvertComplexToStandardPassOptions options)

Definition at line 1602 of file ComplexToStandard.cpp.

◆ createConvertControlFlowToLLVMPass() [1/2]

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

Definition at line 1693 of file ControlFlowToLLVM.cpp.

◆ createConvertControlFlowToLLVMPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertControlFlowToLLVMPass ( ConvertControlFlowToLLVMPassOptions options)

Definition at line 1697 of file ControlFlowToLLVM.cpp.

◆ createConvertControlFlowToSPIRVPass() [1/2]

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

Definition at line 1791 of file ControlFlowToSPIRVPass.cpp.

◆ createConvertControlFlowToSPIRVPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertControlFlowToSPIRVPass ( ConvertControlFlowToSPIRVPassOptions options)

Definition at line 1795 of file ControlFlowToSPIRVPass.cpp.

◆ createConvertElementwiseToLinalgPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 93 of file ElementwiseToLinalg.cpp.

◆ createConvertFuncToEmitC()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1870 of file FuncToEmitCPass.cpp.

◆ createConvertFuncToLLVMPass() [1/2]

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

Definition at line 1964 of file FuncToLLVM.cpp.

◆ createConvertFuncToLLVMPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertFuncToLLVMPass ( ConvertFuncToLLVMPassOptions options)

Definition at line 1968 of file FuncToLLVM.cpp.

◆ createConvertFuncToSPIRVPass() [1/2]

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

Definition at line 2062 of file FuncToSPIRVPass.cpp.

◆ createConvertFuncToSPIRVPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertFuncToSPIRVPass ( ConvertFuncToSPIRVPassOptions options)

Definition at line 2066 of file FuncToSPIRVPass.cpp.

◆ createConvertGpuOpsToLLVMSPVOps() [1/2]

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

Definition at line 2227 of file GPUToLLVMSPV.cpp.

◆ createConvertGpuOpsToLLVMSPVOps() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertGpuOpsToLLVMSPVOps ( ConvertGpuOpsToLLVMSPVOpsOptions options)

Definition at line 2231 of file GPUToLLVMSPV.cpp.

◆ createConvertGpuOpsToNVVMOps() [1/2]

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

Definition at line 2336 of file LowerGpuOpsToNVVMOps.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertGpuOpsToNVVMOps() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertGpuOpsToNVVMOps ( ConvertGpuOpsToNVVMOpsOptions options)

Definition at line 2340 of file LowerGpuOpsToNVVMOps.cpp.

◆ createConvertGpuOpsToROCDLOps() [1/2]

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

Definition at line 2451 of file LowerGpuOpsToROCDLOps.cpp.

◆ createConvertGpuOpsToROCDLOps() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertGpuOpsToROCDLOps ( ConvertGpuOpsToROCDLOpsOptions options)

Definition at line 2455 of file LowerGpuOpsToROCDLOps.cpp.

◆ createConvertGPUToSPIRVPass()

std::unique_ptr< OperationPass< ModuleOp > > mlir::createConvertGPUToSPIRVPass ( bool mapMemorySpace = true)

Creates a pass to convert GPU kernel ops to corresponding SPIR-V ops.

For a gpu.func to be converted, it should have a spirv.entry_point_abi attribute. If mapMemorySpace is true, performs MemRef memory space to SPIR-V mapping according to default Vulkan rules first.

Definition at line 190 of file GPUToSPIRVPass.cpp.

◆ createConvertIndexToLLVMPass() [1/2]

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

Definition at line 2546 of file IndexToLLVM.cpp.

◆ createConvertIndexToLLVMPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertIndexToLLVMPass ( ConvertIndexToLLVMPassOptions options)

Definition at line 2550 of file IndexToLLVM.cpp.

◆ createConvertIndexToSPIRVPass() [1/2]

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

Definition at line 2641 of file IndexToSPIRV.cpp.

◆ createConvertIndexToSPIRVPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertIndexToSPIRVPass ( ConvertIndexToSPIRVPassOptions options)

Definition at line 2645 of file IndexToSPIRV.cpp.

◆ createConvertLinalgToAffineLoopsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 170 of file Loops.cpp.

◆ createConvertLinalgToLoopsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 247 of file Loops.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertLinalgToParallelLoopsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 325 of file Loops.cpp.

◆ createConvertLinalgToStandardPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 2721 of file LinalgToStandard.cpp.

◆ createConvertMathToEmitC() [1/2]

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

Definition at line 2815 of file MathToEmitCPass.cpp.

◆ createConvertMathToEmitC() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertMathToEmitC ( ConvertMathToEmitCOptions options)

Definition at line 2819 of file MathToEmitCPass.cpp.

◆ createConvertMathToFuncs() [1/2]

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

Definition at line 2918 of file MathToFuncs.cpp.

◆ createConvertMathToFuncs() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertMathToFuncs ( ConvertMathToFuncsOptions options)

Definition at line 2922 of file MathToFuncs.cpp.

◆ createConvertMathToLibmPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 3094 of file MathToLibm.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertMathToLLVMPass() [1/2]

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

Definition at line 3013 of file MathToLLVM.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertMathToLLVMPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertMathToLLVMPass ( ConvertMathToLLVMPassOptions options)

Definition at line 3017 of file MathToLLVM.cpp.

◆ createConvertMathToROCDL() [1/2]

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

Definition at line 3188 of file MathToROCDL.cpp.

◆ createConvertMathToROCDL() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertMathToROCDL ( ConvertMathToROCDLOptions options)

Definition at line 3192 of file MathToROCDL.cpp.

◆ createConvertMathToSPIRVPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 3267 of file MathToSPIRVPass.cpp.

◆ createConvertMathToXeVM() [1/2]

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

Definition at line 3360 of file MathToXeVM.cpp.

◆ createConvertMathToXeVM() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertMathToXeVM ( ConvertMathToXeVMOptions options)

Definition at line 3364 of file MathToXeVM.cpp.

◆ createConvertMemRefToEmitC() [1/2]

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

Definition at line 3455 of file MemRefToEmitCPass.cpp.

◆ createConvertMemRefToEmitC() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertMemRefToEmitC ( ConvertMemRefToEmitCOptions options)

Definition at line 3459 of file MemRefToEmitCPass.cpp.

◆ createConvertMemRefToSPIRVPass() [1/2]

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

Definition at line 3553 of file MemRefToSPIRVPass.cpp.

◆ createConvertMemRefToSPIRVPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertMemRefToSPIRVPass ( ConvertMemRefToSPIRVPassOptions options)

Definition at line 3557 of file MemRefToSPIRVPass.cpp.

◆ createConvertNVGPUToNVVMPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 3635 of file NVGPUToNVVM.cpp.

◆ createConvertNVVMToLLVMPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 3710 of file NVVMToLLVM.cpp.

◆ createConvertOpenACCToSCFPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 3786 of file OpenACCToSCF.cpp.

◆ createConvertOpenMPToLLVMPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 3861 of file OpenMPToLLVM.cpp.

◆ createConvertParallelLoopToGpuPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 4012 of file SCFToGPUPass.cpp.

◆ createConvertPDLToPDLInterpPass() [1/2]

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 3936 of file PDLToPDLInterp.cpp.

◆ createConvertPDLToPDLInterpPass() [2/2]

std::unique_ptr< OperationPass< ModuleOp > > mlir::createConvertPDLToPDLInterpPass ( DenseMap< Operation *, PDLPatternConfigSet * > & configMap)

Creates and returns a pass to convert PDL ops to PDL interpreter ops.

configMap holds a map of the configurations for each pattern being compiled.

Definition at line 1025 of file PDLToPDLInterp.cpp.

◆ createConvertSCFToOpenMPPass() [1/2]

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

Definition at line 4105 of file SCFToOpenMP.cpp.

◆ createConvertSCFToOpenMPPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertSCFToOpenMPPass ( ConvertSCFToOpenMPPassOptions options)

Definition at line 4109 of file SCFToOpenMP.cpp.

◆ createConvertSCFToSPIRVPass()

std::unique_ptr< OperationPass<> > mlir::createConvertSCFToSPIRVPass ( )

Creates a pass to convert SCF ops into SPIR-V ops.

◆ createConvertShapeConstraintsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 4286 of file ConvertShapeConstraints.cpp.

◆ createConvertShapeToStandardPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 4361 of file ShapeToStandard.cpp.

◆ createConvertShardToMPIPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 4441 of file ShardToMPI.cpp.

◆ createConvertSPIRVToLLVMPass() [1/2]

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

Definition at line 4206 of file SPIRVToLLVMPass.cpp.

◆ createConvertSPIRVToLLVMPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertSPIRVToLLVMPass ( ConvertSPIRVToLLVMPassOptions options)

Definition at line 4210 of file SPIRVToLLVMPass.cpp.

◆ createConvertTensorToLinalgPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 4517 of file TensorToLinalgPass.cpp.

◆ createConvertTensorToSPIRVPass() [1/2]

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

Definition at line 4611 of file TensorToSPIRVPass.cpp.

◆ createConvertTensorToSPIRVPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertTensorToSPIRVPass ( ConvertTensorToSPIRVPassOptions options)

Definition at line 4615 of file TensorToSPIRVPass.cpp.

◆ createConvertToEmitC() [1/2]

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

Definition at line 4706 of file ConvertToEmitCPass.cpp.

◆ createConvertToEmitC() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertToEmitC ( ConvertToEmitCOptions options)

Definition at line 4710 of file ConvertToEmitCPass.cpp.

◆ createConvertToLLVMPass() [1/2]

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

Definition at line 4807 of file ConvertToLLVMPass.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertToLLVMPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertToLLVMPass ( ConvertToLLVMPassOptions options)

Definition at line 4811 of file ConvertToLLVMPass.cpp.

◆ createConvertVectorToAMX()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 4891 of file VectorToAMX.cpp.

◆ createConvertVectorToArmSMEPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 4967 of file VectorToArmSMEPass.cpp.

◆ createConvertVectorToGPUPass()

std::unique_ptr< Pass > mlir::createConvertVectorToGPUPass ( bool useNvGpu = false)

Convert from vector to GPU ops.

Definition at line 1343 of file VectorToGPU.cpp.

◆ createConvertVectorToLLVMPass() [1/2]

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

Definition at line 5179 of file ConvertVectorToLLVMPass.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertVectorToLLVMPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createConvertVectorToLLVMPass ( ConvertVectorToLLVMPassOptions options)

Definition at line 5183 of file ConvertVectorToLLVMPass.cpp.

◆ createConvertVectorToSCFPass()

std::unique_ptr< Pass > mlir::createConvertVectorToSCFPass ( const VectorTransferToSCFOptions & options = VectorTransferToSCFOptions())

Create a pass to convert a subset of vector ops to SCF.

Definition at line 1758 of file VectorToSCF.cpp.

References options.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createConvertVectorToSPIRVPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 5340 of file VectorToSPIRVPass.cpp.

◆ createConvertVectorToXeGPU()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 5418 of file VectorToXeGPU.cpp.

◆ createConvertXeGPUToXeVMPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 5500 of file XeGPUToXeVM.cpp.

◆ createConvertXeVMToLLVMPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 5575 of file XeVMToLLVM.cpp.

◆ createCSEPass()

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

Creates a pass to perform common sub expression elimination.

Definition at line 412 of file CSE.cpp.

Referenced by mlir::bufferization::buildBufferDeallocationPipeline().

◆ createElementwiseOp()

bool mlir::createElementwiseOp ( ConversionPatternRewriter & builder,
gpu::SubgroupMmaElementwiseOp op,
Type coopType,
ValueRange operands )
static

Creates a SPIR-V op to replace the given GPU subgroup mma elementwise op when the elementwise op directly supports with cooperative matrix type.

Returns false if cannot.

See SPV_KHR_cooperative_matrix for supported elementwise ops.

Definition at line 40 of file WmmaOpsToSPIRV.cpp.

◆ createFinalizeMemRefToLLVMConversionPass() [1/2]

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

Definition at line 5672 of file MemRefToLLVM.cpp.

◆ createFinalizeMemRefToLLVMConversionPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createFinalizeMemRefToLLVMConversionPass ( FinalizeMemRefToLLVMConversionPassOptions options)

Definition at line 5676 of file MemRefToLLVM.cpp.

◆ createForallToForLoopPass()

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

Creates a pass that converts SCF forall loops to SCF for loops.

Definition at line 71 of file ForallToFor.cpp.

◆ createForallToParallelLoopPass()

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

Creates a pass that converts SCF forall loops to SCF parallel loops.

Definition at line 81 of file ForallToParallel.cpp.

◆ createForLoopPeelingPass()

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

Creates a pass that peels for loops at their upper bounds for better vectorization.

Definition at line 364 of file LoopSpecialization.cpp.

◆ createForLoopRangeFoldingPass()

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

Creates a pass which folds arith ops on induction variable into loop range.

Definition at line 91 of file LoopRangeFolding.cpp.

◆ createForLoopSpecializationPass()

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

Creates a pass that specializes for loop for unrolling and vectorization.

Definition at line 360 of file LoopSpecialization.cpp.

◆ createForToWhileLoopPass()

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

Definition at line 123 of file ForToWhile.cpp.

◆ createGenerateRuntimeVerificationPass()

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

Creates a pass that generates IR to verify ops at runtime.

Definition at line 103 of file GenerateRuntimeVerification.cpp.

◆ createGpuAsyncRegionPass()

◆ createGpuDecomposeMemrefsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 166 of file DecomposeMemRefs.cpp.

◆ createGpuEliminateBarriers()

◆ createGpuKernelOutliningPass() [1/2]

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

Definition at line 335 of file KernelOutlining.cpp.

References parseAttribute().

◆ createGpuKernelOutliningPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createGpuKernelOutliningPass ( GpuKernelOutliningPassOptions options)

Definition at line 339 of file KernelOutlining.cpp.

◆ createGpuLaunchSinkIndexComputationsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 414 of file KernelOutlining.cpp.

◆ createGpuMapParallelLoopsPass() [1/2]

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

Definition at line 505 of file ParallelLoopMapper.cpp.

◆ createGpuMapParallelLoopsPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createGpuMapParallelLoopsPass ( GpuMapParallelLoopsPassOptions options)

Definition at line 509 of file ParallelLoopMapper.cpp.

◆ createGpuModuleToBinaryPass() [1/2]

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

Definition at line 612 of file ModuleToBinary.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createGpuModuleToBinaryPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createGpuModuleToBinaryPass ( GpuModuleToBinaryPassOptions options)

Definition at line 616 of file ModuleToBinary.cpp.

◆ createGpuNVVMAttachTarget() [1/2]

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

Definition at line 731 of file NVVMAttachTarget.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createGpuNVVMAttachTarget() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createGpuNVVMAttachTarget ( GpuNVVMAttachTargetOptions options)

Definition at line 735 of file NVVMAttachTarget.cpp.

◆ createGpuROCDLAttachTarget() [1/2]

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

Definition at line 862 of file ROCDLAttachTarget.cpp.

◆ createGpuROCDLAttachTarget() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createGpuROCDLAttachTarget ( GpuROCDLAttachTargetOptions options)

Definition at line 866 of file ROCDLAttachTarget.cpp.

◆ createGpuSPIRVAttachTarget() [1/2]

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

Definition at line 978 of file SPIRVAttachTarget.cpp.

◆ createGpuSPIRVAttachTarget() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createGpuSPIRVAttachTarget ( GpuSPIRVAttachTargetOptions options)

Definition at line 982 of file SPIRVAttachTarget.cpp.

◆ createGpuToLLVMConversionPass() [1/2]

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

Definition at line 5774 of file GPUToLLVMConversion.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createGpuToLLVMConversionPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createGpuToLLVMConversionPass ( GpuToLLVMConversionPassOptions options)

Definition at line 5778 of file GPUToLLVMConversion.cpp.

◆ createGpuXeVMAttachTarget() [1/2]

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

Definition at line 1088 of file XeVMAttachTarget.cpp.

◆ createGpuXeVMAttachTarget() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createGpuXeVMAttachTarget ( GpuXeVMAttachTargetOptions options)

Definition at line 1092 of file XeVMAttachTarget.cpp.

◆ createInlinerPass() [1/3]

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

Creates a pass which inlines calls and callable operations as defined by the CallGraph.

Definition at line 186 of file InlinerPass.cpp.

◆ createInlinerPass() [2/3]

std::unique_ptr< Pass > mlir::createInlinerPass ( llvm::StringMap< OpPassManager > opPipelines)

Creates an instance of the inliner pass, and use the provided pass managers when optimizing callable operations with names matching the key type.

Callable operations with a name not within the provided map will use the default inliner pipeline during optimization.

Definition at line 190 of file InlinerPass.cpp.

References defaultInlinerOptPipeline().

◆ createInlinerPass() [3/3]

std::unique_ptr< Pass > mlir::createInlinerPass ( llvm::StringMap< OpPassManager > opPipelines,
std::function< void(OpPassManager &)> defaultPipelineBuilder )

Creates an instance of the inliner pass, and use the provided pass managers when optimizing callable operations with names matching the key type.

Callable operations with a name not within the provided map will use the provided default pipeline builder.

Definition at line 194 of file InlinerPass.cpp.

◆ createLiftControlFlowToSCFPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 5856 of file ControlFlowToSCF.cpp.

◆ createLinalgBlockPackMatmul() [1/2]

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

Definition at line 438 of file BlockPackMatmul.cpp.

◆ createLinalgBlockPackMatmul() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createLinalgBlockPackMatmul ( LinalgBlockPackMatmulOptions options)

Definition at line 442 of file BlockPackMatmul.cpp.

◆ createLinalgDetensorizePass() [1/2]

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

Definition at line 533 of file Detensorize.cpp.

◆ createLinalgDetensorizePass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createLinalgDetensorizePass ( LinalgDetensorizePassOptions options)

Definition at line 537 of file Detensorize.cpp.

◆ createLinalgElementwiseOpFusionPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 614 of file ElementwiseOpFusion.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createLinalgFoldIntoElementwisePass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 689 of file FoldIntoElementwise.cpp.

◆ createLinalgFoldUnitExtentDimsPass() [1/2]

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

Definition at line 782 of file DropUnitDims.cpp.

◆ createLinalgFoldUnitExtentDimsPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createLinalgFoldUnitExtentDimsPass ( LinalgFoldUnitExtentDimsPassOptions options)

Definition at line 786 of file DropUnitDims.cpp.

◆ createLinalgGeneralizeNamedOpsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 861 of file Generalization.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createLinalgInlineScalarOperandsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 936 of file InlineScalarOperands.cpp.

◆ createLinalgMorphOpsPass() [1/2]

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

Definition at line 1036 of file MorphOps.cpp.

◆ createLinalgMorphOpsPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createLinalgMorphOpsPass ( LinalgMorphOpsPassOptions options)

Definition at line 1040 of file MorphOps.cpp.

◆ createLinalgSpecializeGenericOpsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1115 of file Specialize.cpp.

◆ createLocationSnapshot() [1/2]

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

Definition at line 674 of file LocationSnapshot.cpp.

◆ createLocationSnapshot() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createLocationSnapshot ( LocationSnapshotOptions options)

Definition at line 678 of file LocationSnapshot.cpp.

◆ createLoopInvariantCodeMotionPass()

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

Creates a loop invariant code motion pass that hoists loop invariant instructions out of the loop.

Definition at line 59 of file LoopInvariantCodeMotion.cpp.

Referenced by mlir::sparse_tensor::SparsificationAndBufferizationPass::runOnOperation().

◆ createLoopInvariantSubsetHoistingPass()

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

Creates a pass that hoists loop-invariant subset ops.

Definition at line 63 of file LoopInvariantCodeMotion.cpp.

◆ createLowerAffinePass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 5934 of file AffineToStandard.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createLowerForeachToSCFPass()

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

◆ createLowerHostCodeToLLVMPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 6009 of file ConvertLaunchFuncToLLVMCalls.cpp.

◆ createLowerSparseIterationToSCFPass()

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

◆ createLowerSparseOpsToForeachPass() [1/2]

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

◆ createLowerSparseOpsToForeachPass() [2/2]

std::unique_ptr< Pass > mlir::createLowerSparseOpsToForeachPass ( bool enableRT,
bool enableConvert )

Definition at line 472 of file SparseTensorPasses.cpp.

◆ createMapMemRefStorageClassPass()

std::unique_ptr< OperationPass<> > mlir::createMapMemRefStorageClassPass ( )

Creates a pass to map numeric MemRef memory spaces to symbolic SPIR-V storage classes.

The mapping is read from the command-line option.

Definition at line 327 of file MapMemRefStorageClassPass.cpp.

◆ createMem2Reg() [1/2]

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

Definition at line 895 of file Mem2Reg.cpp.

◆ createMem2Reg() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createMem2Reg ( Mem2RegOptions options)

Definition at line 899 of file Mem2Reg.cpp.

◆ createOptReductionPass() [1/2]

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

Definition at line 102 of file OptReductionPass.cpp.

◆ createOptReductionPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createOptReductionPass ( OptReductionPassOptions options)

Definition at line 106 of file OptReductionPass.cpp.

◆ createOutlineShapeComputationPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 81 of file OutlineShapeComputation.cpp.

References b.

◆ createOutputStrategy()

std::unique_ptr< OutputStrategy > mlir::createOutputStrategy ( DefaultTimingManager::OutputFormat fmt,
raw_ostream & os )

Create an output strategy for the specified format, to be passed to DefaultTimingManager::setOutput().

Definition at line 626 of file Timing.cpp.

Referenced by applyDefaultTimingManagerCLOptions().

◆ createParallelForToNestedForsPass()

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

Creates a pass that converts SCF forall loops to SCF parallel loops.

Definition at line 83 of file ParallelForToNestedFors.cpp.

◆ createParallelLoopFusionPass()

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

Creates a loop fusion pass which fuses parallel loops.

Definition at line 286 of file ParallelLoopFusion.cpp.

◆ createParallelLoopSpecializationPass()

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

Creates a pass that specializes parallel loop for unrolling and vectorization.

Definition at line 356 of file LoopSpecialization.cpp.

◆ createParallelLoopTilingPass()

std::unique_ptr< Pass > mlir::createParallelLoopTilingPass ( llvm::ArrayRef< int64_t > tileSize = {},
bool noMinMaxBounds = false )

Creates a pass which tiles innermost parallel loops.

If noMinMaxBounds, the upper bound of the inner loop will be a same value among different outter loop iterations, and an additional inbound check will be emitted inside the internal loops.

◆ createPreSparsificationRewritePass()

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

◆ createPrintIRPass()

std::unique_ptr< Pass > mlir::createPrintIRPass ( const PrintIRPassOptions & options = {})

Creates a pass to print IR on the debug stream.

Definition at line 34 of file PrintIR.cpp.

References options.

◆ createPrintOpGraphPass()

std::unique_ptr< Pass > mlir::createPrintOpGraphPass ( raw_ostream & os = llvm::errs())

Creates a pass to print op graphs.

Definition at line 462 of file ViewOpGraph.cpp.

◆ createPrintOpStatsPass() [1/2]

std::unique_ptr< Pass > mlir::createPrintOpStatsPass ( raw_ostream & os,
bool printAsJSON )

Creates a pass which prints the list of ops and the number of occurrences in the module with the output format option.

Definition at line 118 of file OpStats.cpp.

◆ createPrintOpStatsPass() [2/2]

std::unique_ptr< Pass > mlir::createPrintOpStatsPass ( raw_ostream & os = llvm::errs())

Creates a pass which prints the list of ops and the number of occurrences in the module.

Definition at line 114 of file OpStats.cpp.

◆ createReconcileUnrealizedCastsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 6153 of file ReconcileUnrealizedCasts.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createReductionTreePass() [1/2]

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

Definition at line 203 of file ReductionTreePass.cpp.

◆ createReductionTreePass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createReductionTreePass ( ReductionTreePassOptions options)

Definition at line 207 of file ReductionTreePass.cpp.

◆ createRemoveDeadValuesPass()

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

Creates an optimization pass to remove dead values.

Definition at line 916 of file RemoveDeadValues.cpp.

◆ createRemoveShapeConstraintsPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 156 of file RemoveShapeConstraints.cpp.

◆ createScalarOrSplatConstant() [1/3]

Value mlir::createScalarOrSplatConstant ( OpBuilder & builder,
Location loc,
Type type,
const APFloat & value )

◆ createScalarOrSplatConstant() [2/3]

Value mlir::createScalarOrSplatConstant ( OpBuilder & builder,
Location loc,
Type type,
const APInt & value )

Create a constant of type type at location loc whose value is value (an APInt or APFloat whose type must match the element type of type).

If type is a shaped type, create a splat constant of the given value. Constants are folded if possible.

Definition at line 270 of file Utils.cpp.

References mlir::DenseElementsAttr::get(), and mlir::Builder::getIntegerAttr().

Referenced by clampInput(), and createScalarOrSplatConstant().

◆ createScalarOrSplatConstant() [3/3]

Value mlir::createScalarOrSplatConstant ( OpBuilder & builder,
Location loc,
Type type,
int64_t value )

Definition at line 283 of file Utils.cpp.

References createScalarOrSplatConstant().

◆ createSCCPPass()

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

Creates a pass which performs sparse conditional constant propagation over nested operations.

Definition at line 133 of file SCCP.cpp.

◆ createSCFForLoopCanonicalizationPass()

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

Creates a pass that canonicalizes affine.min and affine.max operations inside of scf.for loops with known lower and upper bounds.

Definition at line 187 of file LoopCanonicalization.cpp.

◆ createSCFToControlFlowPass() [1/2]

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

Definition at line 6244 of file SCFToControlFlow.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createSCFToControlFlowPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createSCFToControlFlowPass ( SCFToControlFlowPassOptions options)

Definition at line 6248 of file SCFToControlFlow.cpp.

◆ createSCFToEmitC()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 6323 of file SCFToEmitC.cpp.

◆ createSCFToSPIRV()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 6398 of file SCFToSPIRVPass.cpp.

◆ createSetLLVMModuleDataLayoutPass() [1/2]

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

Definition at line 6489 of file FuncToLLVM.cpp.

◆ createSetLLVMModuleDataLayoutPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createSetLLVMModuleDataLayoutPass ( SetLLVMModuleDataLayoutPassOptions options)

Definition at line 6493 of file FuncToLLVM.cpp.

◆ createShapeToShapeLoweringPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 231 of file ShapeToShapeLowering.cpp.

◆ createSimplifyDepthwiseConvPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 1191 of file SimplifyDepthwiseConv.cpp.

◆ createSparseAssembler() [1/2]

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

Definition at line 427 of file SparseTensorPasses.cpp.

◆ createSparseAssembler() [2/2]

std::unique_ptr< Pass > mlir::createSparseAssembler ( bool directOut)

◆ createSparseBufferRewritePass() [1/2]

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

◆ createSparseBufferRewritePass() [2/2]

std::unique_ptr< Pass > mlir::createSparseBufferRewritePass ( bool enableBufferInitialization)

Definition at line 504 of file SparseTensorPasses.cpp.

◆ createSparseGPUCodegenPass() [1/2]

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

◆ createSparseGPUCodegenPass() [2/2]

std::unique_ptr< Pass > mlir::createSparseGPUCodegenPass ( unsigned numThreads,
bool enableRT )

Definition at line 524 of file SparseTensorPasses.cpp.

◆ createSparseReinterpretMapPass() [1/3]

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

◆ createSparseReinterpretMapPass() [2/3]

std::unique_ptr< Pass > mlir::createSparseReinterpretMapPass ( ReinterpretMapScope scope)

Definition at line 436 of file SparseTensorPasses.cpp.

References options.

◆ createSparseReinterpretMapPass() [3/3]

std::unique_ptr< Pass > mlir::createSparseReinterpretMapPass ( ReinterpretMapScope scope,
sparse_tensor::LoopOrderingStrategy strategy )

Definition at line 442 of file SparseTensorPasses.cpp.

References options.

◆ createSparseSpaceCollapsePass()

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

◆ createSparseTensorCodegenPass() [1/2]

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

◆ createSparseTensorCodegenPass() [2/2]

std::unique_ptr< Pass > mlir::createSparseTensorCodegenPass ( bool createSparseDeallocs,
bool enableBufferInitialization )

Definition at line 493 of file SparseTensorPasses.cpp.

◆ createSparseTensorConversionPass()

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

◆ createSparseVectorizationPass() [1/2]

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

◆ createSparseVectorizationPass() [2/2]

std::unique_ptr< Pass > mlir::createSparseVectorizationPass ( unsigned vectorLength,
bool enableVLAVectorization,
bool enableSIMDIndex32 )

Definition at line 513 of file SparseTensorPasses.cpp.

◆ createSparsificationAndBufferizationPass() [1/2]

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

◆ createSparsificationAndBufferizationPass() [2/2]

std::unique_ptr< mlir::Pass > mlir::createSparsificationAndBufferizationPass ( const bufferization::OneShotBufferizationOptions & bufferizationOptions,
const SparsificationOptions & sparsificationOptions,
bool createSparseDeallocs,
bool enableRuntimeLibrary,
bool enableBufferInitialization,
unsigned vectorLength,
bool enableVLAVectorization,
bool enableSIMDIndex32,
bool enableGPULibgen,
SparseEmitStrategy emitStrategy,
SparseParallelizationStrategy parallelizationStrategy )

Definition at line 252 of file SparsificationAndBufferizationPass.cpp.

◆ createSparsificationPass() [1/2]

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

◆ createSparsificationPass() [2/2]

std::unique_ptr< Pass > mlir::createSparsificationPass ( const SparsificationOptions & options)

Definition at line 459 of file SparseTensorPasses.cpp.

References options.

◆ createSROA()

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

Definition at line 1239 of file SROA.cpp.

◆ createStageSparseOperationsPass()

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

◆ createStorageSpecifierToLLVMPass()

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

Definition at line 529 of file SparseTensorPasses.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createStripDebugInfoPass()

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

Creates a pass to strip debug information from a function.

Definition at line 45 of file StripDebugInfo.cpp.

Referenced by mlir::sparse_tensor::buildSparsifier().

◆ createSymbolDCEPass()

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

Creates a pass which delete symbol operations that are unreachable.

This pass may only be scheduled on an operation that defines a SymbolTable.

Definition at line 190 of file SymbolDCE.cpp.

◆ createSymbolPrivatizePass()

std::unique_ptr< Pass > mlir::createSymbolPrivatizePass ( ArrayRef< std::string > excludeSymbols = {})

Creates a pass which marks top-level symbol operations as private unless listed in excludeSymbols.

Definition at line 61 of file SymbolPrivatize.cpp.

◆ createTestSCFParallelLoopCollapsingPass()

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

Creates a pass that transforms a single ParallelLoop over N induction variables into another ParallelLoop over less than N induction variables.

Definition at line 107 of file ParallelLoopCollapsing.cpp.

◆ createTopologicalSortPass()

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

Creates a pass that recursively sorts nested regions without SSA dominance topologically such that, as much as possible, users of values appear after their producers.

Definition at line 38 of file TopologicalSort.cpp.

◆ createTosaToArithPass() [1/2]

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

Definition at line 6587 of file TosaToArithPass.cpp.

◆ createTosaToArithPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createTosaToArithPass ( TosaToArithPassOptions options)

Definition at line 6591 of file TosaToArithPass.cpp.

◆ createTosaToMLProgram()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 6807 of file TosaToMLProgramPass.cpp.

◆ createTosaToSCFPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 6882 of file TosaToSCFPass.cpp.

Referenced by mlir::tosa::addTosaToSCFPasses().

◆ createTosaToTensorPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 6957 of file TosaToTensorPass.cpp.

◆ createUBToLLVMConversionPass() [1/2]

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

Definition at line 7048 of file UBToLLVM.cpp.

◆ createUBToLLVMConversionPass() [2/2]

std::unique_ptr<::mlir::Pass > mlir::createUBToLLVMConversionPass ( UBToLLVMConversionPassOptions options)

Definition at line 7052 of file UBToLLVM.cpp.

◆ createUBToSPIRVConversionPass()

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

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 7127 of file UBToSPIRV.cpp.

◆ debugString()

template<typename T>
std::string mlir::debugString ( T && op)
static

◆ decomposeMixedValues()

std::pair< SmallVector< int64_t >, SmallVector< Value > > mlir::decomposeMixedValues ( ArrayRef< OpFoldResult > mixedValues)

Decompose a vector of mixed static or dynamic values into the corresponding pair of arrays.

This is the inverse function of getMixedValues.

Definition at line 226 of file StaticValueUtils.cpp.

Referenced by foldExtractFromBroadcast(), and getExpandedShapeAndType().

◆ delinearize() [1/3]

SmallVector< AffineExpr > mlir::delinearize ( AffineExpr linearIndex,
ArrayRef< AffineExpr > strides )

Given the strides together with a linear index in the dimension space, return the vector-space offsets in each dimension for a de-linearized index.

Let li = linearIndex, assuming strides are [s0, .. sn], return the vector of AffineExpr [li % s0, (li / s0) % s1, ..., (li / s0 / .. / sn-1) % sn]

It is the caller's responsibility to pass proper AffineExpr kind that result in valid AffineExpr (i.e. cannot multiply 2 AffineDimExpr or divide by an AffineDimExpr).

strides elements are expected to bind to non-negative values.

Definition at line 169 of file IndexingUtils.cpp.

References delinearizeImpl(), and mlir::AffineExpr::floorDiv().

◆ delinearize() [2/3]

SmallVector< AffineExpr > mlir::delinearize ( AffineExpr linearIndex,
ArrayRef< int64_t > strides )

◆ delinearize() [3/3]

SmallVector< int64_t > mlir::delinearize ( int64_t linearIndex,
ArrayRef< int64_t > strides )

Given the strides together with a linear index in the dimension space, return the vector-space offsets in each dimension for a de-linearized index.

strides elements are asserted to be non-negative.

Let li = linearIndex, assuming strides are [s0, .. sn], return the vector of int64_t [li % s0, (li / s0) % s1, ..., (li / s0 / .. / sn-1) % sn]

Definition at line 97 of file IndexingUtils.cpp.

References delinearizeImpl().

Referenced by commonLinearIdBuilderFn(), createParallelComputeFunction(), delinearize(), foldExtractFromShapeCast(), foreachIndividualVectorElement(), mlir::detail::TileOffsetRangeImpl::getDynamicTileOffsets(), mlir::detail::TileOffsetRangeImpl::getStaticTileOffsets(), handleMultidimensionalVectors(), laneIdBuilderFn(), ToElementsOfBroadcast::matchAndRewrite(), mlir::memref::resolveSourceIndicesCollapseShape(), mlir::linalg::rewriteInIm2Col(), mlir::linalg::rewriteInIm2Col(), and mlir::linalg::rewriteInIm2Col().

◆ denormalizeInductionVariable()

void mlir::denormalizeInductionVariable ( RewriterBase & rewriter,
Location loc,
Value normalizedIv,
OpFoldResult origLb,
OpFoldResult origStep )

◆ dispatchIndexOpFoldResult()

void mlir::dispatchIndexOpFoldResult ( OpFoldResult ofr,
SmallVectorImpl< Value > & dynamicVec,
SmallVectorImpl< int64_t > & staticVec )

Helper function to dispatch an OpFoldResult into staticVec if: a) it is an IntegerAttr In other cases, the OpFoldResult is dispached to the dynamicVec.

In such dynamic cases, ShapedType::kDynamic is also pushed to staticVec. This is useful to extract mixed static and dynamic entries that come from an AttrSizedOperandSegments trait.

In such dynamic cases, a copy of the sentinel value is also pushed to staticVec. This is useful to extract mixed static and dynamic entries that come from an AttrSizedOperandSegments trait.

Definition at line 45 of file StaticValueUtils.cpp.

Referenced by dispatchIndexOpFoldResults().

◆ dispatchIndexOpFoldResults()

void mlir::dispatchIndexOpFoldResults ( ArrayRef< OpFoldResult > ofrs,
SmallVectorImpl< Value > & dynamicVec,
SmallVectorImpl< int64_t > & staticVec )

Helper function to dispatch multiple OpFoldResults according to the behavior of dispatchIndexOpFoldResult(OpFoldResult ofr for a single OpFoldResult.

Definition at line 72 of file StaticValueUtils.cpp.

References dispatchIndexOpFoldResult().

Referenced by mlir::tensor::bubbleUpPadSlice(), mlir::linalg::getStaticTilesImpl(), and inferCastResultType().

◆ dropDims()

SmallVector< int64_t > mlir::dropDims ( ArrayRef< int64_t > inputPerm,
ArrayRef< int64_t > dropPositions )

Returns a permutation vector that drop the input dims in dropPositions from inputPerm.

For example, inputPerm = {2, 4, 0, 1, 3} and dropPositions= {1, 2} would result in a {2, 0, 1} permutation vector.

Definition at line 237 of file IndexingUtils.cpp.

Referenced by mlir::tensor::dropGivenUnitDims(), and SwapTransposeWithBroadcast::matchAndRewrite().

◆ eliminateCommonSubExpressions()

void mlir::eliminateCommonSubExpressions ( RewriterBase & rewriter,
DominanceInfo & domInfo,
Operation * op,
bool * changed = nullptr )

Eliminate common subexpressions within the given operation.

This transform looks for and deduplicates equivalent operations.

changed indicates whether the IR was modified or not.

Definition at line 378 of file CSE.cpp.

References changed.

◆ emitDefiniteFailure() [1/2]

DiagnosedDefiniteFailure mlir::emitDefiniteFailure ( Location loc,
const Twine & message )
inline

Emits a definite failure with the given message.

The returned object allows for last-minute modification to the error message, such as attaching notes and completing the message. It will be reported when the object is destructed or converted.

Definition at line 243 of file DiagnosedSilenceableFailure.h.

Referenced by mlir::transform::AtMostOneOpMatcherOpTrait< OpTy >::apply(), mlir::transform::SingleOpMatcherOpTrait< OpTy >::apply(), mlir::transform::SingleValueMatcherOpTrait< OpTy >::apply(), mlir::transform::TransformState::applyTransform(), definiteFailureHelper(), and matchBlock().

◆ emitDefiniteFailure() [2/2]

DiagnosedDefiniteFailure mlir::emitDefiniteFailure ( Operation * op,
const Twine & message = {} )
inline

Definition at line 247 of file DiagnosedSilenceableFailure.h.

◆ emitError() [1/2]

InFlightDiagnostic mlir::emitError ( Location loc)

Utility method to emit an error message using this location.

Emit an error message using this location.

Definition at line 332 of file Diagnostics.cpp.

References emitError().

Referenced by applyPassManagerCLOptions(), mlir::ROCDL::SerializeGPUModuleBase::assembleIsa(), mlir::spirv::attributeName< ImageFormat >(), mlir::spirv::attributeName< ImageSamplingInfo >(), mlir::affine::boundCheckLoadOrStoreOp(), buildAvgPool2dOpWithQuantInfo(), buildNegateOpWithQuantInfo(), buildSequentialConstant(), buildVariableOp(), mlir::transform::detail::checkApplyToOne(), checkDeclareOperands(), mlir::transform::detail::checkNestedConsumption(), checkTensorElementType(), cleanupPrivateVars(), mlir::xevm::SerializeGPUModuleBase::compileToBinary(), mlir::detail::constructContainerOpForParserIfNecessary(), mlir::LLVM::ModuleImport::convertAliases(), convertCallLLVMIntrinsicOp(), mlir::LLVM::ModuleImport::convertDataLayout(), convertDenseArrayFromAttr(), convertDenseArrayFromAttr(), convertDenseResourceElementsAttr(), convertFromAttribute(), convertFromAttribute(), convertFromAttribute(), convertFromAttribute(), convertFromAttribute(), convertFromAttribute(), convertFromAttribute(), convertFromAttribute(), convertFromAttribute(), convertFromAttribute(), mlir::LLVM::ModuleImport::convertGlobals(), mlir::LLVM::ModuleImport::convertIFuncs(), convertMLIRAttributesToLLVM(), convertMLIRAttributeToLLVM(), convertParameterAttr(), mlir::LLVM::ModuleImport::convertValue(), cpAsyncBulkTensorCommonVerifier(), mlir::spirv::Deserializer::createGraphBlock(), mlir::ControlFlowToSCFTransformation::createUnreachableTerminator(), deserializeCacheControlDecoration(), deserializeModule(), mlir::spirv::Deserializer::processOp< spirv::CopyMemoryOp >(), mlir::spirv::Deserializer::processOp< spirv::EntryPointOp >(), mlir::spirv::Deserializer::processOp< spirv::ExecutionModeOp >(), mlir::spirv::Deserializer::processOp< spirv::FunctionCallOp >(), mlir::spirv::Deserializer::processOp< spirv::GenericCastToPtrExplicitOp >(), mlir::detail::Parser::emitError(), emitError(), mlir::ImplicitLocOpBuilder::emitError(), mlir::Operation::emitError(), mlir::acc::OpenACCSupport::emitNYI(), emitOptionalError(), mlir::transform::detail::expandPathsToMLIRFiles(), mlir::quant::fakeQuantAttrsToType(), mlir::quant::fakeQuantAttrsToType(), fillStructuredOpRegion(), mlir::detail::PassCrashReproducerGenerator::finalize(), mlir::detail::OpPassManagerImpl::finalizePassList(), mlir::DynamicType::get(), getAttrOrTypeVerifier(), mlir::DynamicAttr::getChecked(), mlir::DynamicType::getChecked(), mlir::gpu::MMAMatrixType::getChecked(), mlir::quant::AnyQuantizedType::getChecked(), mlir::quant::CalibratedQuantizedType::getChecked(), mlir::quant::UniformQuantizedPerAxisType::getChecked(), mlir::quant::UniformQuantizedSubChannelType::getChecked(), mlir::quant::UniformQuantizedType::getChecked(), mlir::spirv::MatrixType::getChecked(), mlir::spirv::SampledImageType::getChecked(), mlir::detail::getDefaultDiagnosticEmitFn(), mlir::detail::getDefaultDiagnosticEmitFn(), mlir::spirv::getElementPtrType(), getInsertExtractValueElementType(), mlir::LLVM::detail::getLLVMConstant(), mlir::LLVMTypeConverter::getMemRefDescriptorFields(), mlir::bufferization::DeallocationState::getMemrefsAndConditionsToDeallocate(), getOverloadedDeclaration(), getRegisterType(), getScalarConstantAsAttr(), mlir::tracing::InstallDebugHandler::Impl::Impl(), inferOperationTypes(), mlir::LLVMImportInterface::initializeImport(), irdlAttrOrTypeVerifier(), irdlOpVerifier(), isScaleInExpressedTypeRange(), isValidGatherScatterBufferParams(), isValidGatherScatterParams(), mlir::LLVM::detail::isValidLoadStoreImpl(), IsValidMatrixOpParams(), loadIRDLDialects(), mlir::transform::detail::mapPossibleTopLevelTransformOpBlockArguments(), mlirAsmStateCreateForValue(), mlirEmitError(), mlirLLVMStructTypeLiteralGetChecked(), mlirReduceMain(), mlir::detail::Parser::parseAffineMapReference(), parseBitVectorString(), parseFormatString(), mlir::detail::Parser::parseIntegerSetReference(), mlir::Op< ConcreteType, Traits >::parseProperties(), mlir::transform::detail::parseTransformModuleFromFile(), performActions(), mlir::spirv::Deserializer::processArrayType(), mlir::spirv::Deserializer::processBranch(), mlir::spirv::Deserializer::processBranchConditional(), mlir::spirv::Deserializer::processConstant(), mlir::spirv::Deserializer::processConstantBool(), mlir::spirv::Deserializer::processConstantComposite(), mlir::spirv::Deserializer::processConstantCompositeReplicateEXT(), mlir::spirv::Deserializer::processConstantNull(), mlir::spirv::Deserializer::processCooperativeMatrixTypeKHR(), mlir::spirv::Deserializer::processDebugLine(), mlir::spirv::Deserializer::processDebugString(), mlir::spirv::processDecorationList(), mlir::spirv::Deserializer::processExtInst(), mlir::LLVM::ModuleImport::processFunction(), mlir::spirv::Deserializer::processFunction(), mlir::spirv::Deserializer::processFunctionEnd(), mlir::spirv::Deserializer::processFunctionType(), mlir::spirv::Deserializer::processGlobalVariable(), mlir::spirv::Deserializer::processGraphARM(), mlir::spirv::Deserializer::processGraphConstantARM(), mlir::spirv::Deserializer::processGraphEndARM(), mlir::spirv::Deserializer::processGraphEntryPointARM(), mlir::spirv::Deserializer::processGraphTypeARM(), mlir::spirv::Deserializer::processImageType(), mlir::spirv::Deserializer::processLabel(), mlir::spirv::Deserializer::processLoopMerge(), mlir::spirv::Deserializer::processMatrixType(), mlir::spirv::Deserializer::processOp(), mlir::spirv::Deserializer::processOpGraphSetOutputARM(), mlir::spirv::Deserializer::processOpTypePointer(), mlir::spirv::Deserializer::processOpWithoutGrammarAttr(), mlir::spirv::Deserializer::processPhi(), mlir::spirv::Deserializer::processRuntimeArrayType(), mlir::spirv::Deserializer::processSampledImageType(), mlir::spirv::Deserializer::processSelectionMerge(), mlir::spirv::Deserializer::processSpecConstantComposite(), mlir::spirv::Deserializer::processSpecConstantCompositeReplicateEXT(), mlir::spirv::Deserializer::processSpecConstantOperation(), mlir::spirv::Deserializer::processStructType(), mlir::spirv::Deserializer::processSwitch(), mlir::spirv::Deserializer::processTensorARMType(), mlir::spirv::Deserializer::processType(), mlir::spirv::Deserializer::processTypeForwardPointer(), mlir::spirv::Deserializer::processUndef(), mlir::dlti::query(), mlir::dlti::query(), readBytecodeFileImpl(), registerFromLLVMIRTranslation(), mlir::PassManager::run(), mlir::spirv::Deserializer::setFunctionArgAttrs(), mlir::OperationName::setOpPropertiesFromAttribute(), mlir::MlirOptMainConfig::setPassPipelineParser(), mlir::OperationState::setProperties(), mlir::DynamicOpDefinition::setPropertiesFromAttr(), mlir::OperationName::InterfaceConcept::setPropertiesFromAttr(), mlir::OperationName::UnregisteredOpModel::setPropertiesFromAttr(), mlir::RegisteredOperationName::Model< ConcreteOp >::setPropertiesFromAttr(), mlir::spirv::Deserializer::sliceInstruction(), mlir::spirv::Deserializer::structurizeControlFlow(), translateDataLayout(), mlir::LLVM::ModuleImport::translateDereferenceableAttr(), mlir::DynamicAttrDefinition::verify(), mlir::DynamicTypeDefinition::verify(), mlir::irdl::AllOfConstraint::verify(), mlir::irdl::AnyAttributeConstraint::verify(), mlir::irdl::AnyOfConstraint::verify(), mlir::irdl::BaseAttrConstraint::verify(), mlir::irdl::BaseTypeConstraint::verify(), mlir::irdl::Constraint::verify(), mlir::irdl::ConstraintVerifier::verify(), mlir::irdl::DynParametricAttrConstraint::verify(), mlir::irdl::DynParametricTypeConstraint::verify(), mlir::irdl::IsConstraint::verify(), mlir::irdl::RegionConstraint::verify(), mlir::detail::verifyAffineMapAsLayout(), verifyAlignment(), mlir::detail::verifyDataLayoutSpec(), verifyDimensionCompatibility(), verifyEntries(), verifyGatherOperandAndResultShape(), verifyGridAxes(), verifyInGroupDevice(), mlir::DynamicOpDefinition::verifyInherentAttrs(), mlir::OperationName::InterfaceConcept::verifyInherentAttrs(), mlir::OperationName::UnregisteredOpModel::verifyInherentAttrs(), mlir::OperationName::verifyInherentAttrs(), mlir::RegisteredOperationName::Model< ConcreteOp >::verifyInherentAttrs(), mlir::gpu::MMAMatrixType::verifyInvariants(), mlir::quant::AnyQuantizedType::verifyInvariants(), mlir::quant::CalibratedQuantizedType::verifyInvariants(), mlir::quant::QuantizedType::verifyInvariants(), mlir::quant::UniformQuantizedPerAxisType::verifyInvariants(), mlir::quant::UniformQuantizedSubChannelType::verifyInvariants(), mlir::quant::UniformQuantizedType::verifyInvariants(), mlir::spirv::InterfaceVarABIAttr::verifyInvariants(), mlir::spirv::MatrixType::verifyInvariants(), mlir::spirv::SampledImageType::verifyInvariants(), mlir::spirv::TensorArmType::verifyInvariants(), mlir::spirv::VerCapExtAttr::verifyInvariants(), verifyMapClause(), verifyPrivateVarsMapping(), verifyRegionAttribute(), verifyScatterOrSliceOperandAndResultShape(), mlir::tosa::TargetEnv::verifyTargetInformation(), mlir::detail::verifyTargetSystemSpec(), verifyTcgen05MMABlockScaleOp(), verifyTcgen05MMAOp(), verifyTMALoadParams(), mlir::spirv::Deserializer::wireUpBlockArgument(), mlir::irdl::AllOfConstraint::~AllOfConstraint(), mlir::irdl::AnyAttributeConstraint::~AnyAttributeConstraint(), mlir::irdl::AnyOfConstraint::~AnyOfConstraint(), mlir::irdl::BaseAttrConstraint::~BaseAttrConstraint(), mlir::irdl::BaseTypeConstraint::~BaseTypeConstraint(), mlir::irdl::DynParametricAttrConstraint::~DynParametricAttrConstraint(), mlir::irdl::DynParametricTypeConstraint::~DynParametricTypeConstraint(), and mlir::irdl::IsConstraint::~IsConstraint().

◆ emitError() [2/2]

InFlightDiagnostic mlir::emitError ( Location loc,
const Twine & message )

Definition at line 333 of file Diagnostics.cpp.

References emitDiag(), and Error.

◆ emitNormalizedLoopBounds()

Range mlir::emitNormalizedLoopBounds ( RewriterBase & rewriter,
Location loc,
OpFoldResult lb,
OpFoldResult ub,
OpFoldResult step )

Materialize bounds and step of a zero-based and unit-step loop derived by normalizing the specified bounds and step.

Definition at line 703 of file Utils.cpp.

References mlir::OpBuilder::createOrFold(), emitNormalizedLoopBoundsForIndexType(), getConstantIntValue(), mlir::Builder::getOneAttr(), getType(), getValueOrCreateConstantIntOp(), and mlir::Builder::getZeroAttr().

Referenced by coalesceLoops(), collapseParallelLoops(), and normalizeForallOp().

◆ emitOptionalError()

template<typename... Args>
LogicalResult mlir::emitOptionalError ( std::optional< Location > loc,
Args &&... args )

Overloads of the above emission functions that take an optionally null location.

If the location is null, no diagnostic is emitted and a failure is returned. Given that the provided location may be null, these methods take the diagnostic arguments directly instead of relying on the returned InFlightDiagnostic.

Definition at line 499 of file Diagnostics.h.

References mlir::InFlightDiagnostic::append(), and emitError().

Referenced by mlir::arith::getIdentityValueAttr(), mlir::arith::getReductionOp(), and mlir::vector::getVectorReductionOp().

◆ emitOptionalRemark()

template<typename... Args>
LogicalResult mlir::emitOptionalRemark ( std::optional< Location > loc,
Args &&... args )

Definition at line 511 of file Diagnostics.h.

References mlir::InFlightDiagnostic::append(), and emitRemark().

◆ emitOptionalWarning()

template<typename... Args>
LogicalResult mlir::emitOptionalWarning ( std::optional< Location > loc,
Args &&... args )

Definition at line 505 of file Diagnostics.h.

References mlir::InFlightDiagnostic::append(), and emitWarning().

◆ emitRemark() [1/2]

InFlightDiagnostic mlir::emitRemark ( Location loc)

Utility method to emit a remark message using this location.

Emit a remark message using this location.

Definition at line 346 of file Diagnostics.cpp.

References emitRemark().

Referenced by emitOptionalRemark(), emitRemark(), mlir::ImplicitLocOpBuilder::emitRemark(), mlir::Operation::emitRemark(), and mlir::detail::reportFatalInferReturnTypesError().

◆ emitRemark() [2/2]

InFlightDiagnostic mlir::emitRemark ( Location loc,
const Twine & message )

Definition at line 349 of file Diagnostics.cpp.

References emitDiag(), and Remark.

◆ emitSilenceableFailure() [1/2]

DiagnosedSilenceableFailure mlir::emitSilenceableFailure ( Location loc,
const Twine & message = {} )
inline

Emits a silenceable failure with the given message.

A silenceable failure must be either suppressed or converted into a definite failure and reported to the user.

Definition at line 256 of file DiagnosedSilenceableFailure.h.

Referenced by containsAll(), dispatchMappedValues(), mlir::transform::expandTargetSpecification(), mlir::transform::TrackingListener::findReplacementOp(), isOpSibling(), pipelineForSharedCopies(), verifyNamedSequenceOp(), and verifyYieldingSingleBlockOp().

◆ emitSilenceableFailure() [2/2]

DiagnosedSilenceableFailure mlir::emitSilenceableFailure ( Operation * op,
const Twine & message = {} )
inline

Definition at line 262 of file DiagnosedSilenceableFailure.h.

◆ emitWarning() [1/2]

◆ emitWarning() [2/2]

InFlightDiagnostic mlir::emitWarning ( Location loc,
const Twine & message )

Definition at line 341 of file Diagnostics.cpp.

References emitDiag(), and Warning.

◆ encodeBindAttribute()

void mlir::encodeBindAttribute ( ModuleOp module)

Encodes global variable's descriptor set and binding into its name if they both exist.

Definition at line 1973 of file SPIRVToLLVM.cpp.

References kBinding, kDescriptorSet, mlir::SymbolTable::replaceAllSymbolUses(), and mlir::SymbolTable::setSymbolName().

◆ eraseUnreachableBlocks()

LogicalResult mlir::eraseUnreachableBlocks ( RewriterBase & rewriter,
MutableArrayRef< Region > regions )

Erase the unreachable blocks within the provided regions.

Returns success if any blocks were erased, failure otherwise.

Definition at line 186 of file RegionUtils.cpp.

References mlir::Region::empty(), mlir::RewriterBase::eraseBlock(), mlir::Region::front(), mlir::Region::getBlocks(), mlir::Region::getParentOp(), mlir::Region::hasOneBlock(), and success().

Referenced by simplifyRegions().

◆ expandDimsToRank()

AffineMap mlir::expandDimsToRank ( AffineMap map,
int64_t rank,
const llvm::SmallBitVector & projectedDimensions )

Expand map to operate on rank dims while projecting out the dims in projectedDimensions.

This amounts to composing map with id(rank).dropResults(projectedDimensions).

Definition at line 948 of file AffineMap.cpp.

References mlir::AffineMap::compose(), mlir::AffineMap::dropResults(), mlir::AffineMap::getContext(), and mlir::AffineMap::getMultiDimIdentityMap().

◆ extractFixedOuterLoops()

TileLoops mlir::extractFixedOuterLoops ( scf::ForOp rootFOrOp,
ArrayRef< int64_t > sizes )

◆ extractFromIntegerArrayAttr()

template<typename IntTy>
SmallVector< IntTy > mlir::extractFromIntegerArrayAttr ( Attribute attr)

Extract integer values from the assumed ArrayAttr of IntegerAttr.

Definition at line 86 of file StaticValueUtils.h.

◆ failableParallelForEach() [1/2]

template<typename IteratorT, typename FuncT>
LogicalResult mlir::failableParallelForEach ( MLIRContext * context,
IteratorT begin,
IteratorT end,
FuncT && func )

Invoke the given function on the elements between [begin, end) asynchronously.

If the given function returns a failure when processing any of the elements, execution is stopped and a failure is returned from this function. This means that in the case of failure, not all elements of the range will be processed. Diagnostics emitted during processing are ordered relative to the element's position within [begin, end). If the provided context does not have multi-threading enabled, this function always processes elements sequentially.

Definition at line 36 of file Threading.h.

References mlir::ParallelDiagnosticHandler::eraseOrderIDForThread(), mlir::MLIRContext::getThreadPool(), mlir::MLIRContext::isMultithreadingEnabled(), mlir::ParallelDiagnosticHandler::setOrderIDForThread(), and success().

Referenced by failableParallelForEach(), failableParallelForEachN(), and parallelForEach().

◆ failableParallelForEach() [2/2]

template<typename RangeT, typename FuncT>
LogicalResult mlir::failableParallelForEach ( MLIRContext * context,
RangeT && range,
FuncT && func )

Invoke the given function on the elements in the provided range asynchronously.

If the given function returns a failure when processing any of the elements, execution is stopped and a failure is returned from this function. This means that in the case of failure, not all elements of the range will be processed. Diagnostics emitted during processing are ordered relative to the element's position within the range. If the provided context does not have multi-threading enabled, this function always processes elements sequentially.

Definition at line 90 of file Threading.h.

References failableParallelForEach().

◆ failableParallelForEachN()

template<typename FuncT>
LogicalResult mlir::failableParallelForEachN ( MLIRContext * context,
size_t begin,
size_t end,
FuncT && func )

Invoke the given function on the elements between [begin, end) asynchronously.

If the given function returns a failure when processing any of the elements, execution is stopped and a failure is returned from this function. This means that in the case of failure, not all elements of the range will be processed. Diagnostics emitted during processing are ordered relative to the element's position within [begin, end). If the provided context does not have multi-threading enabled, this function always processes elements sequentially.

Definition at line 105 of file Threading.h.

References failableParallelForEach().

◆ filterTypesOut()

TypeRange mlir::filterTypesOut ( TypeRange types,
const BitVector & indices,
SmallVectorImpl< Type > & storage )

Filters out any elements referenced by indices.

If any types are removed, storage is used to hold the new type list. Returns the new type list.

Definition at line 194 of file TypeUtilities.cpp.

References indices.

◆ finalizeParallelLoopToGPUConversion()

void mlir::finalizeParallelLoopToGPUConversion ( Operation * op)

Clean up after applyPartialConversion/applyFullConversion call.

Definition at line 782 of file SCFToGPU.cpp.

References kVisitedAttrName, and mlir::Operation::walk().

◆ findPositionsOfType()

void mlir::findPositionsOfType ( ArrayRef< utils::IteratorType > iteratorTypes,
utils::IteratorType iteratorTypeName,
SmallVectorImpl< unsigned > & res )
inline

Return positions in iteratorTypes that match iteratorTypeName.

Definition at line 77 of file StructuredOpsUtils.h.

◆ findReachableBlocks()

void mlir::findReachableBlocks ( Region & region,
DenseSet< Block * > & reachableBlocks )
static

◆ foldAttributesIntoMap()

AffineMap mlir::foldAttributesIntoMap ( Builder & b,
AffineMap map,
ArrayRef< OpFoldResult > operands,
SmallVector< Value > & remainingValues )

Fold all attributes among the given operands into the affine map.

Return the folded affine map. Return all remaining values via remainingValues.

Definition at line 738 of file AffineMap.cpp.

References b, mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumSymbols(), and mlir::AffineMap::replaceDimsAndSymbols().

Referenced by mlir::ValueBoundsConstraintSet::areOverlappingSlices(), mlir::affine::makeComposedAffineApply(), and makeComposedMinMax().

◆ foldDynamicIndexList()

LogicalResult mlir::foldDynamicIndexList ( SmallVectorImpl< OpFoldResult > & ofrs,
bool onlyNonNegative = false,
bool onlyNonZero = false )

Returns "success" when any of the elements in ofrs is a constant value.

In that case the value is replaced by an attribute. Returns "failure" when no folding happened. If onlyNonNegative and onlyNonZero are set, only non-negative and non-zero constant values are folded respectively.

Definition at line 395 of file StaticValueUtils.cpp.

References getConstantIntValue(), m_Constant(), matchPattern(), and success().

Referenced by foldDynamicOffsetSizeList(), foldDynamicStrideList(), mlir::OpWithOffsetSizesAndStridesConstantArgumentFolder< OpType, ResultTypeFn, CastOpFunc >::matchAndRewrite(), and normalizeForallOp().

◆ foldDynamicOffsetSizeList()

LogicalResult mlir::foldDynamicOffsetSizeList ( SmallVectorImpl< OpFoldResult > & offsetsOrSizes)

Returns "success" when any of the elements in offsetsOrSizes is a constant value.

In that case the value is replaced by an attribute. Returns "failure" when no folding happened. Invalid values are not folded to avoid canonicalization crashes.

Definition at line 416 of file StaticValueUtils.cpp.

References foldDynamicIndexList().

◆ foldDynamicStrideList()

LogicalResult mlir::foldDynamicStrideList ( SmallVectorImpl< OpFoldResult > & strides)

Returns "success" when any of the elements in strides is a constant value.

In that case the value is replaced by an attribute. Returns "failure" when no folding happened. Invalid values are not folded to avoid canonicalization crashes.

Definition at line 421 of file StaticValueUtils.cpp.

References foldDynamicIndexList().

◆ foldReshapeOp()

template<typename ReshapeOpTy, typename InverseReshapeOpTy>
OpFoldResult mlir::foldReshapeOp ( ReshapeOpTy reshapeOp,
ArrayRef< Attribute > operands )
static

Definition at line 87 of file ReshapeOpsUtils.h.

◆ fuseIndependentSiblingForallLoops()

scf::ForallOp mlir::fuseIndependentSiblingForallLoops ( scf::ForallOp target,
scf::ForallOp source,
RewriterBase & rewriter )

Given two scf.forall loops, target and source, fuses target into source.

Assumes that the given loops are siblings and are independent of each other.

This function does not perform any legality checks and simply fuses the loops. The caller is responsible for ensuring that the loops are legal to fuse.

Definition at line 1373 of file Utils.cpp.

References mlir::OpBuilder::clone(), mlir::IRMapping::map(), mlir::RewriterBase::replaceOp(), mlir::OpBuilder::setInsertionPointAfter(), mlir::OpBuilder::setInsertionPointToStart(), and target.

◆ fuseIndependentSiblingForLoops()

scf::ForOp mlir::fuseIndependentSiblingForLoops ( scf::ForOp target,
scf::ForOp source,
RewriterBase & rewriter )

Given two scf.for loops, target and source, fuses target into source.

Assumes that the given loops are siblings and are independent of each other.

This function does not perform any legality checks and simply fuses the loops. The caller is responsible for ensuring that the loops are legal to fuse.

Definition at line 1426 of file Utils.cpp.

References mlir::OpBuilder::clone(), mlir::IRMapping::lookupOrDefault(), mlir::IRMapping::map(), mlir::RewriterBase::replaceOp(), mlir::OpBuilder::setInsertionPointAfter(), mlir::OpBuilder::setInsertionPointToStart(), and target.

◆ generateLocationsFromIR() [1/4]

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

The generated locations replace the current operation locations.

Definition at line 102 of file LocationSnapshot.cpp.

References generateLocationsFromIR().

Referenced by generateLocationsFromIR(), generateLocationsFromIR(), and generateLocationsFromIR().

◆ generateLocationsFromIR() [2/4]

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

The generated locations are represented as a NameLoc with the given tag as the name, and then fused with the existing locations.

Definition at line 118 of file LocationSnapshot.cpp.

References generateLocationsFromIR().

◆ generateLocationsFromIR() [3/4]

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

If filename is empty, a temporary file is generated instead.

Definition at line 109 of file LocationSnapshot.cpp.

◆ generateLocationsFromIR() [4/4]

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

If filename is empty, a temporary file is generated instead.

Definition at line 126 of file LocationSnapshot.cpp.

◆ generateUnrolledLoop()

void mlir::generateUnrolledLoop ( Block * loopBodyBlock,
Value iv,
uint64_t unrollFactor,
function_ref< Value(unsigned, Value, OpBuilder)> ivRemapFn,
function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn,
ValueRange iterArgs,
ValueRange yieldedValues,
IRMapping * clonedToSrcOpsMap = nullptr )

Generate unrolled copies of an scf loop's 'loopBodyBlock', with 'iterArgs' and 'yieldedValues' as the block arguments and yielded values of the loop.

The content of the loop body is replicated 'unrollFactor' times, calling 'ivRemapFn' to remap 'iv' for each unrolled body. If specified, annotates the Ops in each unrolled iteration using annotateFn. If provided, 'clonedToSrcOpsMap' is populated with the mappings from the cloned ops to the original op.

Definition at line 294 of file Utils.cpp.

References mlir::OpBuilder::atBlockTerminator(), mlir::Block::begin(), mlir::Operation::clone(), mlir::IRMapping::contains(), mlir::Block::end(), mlir::Block::getTerminator(), mlir::IRMapping::lookup(), mlir::IRMapping::lookupOrDefault(), mlir::IRMapping::map(), mlir::Operation::setOperands(), and mlir::Value::use_empty().

Referenced by mlir::affine::loopUnrollByFactor(), loopUnrollByFactor(), and parallelLoopUnrollByFactors().

◆ get()

template<typename T, typename... Ts>
auto mlir::get ( MLIRContext * context,
Ts &&... params )

Helper method that injects context only if needed, this helps unify some of the attribute construction methods.

Definition at line 509 of file BytecodeImplementation.h.

Referenced by mlir::spirv::detail::ArrayTypeStorage::ArrayTypeStorage(), mlir::AsmDialectResourceHandleBase< DerivedT, ResourceT, DialectT >::AsmDialectResourceHandleBase(), mlir::transform::ApplyToEachResultList::assign(), mlir::pdl_to_pdl_interp::BoolNode::BoolNode(), mlir::tracing::BreakpointBase< Derived >::BreakpointBase(), mlir::tracing::BreakpointManagerBase< Derived >::BreakpointManagerBase(), mlir::spirv::detail::CooperativeMatrixTypeStorage::CooperativeMatrixTypeStorage(), deserializeCacheControlDecoration(), mlir::pdl_to_pdl_interp::ExitNode::ExitNode(), mlir::FunctionCallBuilder::FunctionCallBuilder(), mlir::DenseElementsAttr::get(), mlir::pdll::ast::TupleType::get(), mlir::python::PyDialects::getDialectForKey(), mlir::spirv::detail::ImageTypeStorage::ImageTypeStorage(), mlir::BytecodeReader::Impl::Impl(), mlir::OperationName::Impl::Impl(), mlir::LLVM::detail::LLVMTypeAndSizeStorage::LLVMTypeAndSizeStorage(), mlir::DataFlowSolver::load(), mlirDictionaryAttrGetElementByName(), mlirOpOperandGetValue(), mlir::RegisteredOperationName::Model< ConcreteOp >::Model(), mlir::pdll::ast::Node::NodeBase< T, BaseT >::NodeBase(), mlir::bufferization::OneShotAnalysisState::OneShotAnalysisState(), mlir::OperationFolder::OperationFolder(), mlir::OpTraitRewritePattern< TraitType >::OpTraitRewritePattern(), mlir::PassWrapper< PassT, BaseT >::PassWrapper(), PyOpResultList::PyOpResultList(), CopyBuilder::rewrite(), mlir::linalg::rewriteAsPaddedOp(), mlir::sparse_tensor::SparseTensorType::SparseTensorType(), mlir::StateStackFrameBase< Derived >::StateStackFrameBase(), mlir::pdl_to_pdl_interp::SuccessNode::SuccessNode(), mlir::pdl_to_pdl_interp::SwitchNode::SwitchNode(), mlir::gpu::TargetOptions::TargetOptions(), mlir::transform::TransformDialectData< DerivedTy >::TransformDialectData(), and mlir::pdll::ast::detail::TypeStorageBase< ConcreteT, KeyT >::TypeStorageBase().

◆ getAffineBinaryOpExpr()

◆ getAffineConstantExpr()

AffineExpr mlir::getAffineConstantExpr ( int64_t constant,
MLIRContext * context )

◆ getAffineConstantExprs()

SmallVector< AffineExpr > mlir::getAffineConstantExprs ( ArrayRef< int64_t > constants,
MLIRContext * context )

◆ getAffineDimExpr()

AffineExpr mlir::getAffineDimExpr ( unsigned position,
MLIRContext * context )

These free functions allow clients of the API to not use classes in detail.

Referenced by adjustMap(), mlir::detail::bindDims(), bindDimsList(), calculateImplicitMap(), canonicalizeMapOrSetAndOperands(), canonicalizePromotedSymbols(), common3DIdBuilderFn(), commonLinearIdBuilderFn(), mlir::AffineMap::compose(), composeAffineMapAndOperands(), computeIteratorTypesAndIndexingMaps(), mlir::FlatLinearConstraints::computeLocalVars(), mlir::linalg::computeTileSizes(), computeUnknownVars(), convertReassociationIndicesToExprs(), createPrivateMemRef(), mlir::linalg::dropUnitDims(), genReplaceDimToLvlMap(), mlir::Builder::getAffineDimExpr(), getAffineExprFromFlatForm(), getDimMap(), mlir::AffineMap::getMultiDimIdentityMap(), mlir::AffineMap::getMultiDimMapWithTargets(), getSemiAffineExprFromFlatForm(), insertParallelDim(), inverseAndBroadcastProjectedPermutation(), mlir::sparse_tensor::inverseBlockSparsity(), inversePermutation(), mlir::linalg::isaConvolutionOpOfType< linalg::Conv1DNcwFcwOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::Conv1DNwcWcfOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::Conv1DOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::Conv2DOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::Conv3DOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::DepthwiseConv1DNcwCwOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::DepthwiseConv1DNwcWcmOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::DepthwiseConv1DNwcWcOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::DepthwiseConv2DNchwChwOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::DepthwiseConv3DNdhwcDhwcmOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::PoolingNhwcMaxOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::PoolingNhwcMaxUnsignedOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::PoolingNhwcMinOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::PoolingNhwcMinUnsignedOp >(), mlir::linalg::isaConvolutionOpOfType< linalg::PoolingNhwcSumOp >(), mlir::AffineExpr::isFunctionOfDim(), isNormalizedMemRefDynamicDim(), laneIdBuilderFn(), legalizeDemotedDims(), mlir::linalg::makeAffineDimExprs(), makeCanonicalStridedLayoutExpr(), makePermutationMap(), makeStridedLinearLayoutMap(), mlirAffineDimExprGet(), projectCommonImpl(), replaceAffineDelinearizeIndexInverseExpression(), replaceAffineMinBoundingBoxExpression(), replaceDimOrSym(), scaleReductionDim(), mlir::AffineExpr::shiftDims(), sliceTransferIndices(), mlir::linalg::splitReductionByScaling(), transferReadSupportsMMAMatrixType(), and translateMap().

◆ getAffineExprFromFlatForm()

AffineExpr mlir::getAffineExprFromFlatForm ( ArrayRef< int64_t > flatExprs,
unsigned numDims,
unsigned numSymbols,
ArrayRef< AffineExpr > localExprs,
MLIRContext * context )

Constructs an affine expression from a flat ArrayRef.

Constructs an affine expression from a flat ArrayRef. If there are local identifiers (neither dimensional nor symbolic) that appear in the sum of products expression, localExprs is expected to have the AffineExpr for it, and is substituted into. The ArrayRef flatExprs is expected to be in the format [dims, symbols, locals, constant term].

If there are local identifiers (neither dimensional nor symbolic) that appear in the sum of products expression, 'localExprs' is expected to have the AffineExpr for it, and is substituted into. The ArrayRef 'eq' is expected to be in the format [dims, symbols, locals, constant term].

Definition at line 1090 of file AffineExpr.cpp.

References getAffineConstantExpr(), getAffineDimExpr(), and getAffineSymbolExpr().

Referenced by mlir::FlatLinearConstraints::getAsIntegerSet(), mlir::affine::FlatAffineValueConstraints::getIneqAsAffineValueMap(), mlir::FlatLinearConstraints::getLowerAndUpperBound(), simplifyAffineExpr(), mlir::SimpleAffineExprFlattener::visitModExpr(), and mlir::SimpleAffineExprFlattener::visitMulExpr().

◆ getAffineSymbolExpr()

◆ getAsIndexOpFoldResult() [1/2]

SmallVector< OpFoldResult > mlir::getAsIndexOpFoldResult ( MLIRContext * ctx,
ArrayRef< int64_t > values )

Definition at line 110 of file StaticValueUtils.cpp.

References getAsIndexOpFoldResult().

◆ getAsIndexOpFoldResult() [2/2]

OpFoldResult mlir::getAsIndexOpFoldResult ( MLIRContext * ctx,
int64_t val )

◆ getAsOpFoldResult() [1/3]

SmallVector< OpFoldResult > mlir::getAsOpFoldResult ( ArrayAttr arrayAttr)

Convert arrayAttr to a vector of OpFoldResult.

Definition at line 98 of file StaticValueUtils.cpp.

References ArrayAttr().

◆ getAsOpFoldResult() [2/3]

◆ getAsOpFoldResult() [3/3]

SmallVector< OpFoldResult > mlir::getAsOpFoldResult ( ValueRange values)

Given an array of values, try to extract a constant Attribute from each value.

If this fails, return the original value.

Definition at line 92 of file StaticValueUtils.cpp.

References getAsOpFoldResult().

◆ getBackwardSlice() [1/2]

LogicalResult mlir::getBackwardSlice ( Operation * op,
SetVector< Operation * > * backwardSlice,
const BackwardSliceOptions & options = {} )

Fills backwardSlice with the computed backward slice (i.e.

all the transitive defs of op), without including that operation.

This additionally takes a TransitiveFilter which acts as a frontier: when looking at defs transitively, an operation that does not pass the filter is never propagated through. This allows in particular to carve out the scope within a ForOp or the scope within an IfOp.

The implementation traverses the def chains in postorder traversal for efficiency reasons: if an operation is already in backwardSlice, no need to traverse its definitions again. In the presence of use-def cycles in a graph region, the traversal stops at the first operation that was already visited (which is not added to the slice anymore).

Upon return to the root call, backwardSlice is filled with a postorder list of defs. This happens to be a topological order, from the point of view of the use-def chains.

Example starting from node 8

1 2 3 4 |_______| |______| | | | | 5 6 |___|_____________| | | 7 8 |_______________| | 9

Assuming all local orders match the numbering order: {1, 2, 5, 3, 4, 6}

This function returns whether the backwards slice was able to be successfully computed, and failure if it was unable to determine the slice.

Definition at line 179 of file SliceAnalysis.cpp.

References getBackwardSliceImpl(), options, and result.

Referenced by checkAssumptionForLoop(), computeBackwardSlice(), dependsOnCarriedVals(), getBackwardSlice(), getPipelineStages(), getSlice(), getSliceContract(), mlir::query::matcher::PredicateBackwardSliceMatcher< BaseMatcher, Filter >::match(), moveOperationDependencies(), and moveValueDefinitions().

◆ getBackwardSlice() [2/2]

LogicalResult mlir::getBackwardSlice ( Value root,
SetVector< Operation * > * backwardSlice,
const BackwardSliceOptions & options = {} )

Value-rooted version of getBackwardSlice.

Return the union of all backward slices for the op defining or owning the value root.

Definition at line 195 of file SliceAnalysis.cpp.

References getBackwardSlice(), mlir::Value::getDefiningOp(), mlir::Operation::getParentOp(), and options.

◆ getBlocksSortedByDominance()

SetVector< Block * > mlir::getBlocksSortedByDominance ( Region & region)

Gets a list of blocks that is sorted according to dominance.

This sort is stable.

Definition at line 147 of file TopologicalSortUtils.cpp.

References b, and mlir::Region::getBlocks().

Referenced by convertDataOp(), convertOmpOpRegions(), and getOrCreateBlockIndices().

◆ getBoundForAffineExpr()

std::optional< int64_t > mlir::getBoundForAffineExpr ( AffineExpr expr,
unsigned numDims,
unsigned numSymbols,
ArrayRef< std::optional< int64_t > > constLowerBounds,
ArrayRef< std::optional< int64_t > > constUpperBounds,
bool isUpper )

Get a lower or upper (depending on isUpper) bound for expr while using the constant lower and upper bounds for its inputs provided in constLowerBounds and constUpperBounds.

Return std::nullopt if such a bound can't be computed. This method only handles simple sum of product expressions (w.r.t constant coefficients) so as to not depend on anything heavyweight in Analysis. Expressions of the form: c0*d0 + c1*d1 + c2*s0 + ... + c_n are handled. Expressions involving floordiv, ceildiv, mod or semi-affine ones will lead a none being returned.

Definition at line 1641 of file AffineExpr.cpp.

References CeilDiv, FloorDiv, getBoundForAffineExpr(), Mod, mlir::SimpleAffineExprFlattener::numLocals, mlir::SimpleAffineExprFlattener::operandExprStack, and mlir::AffineExprVisitor< SubClass, RetTy >::walkPostOrder().

Referenced by getBoundForAffineExpr(), getLowerBound(), getUpperBound(), and simplifyMinOrMaxExprWithOperands().

◆ getBufferizationOptionsForSparsification()

mlir::bufferization::OneShotBufferizationOptions mlir::getBufferizationOptionsForSparsification ( bool analysisOnly)

◆ getConstantAPIntValue()

std::optional< std::pair< APInt, bool > > mlir::getConstantAPIntValue ( OpFoldResult ofr)

If ofr is a constant integer or an IntegerAttr, return the integer.

The second return value indicates whether the value is an index type and thus the bitwidth is not defined (the APInt will be set with 64bits).

The boolean indicates whether the value is an index type.

Definition at line 118 of file StaticValueUtils.cpp.

References m_ConstantInt(), and matchPattern().

Referenced by constantTripCount(), and getConstantIntValue().

◆ getConstantIntValue()

std::optional< int64_t > mlir::getConstantIntValue ( OpFoldResult ofr)

If ofr is a constant integer or an IntegerAttr, return the integer.

Definition at line 134 of file StaticValueUtils.cpp.

References getConstantAPIntValue().

Referenced by mlir::affine::FlatAffineValueConstraints::addInductionVarOrTerminalSymbol(), mlir::scf::addLoopRangeConstraints(), allocBuffer(), mlir::linalg::areTilesAndTiledDimsAllConstant(), mlir::linalg::asShapeWithAnyValueAsDynamic(), buildAffineLoopFromValues(), canOmitTileOffsetInBoundsCheck(), canOmitTileOffsetInBoundsCheck(), checkTileSizes(), mlir::affine::MemRefRegion::compute(), mlir::linalg::computeContinuousTileSizes(), mlir::linalg::computeSliceParameters(), constifyIndexValues(), mlir::nvgpu::createAsyncGroups(), createInBoundsCond(), mlir::xegpu::createXeGPUOptimizeBlockLoads(), delinearizeInductionVariable(), mlir::linalg::GenerateLoopNest< LoopTy >::doit(), emitNormalizedLoopBounds(), foldCstValueToCstAttrBasis(), foldDynamicIndexList(), foldDynamicToStaticDimSizes(), foldIdentityOffsetSizeAndStrideOpInterface(), mlir::affine::ComputationSliceState::getAsConstraints(), getBoundedTileSize(), getCollapsedIndices(), getConstantIntValues(), getConstantRange(), mlir::vector::getConstantVscaleMultiplier(), mlir::tensor::getExpandedExtractSliceInfo(), mlir::ValueBoundsConstraintSet::getExpr(), mlir::ValueBoundsConstraintSet::getExpr(), mlir::linalg::getNewMixedTileSizes(), getPackOpSourceOrPaddedSource(), getProductOfIntsOrIndexes(), getSimplifiedOfrAndStaticSizePair(), getSlicedDimensions(), isConstantIntValue(), isDimOpValidSymbol(), mlir::vector::isDisjointTransferIndices(), isEqualConstantIntOrValue(), isInBounds(), isMaskTriviallyFoldable(), isTrivialSubViewOp(), loopScheduling(), loopUnrollByFactor(), mlir::linalg::makeTiledLoopRanges(), FoldConstantCase::matchAndRewrite(), mlir::ComposeCollapseOfExpandOp< CollapseOpTy, ExpandOpTy, CastOpTy, DimOpTy, TensorTy >::matchAndRewrite(), mlir::linalg::pack(), padOperand(), parallelLoopUnrollByFactors(), reifyOpResultShapes(), mlir::scf::rewritePeeledMinMaxOp(), mlir::affine::simplifyConstrainedMinMaxOp(), tileDividesIterationDomain(), tileLinalgOpImpl(), unFoldOpIntResult(), validateFullTilesOnDims(), and mlir::ValueBoundsConstraintSet::Variable::Variable().

◆ getConstantIntValues()

std::optional< SmallVector< int64_t > > mlir::getConstantIntValues ( ArrayRef< OpFoldResult > ofrs)

If all ofrs are constant integers or IntegerAttrs, return the integers.

Definition at line 142 of file StaticValueUtils.cpp.

References getConstantIntValue().

Referenced by areConstantIntValues(), getThreadIdBuilder(), rewriteOneForallCommonImpl(), and verifyGpuMapping().

◆ getConstLoopTripCounts()

llvm::SmallVector< int64_t > mlir::getConstLoopTripCounts ( mlir::LoopLikeOpInterface loopOp)

Get constant trip counts for each of the induction variables of the given loop operation.

If any of the loop's trip counts is not constant, return an empty vector.

Definition at line 1563 of file Utils.cpp.

References mlir::scf::computeUbMinusLb(), and constantTripCount().

Referenced by parallelLoopUnrollByFactors().

◆ getControlFlowPredecessors()

std::optional< SmallVector< Value > > mlir::getControlFlowPredecessors ( Value value)

Computes a vector of all control predecessors of value.

Relies on RegionBranchOpInterface, BranchOpInterface, and SelectLikeOpInterface to determine predecessors. Returns nullopt if value has no predecessors or when the relevant operations are missing the interface implementations.

Definition at line 106 of file SliceWalk.cpp.

References getBlockPredecessorOperands(), mlir::Block::getParentOp(), getRegionPredecessorOperands(), and mlir::Block::isEntryBlock().

Referenced by getUnderlyingObjectSet().

◆ getEffectsRecursively()

std::optional< llvm::SmallVector< MemoryEffects::EffectInstance > > mlir::getEffectsRecursively ( Operation * rootOp)

Returns the side effects of an operation.

If the operation has RecursiveMemoryEffects, include all side effects of child operations.

std::nullopt indicates that an option did not have a memory effect interface and so no result could be obtained. An empty vector indicates that there were no memory effects found (but every operation implemented the memory effect interface or has RecursiveMemoryEffects). If the vector contains multiple effects, these effects may be duplicates.

Definition at line 346 of file SideEffectInterfaces.cpp.

References mlir::Operation::getRegions(), and mlir::Operation::hasTrait().

◆ getElementTypeOrSelf() [1/3]

Type mlir::getElementTypeOrSelf ( Attribute attr)

Return the element type or return the type itself.

Definition at line 33 of file TypeUtilities.cpp.

References getElementTypeOrSelf().

◆ getElementTypeOrSelf() [2/3]

Type mlir::getElementTypeOrSelf ( Type type)

Return the element type or return the type itself.

Definition at line 23 of file TypeUtilities.cpp.

Referenced by buildGenericRegion(), MmaSyncBuilder::buildMmaSync(), buildVectorWrite(), castF32To(), clampInput(), convertCtlzOp(), convertFPowIOp(), convertPowfOp(), convertRoundEvenOp(), convertRoundOp(), convertRsqrtOp(), createConst(), createConvertArithToSPIRVPass(), createFloatConst(), createFloatConst(), createLinalgBodyCalculationForElementwiseOp(), mlir::tosa::createPadConstTensor(), mlir::tosa::createZPsAsConst(), exp2I32(), fillStructuredOpRegion(), frexp(), genBuffers(), genInsertionLoad(), mlir::OpTrait::util::getBroadcastedType(), getElementTypeOrSelf(), getElementTypeOrSelf(), getScalarOrElementWidth(), mlir::ConstantIntRanges::getStorageBitwidth(), getStorageElementTypeOrSelf(), getUnderlyingType(), mlir::arith::getZeroConstant(), insertCasts(), mlir::vector::isBroadcastableTo(), mlir::linalg::lowerPack(), mlir::math::ErfcPolynomialApproximation::matchAndRewrite(), mlir::math::ErfPolynomialApproximation::matchAndRewrite(), mlir::spirv::ElementwiseOpPattern< Op, SPIRVOp >::matchAndRewrite(), materializeBinaryNanCheckIfRequired(), mfmaOpToIntrinsic(), mfmaOpToScaledIntrinsic(), mlirLinalgFillBuiltinNamedOpRegion(), mlir::linalg::pack(), padOperand(), padOperandToSmallestStaticBoundingBox(), mlir::amdgpu::populateAmdgpuEmulateAtomicsPatterns(), mlir::linalg::rewriteAsPaddedOp(), mlir::linalg::rewriteAsPaddedOp(), vectorizeAsLinalgGeneric(), vectorizeOneOp(), verifyExtOp(), mlir::OpTrait::impl::verifySameOperandsAndResultElementType(), mlir::OpTrait::impl::verifySameOperandsAndResultType(), mlir::OpTrait::impl::verifySameOperandsElementType(), mlir::linalg::detail::verifyStructuredOpInterface(), mlir::OpTrait::tosa::MulOperandsAndResultElementType< ConcreteType >::verifyTrait(), verifyTruncateOp(), verifyYield(), verifyZeroPoint(), and verifyZeroPoint().

◆ getElementTypeOrSelf() [3/3]

Type mlir::getElementTypeOrSelf ( Value val)

Definition at line 29 of file TypeUtilities.cpp.

References getElementTypeOrSelf(), and mlir::Value::getType().

◆ getEnclosingRepetitiveRegion() [1/2]

Region * mlir::getEnclosingRepetitiveRegion ( Operation * op)

Return the first enclosing region of the given op that may be executed repetitively as per RegionBranchOpInterface or nullptr if no such region exists.

Definition at line 482 of file ControlFlowInterfaces.cpp.

References mlir::Operation::getName(), mlir::Region::getParentOp(), mlir::Operation::getParentRegion(), and mlir::Region::getRegionNumber().

◆ getEnclosingRepetitiveRegion() [2/2]

Region * mlir::getEnclosingRepetitiveRegion ( Value value)

Return the first enclosing region of the given Value that may be executed repetitively as per RegionBranchOpInterface or nullptr if no such region exists.

Definition at line 507 of file ControlFlowInterfaces.cpp.

References mlir::Operation::getName(), mlir::Region::getParentOp(), mlir::Operation::getParentRegion(), mlir::Value::getParentRegion(), and mlir::Region::getRegionNumber().

◆ getFlattenedAffineExpr()

LogicalResult mlir::getFlattenedAffineExpr ( AffineExpr expr,
unsigned numDims,
unsigned numSymbols,
SmallVectorImpl< int64_t > * flattenedExpr,
FlatLinearConstraints * cst = nullptr,
bool addConservativeSemiAffineBounds = false )

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.

Returns failure if 'expr' could not be flattened (i.e., an unhandled semi-affine was found). 'cst' contains constraints that connect newly introduced local variables to existing dimensional and symbolic variables. See documentation for AffineExprFlattener on how mod's and div's are flattened.

Definition at line 177 of file FlatLinearValueConstraints.cpp.

References getFlattenedAffineExprs().

◆ getFlattenedAffineExprs() [1/2]

LogicalResult mlir::getFlattenedAffineExprs ( AffineMap map,
std::vector< SmallVector< int64_t, 8 > > * flattenedExprs,
FlatLinearConstraints * localVarCst = nullptr,
bool addConservativeSemiAffineBounds = false )

Flattens the result expressions of the map to their corresponding flattened forms and set in 'flattenedExprs'.

Flattens the expressions in map.

Returns failure if any expression in the map could not be flattened (i.e., an unhandled semi-affine was found). 'cst' contains constraints that connect newly introduced local variables to existing dimensional and / symbolic variables. See documentation for AffineExprFlattener on how mod's and div's are flattened. For all affine expressions that share the same operands (like those of an affine map), this method should be used instead of repeatedly calling getFlattenedAffineExpr since local variables added to deal with div's and mod's will be reused across expressions.

Returns failure if 'expr' was unable to be flattened (i.e., an unhandled semi-affine was found).

Definition at line 191 of file FlatLinearValueConstraints.cpp.

References mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), mlir::AffineMap::getResults(), and success().

Referenced by mlir::FlatLinearValueConstraints::FlatLinearValueConstraints(), mlir::FlatLinearConstraints::flattenAlignedMapAndMergeLocals(), getFlattenedAffineExpr(), getMultiAffineFunctionFromMap(), and mlir::affine::getRelationFromMap().

◆ getFlattenedAffineExprs() [2/2]

LogicalResult mlir::getFlattenedAffineExprs ( IntegerSet set,
std::vector< SmallVector< int64_t, 8 > > * flattenedExprs,
FlatLinearConstraints * cst = nullptr )

◆ getFlattenedTypes()

SmallVector< Type, 10 > mlir::getFlattenedTypes ( TupleType t)

Get the types within a nested Tuple.

A helper for the class method that handles storage concerns, which is tricky to do in tablegen.

Definition at line 39 of file TypeUtilities.cpp.

◆ getForwardSlice() [1/2]

void mlir::getForwardSlice ( Operation * op,
SetVector< Operation * > * forwardSlice,
const ForwardSliceOptions & options = {} )

Fills forwardSlice with the computed forward slice (i.e.

all the transitive uses of op), without including that operation.

This additionally takes a TransitiveFilter which acts as a frontier: when looking at uses transitively, an operation that does not pass the filter is never propagated through. This allows in particular to carve out the scope within a ForOp or the scope within an IfOp.

The implementation traverses the use chains in postorder traversal for efficiency reasons: if an operation is already in forwardSlice, no need to traverse its uses again. In the presence of use-def cycles in a graph region, the traversal stops at the first operation that was already visited (which is not added to the slice anymore).

Upon return to the root call, forwardSlice is filled with a postorder list of uses (i.e. a reverse topological order). To get a proper topological order, we just reverse the order in forwardSlice before returning.

Example starting from node 0

          0

___________|___________ 1 2 3 4 |_______| |______| | | | | 5 6 |___|_____________| | | 7 8 |_______________| | 9

Assuming all local orders match the numbering order:

  1. after getting back to the root getForwardSlice, forwardSlice may contain: {9, 7, 8, 5, 1, 2, 6, 3, 4}
  2. reversing the result of 1. gives: {4, 3, 6, 2, 1, 5, 8, 7, 9}

Definition at line 74 of file SliceAnalysis.cpp.

References getForwardSliceImpl(), and options.

Referenced by computeDestructuringInfo(), getSlice(), getSliceContract(), hoistOpsBetween(), mlir::linalg::hoistRedundantVectorTransfers(), mlir::query::matcher::PredicateForwardSliceMatcher< BaseMatcher, Filter >::match(), and promoteSingleIterReductionLoop().

◆ getForwardSlice() [2/2]

void mlir::getForwardSlice ( Value root,
SetVector< Operation * > * forwardSlice,
const ForwardSliceOptions & options = {} )

Value-rooted version of getForwardSlice.

Return the union of all forward slices for the uses of the value root.

Definition at line 92 of file SliceAnalysis.cpp.

References getForwardSliceImpl(), mlir::Value::getUsers(), and options.

◆ getI64SubArray()

SmallVector< int64_t > mlir::getI64SubArray ( ArrayAttr arrayAttr,
unsigned dropFront = 0,
unsigned dropBack = 0 )

◆ getInnermostParallelLoops()

bool mlir::getInnermostParallelLoops ( Operation * rootOp,
SmallVectorImpl< scf::ParallelOp > & result )

Get a list of innermost parallel loops contained in rootOp.

Innermost parallel loops are those that do not contain further parallel loops themselves.

Definition at line 240 of file Utils.cpp.

References getInnermostParallelLoops(), mlir::Operation::getRegions(), and result.

Referenced by getInnermostParallelLoops().

◆ getIntValueRanges()

SmallVector< IntegerValueRange > mlir::getIntValueRanges ( ArrayRef< OpFoldResult > values,
GetIntRangeFn getIntRange,
int32_t indexBitwidth )

Helper function to collect the integer range values of an array of op fold results.

Definition at line 150 of file InferIntRangeInterface.cpp.

References mlir::ConstantIntRanges::constant().

◆ getLinearizedDimensions()

llvm::SmallBitVector mlir::getLinearizedDimensions ( ArrayRef< ReassociationIndices > reassociationIndices)

Determine which dimensions are linearized by a tensor.collapse_shape op by inspecting its reassociation indices.

Definition at line 549 of file ReshapeOpsUtils.cpp.

References result.

Referenced by mlir::tensor::ExtractSliceFromCollapseHelper::create().

◆ getMaxDimAndSymbol()

template<typename AffineExprContainer>
void mlir::getMaxDimAndSymbol ( ArrayRef< AffineExprContainer > exprsList,
int64_t & maxDim,
int64_t & maxSym )
static

Calculates maximum dimension and symbol positions from the expressions in exprsLists and stores them in maxDim and maxSym respectively.

Definition at line 697 of file AffineMap.h.

Referenced by inferFromExprList(), mlir::sparse_tensor::ir_detail::Ranks::isValid(), and willBeValidAffineMap().

◆ getMixedValues() [1/2]

SmallVector< OpFoldResult > mlir::getMixedValues ( ArrayRef< int64_t > staticValues,
ValueRange dynamicValues,
Builder & b )

Definition at line 218 of file StaticValueUtils.cpp.

References b, and getMixedValues().

◆ getMixedValues() [2/2]

SmallVector< OpFoldResult > mlir::getMixedValues ( ArrayRef< int64_t > staticValues,
ValueRange dynamicValues,
MLIRContext * context )

Return a vector of OpFoldResults with the same size a staticValues, but all elements for which ShapedType::isDynamic is true, will be replaced by dynamicValues.

Return a vector of OpFoldResults with the same size as staticValues, but all elements for which ShapedType::isDynamic is true, will be replaced by dynamicValues.

Definition at line 198 of file StaticValueUtils.cpp.

Referenced by getMixedValues(), inferExpandShapeOutputShape(), and mlir::ComposeExpandOfCollapseOp< ExpandOpTy, CollapseOpTy >::matchAndRewrite().

◆ getMultiAffineFunctionFromMap()

◆ getOffsetsSizesAndStrides()

std::tuple< SmallVector< OpFoldResult >, SmallVector< OpFoldResult >, SmallVector< OpFoldResult > > mlir::getOffsetsSizesAndStrides ( ArrayRef< Range > ranges)

Given an array of Range values, return a tuple of (offset vector, sizes vector, and strides vector) formed by separating out the individual elements of each range.

Definition at line 26 of file StaticValueUtils.cpp.

◆ getOrCreateRanges()

SmallVector< Range, 8 > mlir::getOrCreateRanges ( OffsetSizeAndStrideOpInterface op,
OpBuilder & b,
Location loc )

Return the list of Range (i.e.

offset, size, stride). Each Range entry contains either the dynamic value or a ConstantIndexOp constructed with b at location loc.

Definition at line 3182 of file MemRefOps.cpp.

References b, and mlir::arith::ConstantIndexOp::create().

◆ getOrCreateStringConstant()

LLVM::GlobalOp mlir::getOrCreateStringConstant ( OpBuilder & b,
Location loc,
Operation * moduleOp,
Type llvmI8,
StringRef namePrefix,
StringRef str,
uint64_t alignment = 0,
unsigned addrSpace = 0 )

Create a global that contains the given string.

If a global with the same string already exists in the module, return that global.

Definition at line 48 of file GPUOpsLowering.cpp.

References b, mlir::Region::front(), mlir::Region::getOps(), mlir::Operation::getRegion(), and getUniqueSymbolName().

Referenced by mlir::GPUPrintfOpToHIPLowering::matchAndRewrite(), mlir::GPUPrintfOpToLLVMCallLowering::matchAndRewrite(), and mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite().

◆ getOrDefineFunction()

LLVM::LLVMFuncOp mlir::getOrDefineFunction ( Operation * moduleOp,
Location loc,
OpBuilder & b,
StringRef name,
LLVM::LLVMFunctionType type )

Note that these functions don't take a SymbolTable because GPU module lowerings can have name collisions as an intermediate state.

Find or create an external function declaration in the given module.

Definition at line 23 of file GPUOpsLowering.cpp.

References b, mlir::Region::front(), mlir::Operation::getRegion(), and mlir::SymbolTable::lookupSymbolIn().

Referenced by mlir::GPUPrintfOpToHIPLowering::matchAndRewrite(), mlir::GPUPrintfOpToLLVMCallLowering::matchAndRewrite(), and mlir::GPUPrintfOpToVPrintfLowering::matchAndRewrite().

◆ getPerfectlyNestedLoops()

void mlir::getPerfectlyNestedLoops ( SmallVectorImpl< scf::ForOp > & nestedLoops,
scf::ForOp root )

Get perfectly nested sequence of loops starting at root of loop nest (the first op being another AffineFor, and the second op - a terminator).

A loop is perfectly nested iff: the first op in the loop's body is another AffineForOp, and the second op is a terminator).

Definition at line 1326 of file Utils.cpp.

References getPerfectlyNestedLoopsImpl().

Referenced by coalescePerfectlyNestedSCFForLoops().

◆ getPositionsOfShapeOne()

llvm::SmallBitVector mlir::getPositionsOfShapeOne ( unsigned rank,
ArrayRef< int64_t > shape )

Definition at line 90 of file Utils.cpp.

◆ getProjectedMap()

AffineMap mlir::getProjectedMap ( AffineMap map,
const llvm::SmallBitVector & projectedDimensions,
bool compressDimsFlag = true,
bool compressSymbolsFlag = true )

Calls projectDims(map, projectedDimensions, compressDimsFlag).

If compressSymbolsFlag is true, additionally call compressUnusedSymbols.

Definition at line 913 of file AffineMap.cpp.

References compressUnusedSymbols(), and projectDims().

◆ getPrunedAttributeList()

SmallVector< NamedAttribute > mlir::getPrunedAttributeList ( Operation * op,
ArrayRef< StringRef > elidedAttrs )

Definition at line 220 of file StructuredOpsUtils.cpp.

References mlir::Operation::getAttrs().

Referenced by mlir::tensor::bubbleUpPadSlice().

◆ getReassociationAttrName()

StringRef mlir::getReassociationAttrName ( )
constexpr

Attribute name for the ArrayAttr which encodes reassociation indices.

Definition at line 32 of file ReshapeOpsUtils.h.

◆ getReassociationIndicesAttribute()

ArrayAttr mlir::getReassociationIndicesAttribute ( Builder & b,
ArrayRef< ReassociationIndices > reassociation )

Wraps a list of reassociations in an ArrayAttr.

Definition at line 423 of file ReshapeOpsUtils.cpp.

References ArrayAttr(), b, and indices.

◆ getReassociationIndicesForCollapse()

std::optional< SmallVector< ReassociationIndices > > mlir::getReassociationIndicesForCollapse ( ArrayRef< int64_t > sourceShape,
ArrayRef< int64_t > targetShape )

Returns the reassociation maps to collapse sourceShape to targetShape if possible.

Definition at line 291 of file ReshapeOpsUtils.cpp.

References findReassociationRangesForCollapse().

Referenced by getReassociationIndicesForReshape().

◆ getReassociationIndicesForReshape()

std::optional< SmallVector< ReassociationIndices > > mlir::getReassociationIndicesForReshape ( ShapedType sourceType,
ShapedType targetType )

Return the reassociations maps to use to reshape given the source type and the target type when possible.

Return std::nullopt when this computation failed.

Definition at line 23 of file ReshapeOpsUtils.cpp.

References getReassociationIndicesForCollapse().

◆ getSCFMinMaxExpr()

std::optional< std::pair< AffineExpr, AffineExpr > > mlir::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.

if loopFilter is passed, the filter determines which loop to consider. Other induction variables are ignored.

◆ getSimplifiedOfrAndStaticSizePair()

std::pair< int64_t, OpFoldResult > mlir::getSimplifiedOfrAndStaticSizePair ( OpFoldResult ofr,
Builder & b )

Given OpFoldResult representing dim size value (*), generates a pair of sizes:

  • 1st result, static value, contains an int64_t dim size that can be used to build ShapedType (ShapedType::kDynamic is used for truly dynamic dims),
  • 2nd result, dynamic value, contains OpFoldResult encapsulating the actual dim size (either original or updated input value). For input sizes for which it is possible to extract a constant Attribute, replaces the original size value with an integer attribute (unless it's already a constant Attribute). The 1st return value also becomes the actual integer size (as opposed ShapedType::kDynamic).

(*) This hook is usually used when, given input sizes as OpFoldResult, it's required to generate two vectors:

  • sizes as int64_t to generate a shape,
  • sizes as OpFoldResult for sizes-like attribute. Please update this comment if you identify other use cases.

Definition at line 59 of file StaticValueUtils.cpp.

References b, and getConstantIntValue().

Referenced by mlir::linalg::DecomposeOuterUnitDimsPackOpPattern::matchAndRewrite().

◆ getSinglyExecutedRegionsToSink()

void mlir::getSinglyExecutedRegionsToSink ( RegionBranchOpInterface branch,
SmallVectorImpl< Region * > & regions )

Populates regions with regions of the provided region branch op that are executed at most once at that are reachable given the current operands of the op.

These regions can be passed to controlFlowSink to perform sinking on the regions of the operation.

Definition at line 140 of file ControlFlowSinkUtils.cpp.

References mlir::InvocationBounds::getUpperBound(), m_Constant(), and matchPattern().

◆ getSlice()

SetVector< Operation * > mlir::getSlice ( Operation * op,
const BackwardSliceOptions & backwardSliceOptions = {},
const ForwardSliceOptions & forwardSliceOptions = {} )

Iteratively computes backward slices and forward slices until a fixed point is reached.

Returns an SetVector<Operation *> which includes the original operation.

This allows building a slice (i.e. multi-root DAG where everything that is reachable from an Value in forward and backward direction is contained in the slice). This is the abstraction we need to materialize all the operations for supervectorization without worrying about orderings and Value replacements.

Example starting from any node

1 2 3 4 |_______| |______| | | | | | 5 6___| |___|_____________| | | | | 7 8 | |_______________| | | | 9 10

Return the whole DAG in some topological order.

The implementation works by just filling up a worklist with iterative alternate calls to getBackwardSlice and getForwardSlice.

The following section describes some additional implementation considerations for a potentially more efficient implementation but they are just an intuition without proof, we still use a worklist for now.

Additional implementation considerations

Consider the defs-op-uses hourglass.


\ / defs (in some topological order) \/ op /\ / \ uses (in some topological order) /____\

We want to iteratively apply getSlice to construct the whole list of Operation that are reachable by (use|def)+ from op. We want the resulting slice in topological order. Ideally we would like the ordering to be maintained in-place to avoid copying Operation at each step. Keeping this ordering by construction seems very unclear, so we list invariants in the hope of seeing whether useful properties pop up.

In the following: we use |= for set inclusion; we use << for set topological ordering (i.e. each pair is ordered).

Assumption:

We wish to maintain the following property by a recursive argument: """ defs << {op} <<uses are in topological order. """ The property clearly holds for 0 and 1-sized uses and defs;

Invariants:

  1. defs and uses are in topological order internally, by construction;
  2. for any {x} |= defs, defs(x) |= defs; because all go through op
  3. for any {x} |= uses, defs |= defs(x); because all go through op
  4. for any {x} |= defs, uses |= uses(x); because all go through op
  5. for any {x} |= uses, uses(x) |= uses; because all go through op

Intuitively, we should be able to recurse like: preorder(defs) - op - postorder(uses) and keep things ordered but this is still hand-wavy and not worth the trouble for now: punt to a simple worklist-based solution.

Definition at line 206 of file SliceAnalysis.cpp.

References getBackwardSlice(), getForwardSlice(), result, and topologicalSort().

◆ getSlicedDimensions()

llvm::SmallBitVector mlir::getSlicedDimensions ( ArrayRef< OpFoldResult > sliceInputShape,
ArrayRef< Range > sliceParams )

The input parameters offsets, sizes, strides specify a rectangular non rank-reducing slice of the collapse_shape output.

Try to find which dimensions have been sliced and which dimensions are not sliced (offset = 0, size = dim, size = 1). Note that this conservative as it cannot detect if a dynamic size corresponds to the full tensor dimension or not.

Definition at line 532 of file ReshapeOpsUtils.cpp.

References getConstantIntValue(), and isEqualConstantIntOrValue().

Referenced by mlir::tensor::ExtractSliceFromCollapseHelper::create().

◆ getSymbolLessAffineMaps()

SmallVector< AffineMap, 4 > mlir::getSymbolLessAffineMaps ( ArrayRef< ReassociationExprs > reassociation)

Constructs affine maps out of Array<Array<AffineExpr>>.

Definition at line 447 of file ReshapeOpsUtils.cpp.

References mlir::AffineMap::get(), getContext(), and getMaxPosOfType().

◆ getType()

Type mlir::getType ( OpFoldResult ofr)

Returns the int type of the integer in ofr.

Other attribute types are not supported.

Definition at line 304 of file Utils.cpp.

Referenced by mlir::sparse_tensor::allocaBuffer(), mlir::memref::allocToAlloca(), mlir::DenseElementsAttr::bitcast(), convertElementwiseOp(), mlir::LLVM::detail::createIntrinsicCall(), createSingleExitingLatch(), mlir::xegpu::createVectorWithShapeFromValues(), denormalizeInductionVariable(), mlir::spirv::Deserializer::processOp< spirv::FunctionCallOp >(), mlir::spirv::Deserializer::processOp< spirv::GenericCastToPtrExplicitOp >(), mlir::linalg::dropUnitDims(), emitNormalizedLoopBounds(), fuse(), mlir::affine::AffineDmaStartOp::getDstMemorySpace(), mlir::affine::AffineDmaStartOp::getDstMemRefRank(), mlir::affine::AffineDmaStartOp::getDstMemRefType(), mlir::DenseElementsAttr::getElementType(), mlir::sparse_tensor::getMemRefType(), mlir::DenseElementsAttr::getNumElements(), getProductOfIntsOrIndexes(), mlir::sparse_tensor::getRankedTensorType(), mlir::affine::AffineDmaStartOp::getSrcMemorySpace(), mlir::affine::AffineDmaStartOp::getSrcMemRefType(), mlir::affine::AffineDmaStartOp::getTagMemRefRank(), mlir::affine::AffineDmaWaitOp::getTagMemRefRank(), mlir::affine::AffineDmaStartOp::getTagMemRefType(), mlir::affine::AffineDmaWaitOp::getTagMemRefType(), handleMultidimensionalVectors(), isContiguousXferOp(), mlir::DenseFPElementsAttr::mapValues(), mlir::DenseIntElementsAttr::mapValues(), ConsolidateTransposeOptimization::matchAndRewrite(), mlir::spirv::Deserializer::materializeSpecConstantOperation(), mlirLLVMDISubprogramAttrGetType(), mlirTransformParamTypeGetType(), mlirTupleTypeGetType(), mlirValueGetType(), mlir::spirv::Deserializer::processArrayType(), mlir::spirv::Deserializer::processConstant(), mlir::spirv::Deserializer::processConstantComposite(), mlir::spirv::Deserializer::processConstantCompositeReplicateEXT(), mlir::spirv::Deserializer::processConstantNull(), mlir::spirv::Deserializer::processCooperativeMatrixTypeKHR(), mlir::spirv::Deserializer::processFunction(), mlir::spirv::Deserializer::processFunctionType(), mlir::spirv::Deserializer::processGlobalVariable(), mlir::spirv::Deserializer::processGraphARM(), mlir::spirv::Deserializer::processGraphConstantARM(), mlir::spirv::Deserializer::processGraphTypeARM(), mlir::spirv::Deserializer::processImageType(), mlir::spirv::Deserializer::processMatrixType(), mlir::spirv::Deserializer::processOpTypePointer(), mlir::spirv::Deserializer::processOpWithoutGrammarAttr(), mlir::spirv::Deserializer::processPhi(), mlir::spirv::Deserializer::processRuntimeArrayType(), mlir::spirv::Deserializer::processSampledImageType(), mlir::spirv::Deserializer::processSpecConstantComposite(), mlir::spirv::Deserializer::processSpecConstantCompositeReplicateEXT(), mlir::spirv::Deserializer::processSpecConstantOperation(), mlir::spirv::Deserializer::processStructType(), mlir::spirv::Deserializer::processTensorARMType(), mlir::spirv::Deserializer::processType(), mlir::spirv::Deserializer::processUndef(), reduceMatchAndRewriteHelper(), reifyMixedParamAndHandleResults(), mlir::DenseElementsAttr::reshape(), mlir::DenseElementsAttr::resizeSplat(), mlir::linalg::rewriteInIm2Col(), mlir::linalg::rewriteInIm2Col(), mlir::linalg::rewriteInIm2Col(), mlir::StructBuilder::StructBuilder(), mlir::DenseElementsAttr::tryGetComplexFloatValues(), mlir::DenseElementsAttr::tryGetComplexIntValues(), mlir::DenseElementsAttr::tryGetFloatValues(), useOperandGroup(), verifyImageOperands(), mlir::affine::AffineDmaStartOp::verifyInvariantsImpl(), mlir::affine::AffineDmaWaitOp::verifyInvariantsImpl(), and mlir::detail::verifyLoopLikeOpInterface().

◆ getUnusedDimsBitVector()

llvm::SmallBitVector mlir::getUnusedDimsBitVector ( ArrayRef< AffineMap > maps)

Definition at line 923 of file AffineMap.cpp.

Referenced by compressUnusedDims(), and verifyOutputShape().

◆ getUnusedSymbolsBitVector()

llvm::SmallBitVector mlir::getUnusedSymbolsBitVector ( ArrayRef< AffineMap > maps)

Definition at line 935 of file AffineMap.cpp.

Referenced by compressUnusedSymbols().

◆ getUsedValuesDefinedAbove() [1/2]

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

Definition at line 77 of file RegionUtils.cpp.

References getUsedValuesDefinedAbove().

◆ getUsedValuesDefinedAbove() [2/2]

void mlir::getUsedValuesDefinedAbove ( Region & region,
Region & limit,
SetVector< Value > & values )

◆ getValueOrCreateCastToIndexLike()

Value mlir::getValueOrCreateCastToIndexLike ( OpBuilder & b,
Location loc,
Type targetType,
Value value )

Create a cast from an index-like value (index or integer) to another index-like value.

If the value type and the target type are the same, it returns the original value.

Definition at line 119 of file Utils.cpp.

References b, mlir::Value::getType(), and mlir::Type::isIndex().

◆ getValueOrCreateConstantIndexOp() [1/2]

SmallVector< Value > mlir::getValueOrCreateConstantIndexOp ( OpBuilder & b,
Location loc,
ArrayRef< OpFoldResult > valueOrAttrVec )

Similar to the other overload, but converts multiple OpFoldResults into Values.

Definition at line 262 of file Utils.cpp.

References b, and getValueOrCreateConstantIndexOp().

◆ getValueOrCreateConstantIndexOp() [2/2]

Value mlir::getValueOrCreateConstantIndexOp ( OpBuilder & b,
Location loc,
OpFoldResult ofr )

◆ getValueOrCreateConstantIntOp()

Value mlir::getValueOrCreateConstantIntOp ( OpBuilder & b,
Location loc,
OpFoldResult ofr )

Converts an OpFoldResult to a Value.

Returns the fold result if it casts to a Value or creates a ConstantOp if it casts to an Integer Attribute. Other attribute types are not supported.

Definition at line 102 of file Utils.cpp.

References b.

Referenced by coalesceLoops(), collapseParallelLoops(), denormalizeInductionVariable(), and emitNormalizedLoopBounds().

◆ getValuesSortedByKey() [1/3]

SmallVector< int64_t > mlir::getValuesSortedByKey ( ArrayRef< Attribute > keys,
ArrayRef< int64_t > values,
llvm::function_ref< bool(Attribute, Attribute)> compare )

Definition at line 271 of file StaticValueUtils.cpp.

References getValuesSortedByKeyImpl().

◆ getValuesSortedByKey() [2/3]

SmallVector< OpFoldResult > mlir::getValuesSortedByKey ( ArrayRef< Attribute > keys,
ArrayRef< OpFoldResult > values,
llvm::function_ref< bool(Attribute, Attribute)> compare )

Definition at line 265 of file StaticValueUtils.cpp.

References getValuesSortedByKeyImpl().

◆ getValuesSortedByKey() [3/3]

SmallVector< Value > mlir::getValuesSortedByKey ( ArrayRef< Attribute > keys,
ArrayRef< Value > values,
llvm::function_ref< bool(Attribute, Attribute)> compare )

Helper to sort values according to matching keys.

Definition at line 259 of file StaticValueUtils.cpp.

References getValuesSortedByKeyImpl().

Referenced by rewriteOneForallCommonImpl().

◆ getValuesSortedByKeyImpl()

template<typename K, typename V>
SmallVector< V > mlir::getValuesSortedByKeyImpl ( ArrayRef< K > keys,
ArrayRef< V > values,
llvm::function_ref< bool(K, K)> compare )
static

Helper to sort values according to matching keys.

Definition at line 243 of file StaticValueUtils.cpp.

References indices.

Referenced by getValuesSortedByKey(), getValuesSortedByKey(), and getValuesSortedByKey().

◆ hasEffect() [1/3]

template<typename... EffectTys>
bool mlir::hasEffect ( Operation * op)

Returns "true" if op has an effect of type EffectTy.

Returns "false" if op has unknown effects. Recursive effects are not taken into account.

Definition at line 217 of file SideEffectInterfaces.cpp.

References mlir::SideEffects::EffectInstance< EffectT >::getEffect().

Referenced by mlir::affine::LoopNestStateCollector::collect(), mlir::memref::findDealloc(), mlir::bufferization::impl::BufferDeallocationSimplificationPassBase< DerivedT >::getDependentDialects(), mlir::affine::MemRefDependenceGraph::Node::getLoadOpCount(), mlir::affine::MemRefDependenceGraph::Node::getStoreOpCount(), mlir::affine::MemRefDependenceGraph::Node::hasStore(), mlir::transform::isHandleConsumed(), isOpLoopInvariant(), mightHaveEffect(), mightHaveEffect(), mightHaveEffect(), mlir::hasEffect< BlockArgument, MemoryEffects::Allocate >(), mlir::hasEffect< BlockArgument, MemoryEffects::Free >(), mlir::hasEffect< BlockArgument, MemoryEffects::Read >(), mlir::hasEffect< BlockArgument, MemoryEffects::Write >(), mlir::hasEffect< BlockArgument, MemoryEffects::Write, MemoryEffects::Free >(), mlir::hasEffect< MemoryEffects::Allocate >(), mlir::hasEffect< MemoryEffects::Allocate >(), mlir::hasEffect< MemoryEffects::Free >(), mlir::hasEffect< MemoryEffects::Free >(), mlir::hasEffect< MemoryEffects::Read >(), mlir::hasEffect< MemoryEffects::Read >(), mlir::hasEffect< MemoryEffects::Write >(), mlir::hasEffect< MemoryEffects::Write >(), mlir::hasEffect< MemoryEffects::Write, MemoryEffects::Free >(), mlir::hasEffect< MemoryEffects::Write, MemoryEffects::Free >(), mlir::hasEffect< OpOperand *, MemoryEffects::Allocate >(), mlir::hasEffect< OpOperand *, MemoryEffects::Free >(), mlir::hasEffect< OpOperand *, MemoryEffects::Read >(), mlir::hasEffect< OpOperand *, MemoryEffects::Write >(), mlir::hasEffect< OpOperand *, MemoryEffects::Write, MemoryEffects::Free >(), mlir::hasEffect< OpResult, MemoryEffects::Allocate >(), mlir::hasEffect< OpResult, MemoryEffects::Free >(), mlir::hasEffect< OpResult, MemoryEffects::Read >(), mlir::hasEffect< OpResult, MemoryEffects::Write >(), mlir::hasEffect< OpResult, MemoryEffects::Write, MemoryEffects::Free >(), mlir::memref::resultIsNotRead(), and mlir::transform::detail::verifyTransformOpInterface().

◆ hasEffect() [2/3]

template<typename... EffectTys>
bool mlir::hasEffect ( Operation * op,
Value value )

Returns "true" if op has an effect of type EffectTy on value.

Returns "false" if op has unknown effects. Recursive effects are not taken into account.

Definition at line 235 of file SideEffectInterfaces.cpp.

References mlir::SideEffects::EffectInstance< EffectT >::getEffect(), and mlir::SideEffects::EffectInstance< EffectT >::getValue().

◆ hasEffect() [3/3]

template<typename ValueTy, typename... EffectTys>
bool mlir::hasEffect ( Operation * op,
ValueTy value )

Returns "true" if op has an effect of type EffectTy on value of type ValueTy.

Returns "false" if op has unknown effects. Recursive effects are not taken into account.

Definition at line 257 of file SideEffectInterfaces.cpp.

References mlir::SideEffects::EffectInstance< EffectT >::getEffect(), and mlir::SideEffects::EffectInstance< EffectT >::getEffectValue().

◆ hash_value() [1/12]

◆ hash_value() [2/12]

inline ::llvm::hash_code mlir::hash_value ( AffineMap arg)

Definition at line 425 of file AffineMap.h.

◆ hash_value() [3/12]

inline ::llvm::hash_code mlir::hash_value ( Attribute arg)

Definition at line 155 of file Attributes.h.

References mlir::Attribute::impl.

◆ hash_value() [4/12]

llvm::hash_code mlir::hash_value ( const AsmDialectResourceHandle & param)
inline

Definition at line 110 of file OpImplementation.h.

References mlir::AsmDialectResourceHandle::getResource().

◆ hash_value() [5/12]

inline ::llvm::hash_code mlir::hash_value ( const NamedAttribute & arg)

Definition at line 214 of file Attributes.h.

◆ hash_value() [6/12]

inline ::llvm::hash_code mlir::hash_value ( IntegerSet arg)

Definition at line 124 of file IntegerSet.h.

◆ hash_value() [7/12]

inline ::llvm::hash_code mlir::hash_value ( Location arg)

Definition at line 122 of file Location.h.

References hash_value(), and mlir::Location::impl.

◆ hash_value() [8/12]

llvm::hash_code mlir::hash_value ( OperationName arg)
inline

Definition at line 513 of file OperationSupport.h.

References mlir::OperationName::getAsOpaquePointer().

◆ hash_value() [9/12]

inline ::llvm::hash_code mlir::hash_value ( Type arg)

Definition at line 302 of file Types.h.

References mlir::Type::impl.

◆ hash_value() [10/12]

inline ::llvm::hash_code mlir::hash_value ( TypeID id)

Enable hashing TypeID.

Definition at line 152 of file TypeID.h.

◆ hash_value() [11/12]

inline ::llvm::hash_code mlir::hash_value ( TypeRange arg)

Make TypeRange hashable.

Definition at line 74 of file TypeRange.h.

◆ hash_value() [12/12]

inline ::llvm::hash_code mlir::hash_value ( Value arg)

Make Value hashable.

Definition at line 490 of file Value.h.

References mlir::Value::getImpl().

◆ hasSingleEffect() [1/3]

◆ hasSingleEffect() [2/3]

template<typename EffectTy>
bool mlir::hasSingleEffect ( Operation * op,
Value value )

Returns "true" if op has only an effect of type EffectTy on value.

Returns "false" if op has unknown effects or other/additional effects. Recursive effects are not taken into account.

Definition at line 135 of file SideEffectInterfaces.cpp.

◆ hasSingleEffect() [3/3]

template<typename ValueTy, typename EffectTy>
bool mlir::hasSingleEffect ( Operation * op,
ValueTy value )

Returns "true" if op has only an effect of type EffectTy on value of type ValueTy.

Returns "false" if op has unknown effects or other/additional effects. Recursive effects are not taken into account.

Definition at line 164 of file SideEffectInterfaces.cpp.

◆ hasUnknownEffects()

bool mlir::hasUnknownEffects ( Operation * op)

Return "true" if op has unknown effects.

I.e., the effects of the operation itself are unknown and the operation does not derive its effects from its nested operations. (HasRecursiveMemoryEffects trait is not implemented or it is unknown whether it is implemented or not.)

Definition at line 307 of file SideEffectInterfaces.cpp.

References mlir::Operation::hasTrait().

Referenced by mightHaveEffect(), mightHaveEffect(), and mightHaveEffect().

◆ hasValidSizesOffsets()

bool mlir::hasValidSizesOffsets ( SmallVector< int64_t > sizesOrOffsets)

Helper function to check whether the passed in sizes or offsets are valid.

This can be used to re-check whether dimensions are still valid after constant folding the dynamic dimensions.

Definition at line 383 of file StaticValueUtils.cpp.

◆ hasValidStrides()

bool mlir::hasValidStrides ( SmallVector< int64_t > strides)

Helper function to check whether the passed in strides are valid.

This can be used to re-check whether dimensions are still valid after constant folding the dynamic dimensions.

Definition at line 389 of file StaticValueUtils.cpp.

◆ hoistLoopInvariantSubsets()

LoopLikeOpInterface mlir::hoistLoopInvariantSubsets ( RewriterBase & rewriter,
LoopLikeOpInterface loopLike )

Hoist loop-invariant tensor subsets (subset extraction and subset insertion ops) from loop-like ops.

Extraction ops are moved before the loop. Insertion ops are moved after the loop. The loop body operates on newly added region iter_args (one per extraction-insertion pair).

A subset extraction op (SubsetExtractionOpInterface) extracts from a tensor value at a subset. The result of the op may have an arbitrary type, i.e., not necessarily a tensor type. Example: "tensor.extract_slice".

A subset insertion op (SubsetInsertionOpInterface) inserts into a tensor value ("destination") at a subset. Example: "tensor.insert_slice".

Matching extraction-insertion subset ops can be hoisted from a loop if there are no other ops within the loop that operate on the same or on an overlapping subset. In particular, non-subset ops can prevent hoisting because the analysis does not know what subset they operate on.

Example:

%r = scf.for ... iter_args(%t = %a) -> (tensor<?xf32>) {
%0 = tensor.extract_slice %t[0][5][1] : tensor<?xf32> to tensor<5xf32>
%1 = "test.foo"(%0) : (tensor<5xf32>) -> (tensor<5xf32>)
%2 = tensor.insert_slice %1 into %t[0][5][1]
: tensor<5xf32> into tensor<?xf32>
scf.yield %2 : tensor<?xf32>
}

Is rewritten to:

%0 = tensor.extract_slice %a[0][5][1] : tensor<?xf32> to tensor<5xf32>
%new_loop:2 = scf.for ... iter_args(%t = %a, %h = %0) -> (tensor<?xf32>) {
%1 = "test.foo"(%h) : (tensor<5xf32>) -> (tensor<5xf32>)
scf.yield %t, %2 : tensor<?xf32>, tensor<5xf32>
}
%r = tensor.insert_slice %new_loop#1 into %new_loop#0
: tensor<5xf32> into tensor<?xf32>

Definition at line 395 of file LoopInvariantCodeMotionUtils.cpp.

References hoistSubsetAtIterArg().

◆ inferExpandShapeOutputShape()

std::optional< SmallVector< OpFoldResult > > mlir::inferExpandShapeOutputShape ( OpBuilder & b,
Location loc,
ShapedType expandedType,
ArrayRef< ReassociationIndices > reassociation,
ArrayRef< OpFoldResult > inputShape )

Infer the output shape for a {memref|tensor}.expand_shape when it is possible to do so.

Note: This should only be used to implement ExpandShapeOp::inferOutputShape in both the memref and tensor namespaces. If you need to infer the output shape you should use the static method of ExpandShapeOp instead of calling this.

inputShape is the shape of the tensor or memref being expanded as a sequence of SSA values or constants. expandedType is the output shape of the expand_shape operation. reassociation is the reassociation denoting the output dims each input dim is mapped to.

Returns the output shape in outputShape and staticOutputShape, following the conventions for the output_shape and static_output_shape inputs to the expand_shape ops.

Definition at line 23 of file Utils.cpp.

References b, mlir::arith::ConstantIndexOp::create(), and getMixedValues().

◆ inlineCall()

LogicalResult mlir::inlineCall ( InlinerInterface & interface,
function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback,
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.

This function returns failure if inlining is not possible, success otherwise. On failure, no changes are made to the module. 'shouldCloneInlinedRegion' corresponds to whether the source region should be cloned into the 'call' or spliced directly.

Definition at line 479 of file InliningUtils.cpp.

References mlir::Region::empty(), mlir::Region::front(), mlir::Value::getDefiningOp(), mlir::DialectInterfaceCollection< InterfaceType >::getInterfaceFor(), mlir::Value::getType(), inlineRegionImpl(), mlir::InlinerInterface::isLegalToInline(), mlir::IRMapping::map(), materializeConversion(), mlir::Value::replaceAllUsesWith(), mlir::Operation::replaceUsesOfWith(), mlir::OpBuilder::setInsertionPointAfter(), and success().

◆ inlineRegion() [1/4]

LogicalResult mlir::inlineRegion ( InlinerInterface & interface,
function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback,
Region * src,
Block * inlineBlock,
Block::iterator inlinePoint,
IRMapping & mapper,
ValueRange resultsToReplace,
TypeRange regionResultTypes,
std::optional< Location > inlineLoc = std::nullopt,
bool shouldCloneInlinedRegion = true )

Definition at line 418 of file InliningUtils.cpp.

References inlineRegionImpl().

◆ inlineRegion() [2/4]

LogicalResult mlir::inlineRegion ( InlinerInterface & interface,
function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback,
Region * src,
Block * inlineBlock,
Block::iterator inlinePoint,
ValueRange inlinedOperands,
ValueRange resultsToReplace,
std::optional< Location > inlineLoc = std::nullopt,
bool shouldCloneInlinedRegion = true )

Definition at line 440 of file InliningUtils.cpp.

References inlineRegionImpl().

◆ inlineRegion() [3/4]

LogicalResult mlir::inlineRegion ( InlinerInterface & interface,
function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback,
Region * src,
Operation * inlinePoint,
IRMapping & mapper,
ValueRange resultsToReplace,
TypeRange regionResultTypes,
std::optional< Location > inlineLoc = std::nullopt,
bool shouldCloneInlinedRegion = true )

This function inlines a region, 'src', into another.

This function returns failure if it is not possible to inline this function. If the function returned failure, then no changes to the module have been made.

The provided 'inlinePoint' must be within a region, and corresponds to the location where the 'src' region should be inlined. 'mapping' contains any remapped operands that are used within the region, and must include remappings for the entry arguments to the region. 'resultsToReplace' corresponds to any results that should be replaced by terminators within the inlined region. 'regionResultTypes' specifies the expected return types of the terminators in the region. 'inlineLoc' is an optional Location that, if provided, will be used to update the inlined operations' location information. 'shouldCloneInlinedRegion' corresponds to whether the source region should be cloned into the 'inlinePoint' or spliced directly.

Definition at line 407 of file InliningUtils.cpp.

References mlir::Operation::getBlock(), and inlineRegion().

Referenced by inlineRegion(), and inlineRegion().

◆ inlineRegion() [4/4]

LogicalResult mlir::inlineRegion ( InlinerInterface & interface,
function_ref< InlinerInterface::CloneCallbackSigTy > cloneCallback,
Region * src,
Operation * inlinePoint,
ValueRange inlinedOperands,
ValueRange resultsToReplace,
std::optional< Location > inlineLoc = std::nullopt,
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.

Definition at line 429 of file InliningUtils.cpp.

References mlir::Operation::getBlock(), and inlineRegion().

◆ insertTypesInto()

TypeRange mlir::insertTypesInto ( TypeRange oldTypes,
ArrayRef< unsigned > indices,
TypeRange newTypes,
SmallVectorImpl< Type > & storage )

Insert a set of newTypes into oldTypes at the given indices.

If any types are inserted, storage is used to hold the new type list. The new type list is returned. indices must be sorted by increasing index.

Definition at line 175 of file TypeUtilities.cpp.

References indices.

◆ insideMutuallyExclusiveRegions()

bool mlir::insideMutuallyExclusiveRegions ( Operation * a,
Operation * b )

Return true if a and b are in mutually exclusive regions as per RegionBranchOpInterface.

Return true if a and b are in mutually exclusive regions.

  1. Find the first common of a and b (ancestor) that implements RegionBranchOpInterface.
  2. Determine the regions regionA and regionB in which a and b are contained.
  3. Check if regionA and regionB are mutually exclusive. They are mutually exclusive if they are not reachable from each other as per RegionBranchOpInterface::getSuccessorRegions.

Definition at line 106 of file BufferizableOpInterface.cpp.

References insideMutuallyExclusiveRegions(), and result.

Referenced by insideMutuallyExclusiveRegions().

◆ inverseAndBroadcastProjectedPermutation()

AffineMap mlir::inverseAndBroadcastProjectedPermutation ( AffineMap map)

Return the reverse map of a projected permutation where the projected dimensions are transformed into 0s.

Prerequisites: map must be a projected permutation.

Example 1:

affine_map<(d0, d1, d2, d3) -> (d2, d0)>

returns:

affine_map<(d0, d1) -> (d1, 0, d0, 0)>

Example 2:

affine_map<(d0, d1, d2, d3) -> (d0, d3)>

returns:

affine_map<(d0, d1) -> (d0, 0, 0, d1)>

Example 3:

affine_map<(d0, d1, d2, d3) -> (d2)>

returns:

affine_map<(d0) -> (0, 0, d0, 0)>

Example 4:

affine_map<(d0, d1, d2) -> (d0, 0)>

returns:

affine_map<(d0, d1) -> (d0, 0, 0)>

Definition at line 808 of file AffineMap.cpp.

References mlir::AffineMap::get(), getAffineConstantExpr(), getAffineDimExpr(), mlir::AffineMap::getContext(), mlir::AffineMap::getDimPosition(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getResult(), and mlir::AffineMap::isProjectedPermutation().

Referenced by vectorizeAsLinalgGeneric().

◆ inversePermutation()

AffineMap mlir::inversePermutation ( AffineMap map)

Returns a map of codomain to domain dimensions such that the first codomain dimension for a particular domain dimension is selected.

Returns an empty map if the input map is empty. Returns null map (not empty map) if map is not invertible (i.e. map does not contain a subset that is a permutation of full domain rank).

Prerequisites:

  1. map has no symbols.

Example 1:

(d0, d1, d2) -> (d1, d1, d0, d2, d1, d2, d1, d0)
0 2 3

returns:

(d0, d1, d2, d3, d4, d5, d6, d7) -> (d2, d0, d3)

Example 2:

(d0, d1, d2) -> (d1, d0 + d1, d0, d2, d1, d2, d1, d0)
0 2 3

returns:

(d0, d1, d2, d3, d4, d5, d6, d7) -> (d2, d0, d3)

Definition at line 784 of file AffineMap.cpp.

References mlir::AffineMap::get(), getAffineDimExpr(), mlir::AffineMap::getContext(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), mlir::AffineMap::getResults(), and mlir::AffineMap::isEmpty().

Referenced by buildVectorWrite(), mlir::linalg::detail::canOpOperandsBeDroppedImpl(), mlir::linalg::dropUnitDims(), mlir::linalg::fuseElementwiseOps(), getIndexingMapOfProducerOperandsInCoordinatesOfFusedOp(), mlir::sparse_tensor::inferLvlToDim(), mlir::vector::inferTransferOpMaskType(), mlir::linalg::interchangeGenericOp(), interchangeGenericOpPrecondition(), isOpOperandCanBeDroppedAfterFusedLinalgs(), mlir::linalg::rewriteInIm2Col(), tileLinalgOpImpl(), and vectorizeAsLinalgGeneric().

◆ invertPermutationVector()

◆ isBatchMatvec()

bool mlir::isBatchMatvec ( ArrayAttr indexingMaps)

Tests whether the given maps describe a batch matrix vector multiplication.

The test is permutation-invariant. Note that this only checks the affine maps from an operation, so does not perform any checks on the math being performed within the reduction.

Definition at line 172 of file StructuredOpsUtils.cpp.

References ArrayAttr(), b, mlir::AffineMap::get(), mlir::AffineExpr::getContext(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), and mlir::AffineMap::getResult().

◆ isBatchVecmat()

bool mlir::isBatchVecmat ( ArrayAttr indexingMaps)

Tests whether the given maps describe a batch vector matrix multiplication.

The test is permutation-invariant. Note that this only checks the affine maps from an operation, so does not perform any checks on the math being performed within the reduction.

Definition at line 123 of file StructuredOpsUtils.cpp.

References ArrayAttr(), b, mlir::AffineMap::get(), mlir::AffineExpr::getContext(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), and mlir::AffineMap::getResult().

◆ isBytecode()

bool mlir::isBytecode ( llvm::MemoryBufferRef buffer)

Returns true if the given buffer starts with the magic bytes that signal MLIR bytecode.

Definition at line 2655 of file BytecodeReader.cpp.

Referenced by readBytecodeFileImpl().

◆ isColumnMajorMatmul()

bool mlir::isColumnMajorMatmul ( ArrayAttr indexingMaps)

Tests whether the given maps describe a column major matmul.

The test is permutation-invariant. Note that this only checks the affine maps from an operation, so does not perform any checks on the math being performed within the reduction.

Definition at line 46 of file StructuredOpsUtils.cpp.

References ArrayAttr(), mlir::AffineMap::get(), mlir::AffineExpr::getContext(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), and mlir::AffineMap::getResult().

◆ isConstantIntValue()

bool mlir::isConstantIntValue ( OpFoldResult ofr,
int64_t value )

Return true if ofr is constant integer equal to value.

Definition at line 155 of file StaticValueUtils.cpp.

References getConstantIntValue().

Referenced by areAllConstantIntValue(), checkTileSizes(), createInitialTensorsForTiling(), getSanitizedReductionDims(), isOneInteger(), and isZeroInteger().

◆ isEqualConstantIntOrValue()

bool mlir::isEqualConstantIntOrValue ( OpFoldResult ofr1,
OpFoldResult ofr2 )

Return true if ofr1 and ofr2 are the same integer constant attribute values or the same SSA value.

Ignore integer bitwitdh and type mismatch that come from the fact there is no IndexAttr and that IndexType have no bitwidth.

Ignore integer bitwidth and type mismatch that come from the fact there is no IndexAttr and that IndexType has no bitwidth.

Definition at line 176 of file StaticValueUtils.cpp.

References getConstantIntValue().

Referenced by mlir::bufferization::Ownership::getCombined(), getSlicedDimensions(), mlir::linalg::haveSameTiles(), and isEqualConstantIntOrValueArray().

◆ isEqualConstantIntOrValueArray()

bool mlir::isEqualConstantIntOrValueArray ( ArrayRef< OpFoldResult > ofrs1,
ArrayRef< OpFoldResult > ofrs2 )

Definition at line 185 of file StaticValueUtils.cpp.

References isEqualConstantIntOrValue().

◆ isIdentityPermutation()

bool mlir::isIdentityPermutation ( ArrayRef< int64_t > permutation)

Returns true if permutation is an identity permutation.

Definition at line 197 of file IndexingUtils.cpp.

Referenced by mlir::linalg::hasSameInnerOuterAttribute().

◆ isLegalForBranchOpInterfaceTypeConversionPattern()

bool mlir::isLegalForBranchOpInterfaceTypeConversionPattern ( Operation * op,
const TypeConverter & converter )

Return true if op is a BranchOpInterface op whose operands are all legal according to converter.

Definition at line 148 of file FuncConversions.cpp.

References mlir::Operation::getBlock(), and mlir::Block::getNumSuccessors().

◆ isLegalForReturnOpTypeConversionPattern()

bool mlir::isLegalForReturnOpTypeConversionPattern ( Operation * op,
const TypeConverter & converter,
bool returnOpAlwaysLegal = false )

For ReturnLike ops (except return), return True.

If op is a return && returnOpAlwaysLegal is false, legalize op according to converter. Otherwise, return false.

Definition at line 171 of file FuncConversions.cpp.

References mlir::Operation::hasTrait().

◆ isMatvec()

bool mlir::isMatvec ( ArrayAttr indexingMaps)

Tests whether the given maps describe a matrix vector multiplication.

The test is permutation-invariant. Note that this only checks the affine maps from an operation, so does not perform any checks on the math being performed within the reduction.

Definition at line 148 of file StructuredOpsUtils.cpp.

References ArrayAttr(), mlir::AffineMap::get(), mlir::AffineExpr::getContext(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), and mlir::AffineMap::getResult().

◆ isMemoryEffectFree()

bool mlir::isMemoryEffectFree ( Operation * op)

Returns true if the given operation is free of memory effects.

An operation is free of memory effects if its implementation of MemoryEffectOpInterface indicates that it has no memory effects. For example, it may implement NoMemoryEffect in ODS. Alternatively, if the operation has the HasRecursiveMemoryEffects trait, then it is free of memory effects if all of its nested operations are free of memory effects.

If the operation has both, then it is free of memory effects if both conditions are satisfied.

Definition at line 320 of file SideEffectInterfaces.cpp.

References mlir::Operation::getRegions(), mlir::Operation::hasTrait(), and isMemoryEffectFree().

Referenced by mlir::bufferization::bufferizeOp(), canBeHoisted(), checkTransformationPreconditions(), hasSideEffects(), haveNoReadsAfterWriteExceptSameIndex(), hoistOpsBetween(), mlir::affine::MemRefDependenceGraph::init(), isMemoryEffectFree(), isOpLoopInvariant(), isPure(), matchReduction(), mlir::scf::naivelyFuseParallelOps(), noAliasingUseInLoop(), replaceOpWithPredicatedOp(), mlir::dataflow::LivenessAnalysis::visitBranchOperand(), and mlir::dataflow::LivenessAnalysis::visitOperation().

◆ isNotBranchOpInterfaceOrReturnLikeOp()

bool mlir::isNotBranchOpInterfaceOrReturnLikeOp ( Operation * op)

Return true if op is neither BranchOpInterface nor ReturnLike.

TODO Try to get rid of this function and invert the meaning of isLegalForBranchOpInterfaceTypeConversionPattern and isLegalForReturnOpTypeConversionPattern.

Definition at line 184 of file FuncConversions.cpp.

References mlir::Block::back(), mlir::Operation::getBlock(), mlir::Operation::getParentOp(), and mlir::Operation::mightHaveTrait().

◆ isOneInteger()

◆ isOpaqueTypeWithName()

bool mlir::isOpaqueTypeWithName ( Type type,
StringRef dialect,
StringRef typeData )

Return true if the specified type is an opaque type with the specified dialect and typeData.

Definition at line 47 of file TypeUtilities.cpp.

◆ isOpTriviallyDead()

bool mlir::isOpTriviallyDead ( Operation * op)

Return true if the given operation is unused, and has no side effects on memory that prevent erasing.

Definition at line 35 of file SideEffectInterfaces.cpp.

References mlir::Operation::use_empty(), and wouldOpBeTriviallyDead().

Referenced by mlir::arm_sme::eraseTriviallyDeadTileOps().

◆ isPerfectlyNestedForLoops()

bool mlir::isPerfectlyNestedForLoops ( MutableArrayRef< LoopLikeOpInterface > loops)

Check if the provided loops are perfectly nested for-loops.

Perfect nesting means:

  1. All loops are scf.for operations
  2. Each outer loop's region iter args match the inner loop's init args
  3. Each outer loop's yields match the inner loop's results
  4. Each region iter arg and result has exactly one use

Definition at line 1524 of file Utils.cpp.

Referenced by getUntiledConsumerFromSlice().

◆ isPermutationVector()

◆ isPure()

bool mlir::isPure ( Operation * op)

Returns true if the given operation is pure, i.e., is speculatable that does not touch memory.

The implementation of this function replicates the def Pure : TraitList in SideEffectInterfaces.td and has to be kept in sync manually.

This function is the C++ equivalent of the Pure trait.

Definition at line 403 of file SideEffectInterfaces.cpp.

References isMemoryEffectFree(), and isSpeculatable().

Referenced by mlir::arm_sme::isTriviallyCloneableTileOp(), and mlir::affine::isValidSymbol().

◆ isRankReducedType()

SliceVerificationResult mlir::isRankReducedType ( ShapedType originalType,
ShapedType candidateReducedType )

Check if originalType can be rank reduced to candidateReducedType type by dropping some dimensions with static size 1.

Return SliceVerificationResult::Success on success or an appropriate error code.

Definition at line 490 of file BuiltinTypes.cpp.

References computeRankReductionMask(), ElemTypeMismatch, RankTooLarge, SizeMismatch, and Success.

Referenced by mlir::linalg::lowerPack(), and verifyInsertSliceOp().

◆ isReassociationValid()

bool mlir::isReassociationValid ( ArrayRef< AffineMap > reassociation,
int * invalidIndex = nullptr )

Return true if the reassociation specification is valid, false otherwise.

When false, the invalidIndex integer pointer is optionally filled with the index of the offending reassociation map.

Definition at line 460 of file ReshapeOpsUtils.cpp.

Referenced by getCollapsedVecType().

◆ isRowMajorBatchMatmul()

bool mlir::isRowMajorBatchMatmul ( ArrayAttr indexingMaps)

Tests whether the given maps describe a row major batch matmul.

The test is permutation-invariant. Note that this only checks the affine maps from an operation, so does not perform any checks on the math being performed within the reduction.

Definition at line 72 of file StructuredOpsUtils.cpp.

References ArrayAttr(), b, mlir::AffineMap::get(), mlir::AffineExpr::getContext(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), and mlir::AffineMap::getResult().

◆ isRowMajorMatmul()

bool mlir::isRowMajorMatmul ( ArrayAttr indexingMaps)

Tests whether the given maps describe a row major matmul.

The test is permutation-invariant. Note that this only checks the affine maps from an operation, so does not perform any checks on the math being performed within the reduction.

Definition at line 20 of file StructuredOpsUtils.cpp.

References ArrayAttr(), mlir::AffineMap::get(), mlir::AffineExpr::getContext(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), and mlir::AffineMap::getResult().

◆ isSpeculatable()

bool mlir::isSpeculatable ( Operation * op)

Returns true if the given operation is speculatable, i.e.

has no undefined behavior or other side effects.

An operation can indicate that it is speculatable by implementing the getSpeculatability hook in the ConditionallySpeculatable op interface.

Definition at line 377 of file SideEffectInterfaces.cpp.

References mlir::Operation::getRegions(), isSpeculatable(), mlir::Speculation::NotSpeculatable, mlir::Speculation::RecursivelySpeculatable, and mlir::Speculation::Speculatable.

Referenced by isPure(), and isSpeculatable().

◆ isStrictFileLineColLoc()

bool mlir::isStrictFileLineColLoc ( Location loc)

Returns true iff the given location is a FileLineColRange with exactly one line and column.

Definition at line 177 of file Location.cpp.

◆ isValidVectorTypeElementType()

bool mlir::isValidVectorTypeElementType ( ::mlir::Type type)

Definition at line 3 of file BuiltinTypes.cpp.

◆ isVecmat()

bool mlir::isVecmat ( ArrayAttr indexingMaps)

Tests whether the given maps describe a vector matrix multiplication.

The test is permutation-invariant. Note that this only checks the affine maps from an operation, so does not perform any checks on the math being performed within the reduction.

Definition at line 99 of file StructuredOpsUtils.cpp.

References ArrayAttr(), mlir::AffineMap::get(), mlir::AffineExpr::getContext(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), and mlir::AffineMap::getResult().

◆ isZeroInteger()

◆ JitRunnerMain()

int mlir::JitRunnerMain ( int argc,
char ** argv,
const DialectRegistry & registry,
JitRunnerConfig config = {} )

Entry point for all CPU runners.

Expects the common argc/argv arguments for standard C++ main functions. The supplied dialect registry is expected to contain any registers that appear in the input IR, they will be loaded on-demand by the parser.

Expects the common argc/argv arguments for standard C++ main functions.

Definition at line 308 of file JitRunner.cpp.

References compileAndExecuteSingleReturnFunction(), compileAndExecuteVoidFunction(), config, Error, getCommandLineOptLevel(), makeOptimizingTransformer(), makeStringError(), options, and parseMLIRInput().

◆ linearize() [1/3]

int64_t mlir::linearize ( ArrayRef< int64_t > offsets,
ArrayRef< int64_t > basis )

Return the linearized index of 'offsets' w.r.t.

'basis'.

basis elements are asserted to be non-negative.

Definition at line 90 of file IndexingUtils.cpp.

References linearizeImpl().

Referenced by calculateInsertPosition(), foldDenseElementsAttrSrcExtractOp(), foldExtractFromShapeCast(), foldExtractStridedSliceNonSplatConstant(), linearize(), and ToElementsOfBroadcast::matchAndRewrite().

◆ linearize() [2/3]

AffineExpr mlir::linearize ( MLIRContext * ctx,
ArrayRef< AffineExpr > offsets,
ArrayRef< AffineExpr > basis )

Return the linearized index of 'offsets' w.r.t.

'basis'.

Assuming offsets is [o0, .. on] and basis is [b0, .. bn], return the AffineExpr o0 * b0 + .. + on * bn.

It is the caller's responsibility to pass proper AffineExpr kind that result in valid AffineExpr (i.e. cannot multiply 2 AffineDimExpr or divide by an AffineDimExpr).

basis elements are expected to bind to non-negative values.

Definition at line 157 of file IndexingUtils.cpp.

References getAffineConstantExpr(), and linearizeImpl().

◆ linearize() [3/3]

AffineExpr mlir::linearize ( MLIRContext * ctx,
ArrayRef< AffineExpr > offsets,
ArrayRef< int64_t > basis )

Definition at line 163 of file IndexingUtils.cpp.

References getAffineConstantExprs(), and linearize().

◆ LLVM_DEPRECATED()

mlir::LLVM_DEPRECATED ( "Use applyOpPatternsGreedily() instead" ,
"applyOpPatternsGreedily"  )

Same as applyOpPatternsGreedily with folding.

FIXME: Remove this once transition to above is complieted.

◆ LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()

mlir::LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE ( )

Enable Bitmask enums for OperationEquivalence::Flags.

◆ loopUnrollByFactor()

FailureOr< UnrolledLoopInfo > mlir::loopUnrollByFactor ( scf::ForOp forOp,
uint64_t unrollFactor,
function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn = nullptr )

Unrolls this for operation by the specified unroll factor.

Unrolls 'forOp' by 'unrollFactor', returns the unrolled main loop and the epilogue loop, if the loop is unrolled.

Returns the unrolled main loop and the epilogue loop, if the loop is unrolled. Otherwise returns failure if the loop cannot be unrolled either due to restrictions or due to invalid unroll factors. Requires positive loop bounds and step. If specified, annotates the Ops in each unrolled iteration by applying annotateFn.

Definition at line 367 of file Utils.cpp.

References b, ceilDivPositive(), mlir::OpBuilder::clone(), mlir::UnrolledLoopInfo::epilogueLoopOp, generateUnrolledLoop(), getConstantIntValue(), mlir::Builder::getIntegerAttr(), mlir::Value::getType(), mlir::UnrolledLoopInfo::mainLoopOp, mlir::OpBuilder::setInsertionPointAfter(), and ValueRange.

Referenced by loopUnrollFull().

◆ loopUnrollFull()

LogicalResult mlir::loopUnrollFull ( scf::ForOp forOp)

Unrolls this loop completely.

Definition at line 495 of file Utils.cpp.

References loopUnrollByFactor(), and success().

◆ loopUnrollJamByFactor()

LogicalResult mlir::loopUnrollJamByFactor ( scf::ForOp forOp,
uint64_t unrollFactor )

Unrolls and jams this scf.for operation by the specified unroll factor.

Unrolls and jams this loop by the specified factor.

Returns failure if the loop cannot be unrolled either due to restrictions or due to invalid unroll factors. In case of unroll factor of 1, the function bails out without doing anything (returns success). Currently, only constant trip count that are divided by the unroll factor is supported. Currently, for operations with results are not supported.

Definition at line 523 of file Utils.cpp.

References areInnerBoundsInvariant(), b, mlir::OpBuilder::clone(), mlir::OpBuilder::createOrFold(), mlir::Builder::getIndexAttr(), mlir::OpBuilder::setInsertionPoint(), mlir::JamBlockGatherer< OpTy >::subBlocks, success(), and mlir::JamBlockGatherer< OpTy >::walk().

◆ lowerAffineLowerBound()

Value mlir::lowerAffineLowerBound ( affine::AffineForOp op,
OpBuilder & builder )

Emit code that computes the lower bound of the given affine loop using standard arithmetic operations.

Referenced by getOrEmitLowerBound().

◆ lowerAffineUpperBound()

Value mlir::lowerAffineUpperBound ( affine::AffineForOp op,
OpBuilder & builder )

Emit code that computes the upper bound of the given affine loop using standard arithmetic operations.

Referenced by getOrEmitUpperBound().

◆ m_AnyZeroFloat()

detail::constant_float_predicate_matcher mlir::m_AnyZeroFloat ( )
inline

Matches a constant scalar / vector splat / tensor splat float (both positive and negative) zero.

Definition at line 399 of file Matchers.h.

Referenced by isDefinedAsZero(), isZeroValue(), and ReduceRedundantZero::matchAndRewrite().

◆ m_Attr() [1/2]

detail::AttrOpMatcher mlir::m_Attr ( StringRef attrName)
inline

Matches a named attribute operation.

Definition at line 374 of file Matchers.h.

◆ m_Attr() [2/2]

template<typename AttrT>
detail::AttrOpBinder< AttrT > mlir::m_Attr ( StringRef attrName,
AttrT * bindValue )
inline

Matches a named attribute operation and writes the value to bind_value.

Definition at line 392 of file Matchers.h.

◆ m_Constant() [1/2]

detail::constant_op_matcher mlir::m_Constant ( )
inline

Matches a constant foldable operation.

Definition at line 369 of file Matchers.h.

Referenced by mlir::LocalAliasAnalysis::aliasImpl(), canonicalizeAssociativeCommutativeBinaryOp(), canonicalizeMapOrSetAndOperands(), checkMatchingPadConstAndZp(), convertFPowIOp(), convertMixedValuesToInt(), createLinalgBodyCalculationForElementwiseOp(), createNewAliasScopesFromNoAliasParameter(), mlir::Operation::fold(), foldDynamicIndexList(), foldLoopBounds(), getAsOpFoldResult(), getAttributeIndexFromIndexOperands(), getBroadcastableOperands(), mlir::shape::getShapeVec(), getSinglyExecutedRegionsToSink(), mlir::ValueShapeRange::getValueAsShape(), getZeroPoint(), handleInlinedAllocas(), mlir::OperationFolder::insertKnownConstant(), isDefinedOutsideOrConstant(), isLikelyAnIndexComputation(), isSplatWriteConsistentWithMaskedRead(), mlir::affine::isValidSymbol(), mlir::affine::makeComposedFoldedAffineApply(), makeComposedFoldedMinMax(), mlir::linalg::makeComposedPadHighOp(), CmpFIntToFPConst::matchAndRewrite(), ConcatSliceOptimization::matchAndRewrite(), IAddCarryFold::matchAndRewrite(), MulExtendedFold< spirv::SMulExtendedOp, true >::matchAndRewrite(), PadSliceOptimization::matchAndRewrite(), SliceDynamicSizeCanonicalization::matchAndRewrite(), UModSimplification::matchAndRewrite(), mlir::LLVM::ModuleImport::matchFloatAttr(), mlir::LLVM::ModuleImport::matchIntegerAttr(), materializeConstant(), memsetGetStored(), movePaddingToFillOrGenericOp(), mlir::OperationFolder::notifyRemoval(), reifyMixedParamAndHandleResults(), remainsLegalAfterInline(), and tryFoldTensors().

◆ m_Constant() [2/2]

template<typename AttrT>
detail::constant_op_binder< AttrT > mlir::m_Constant ( AttrT * bind_value)
inline

Matches a value from a constant foldable operation and writes the value to bind_value.

Definition at line 386 of file Matchers.h.

◆ m_ConstantFloat()

detail::constant_float_value_binder mlir::m_ConstantFloat ( FloatAttr::ValueType * bind_value)
inline

Matches a constant holding a scalar/vector/tensor float (splat) and writes the float value to bind_value.

Definition at line 520 of file Matchers.h.

Referenced by convertPowfOp().

◆ m_ConstantInt()

detail::constant_int_value_binder mlir::m_ConstantInt ( IntegerAttr::ValueType * bind_value)
inline

◆ m_IntRangeWithoutNegOneS()

detail::constant_int_range_predicate_matcher mlir::m_IntRangeWithoutNegOneS ( )
inline

Matches a constant scalar / vector splat / tensor splat integer or a signed integer range that does not contain minus one.

Note that this matcher interprets the target value as a signed integer.

Definition at line 471 of file Matchers.h.

Referenced by getDivSISpeculatability().

◆ m_IntRangeWithoutZeroS()

detail::constant_int_range_predicate_matcher mlir::m_IntRangeWithoutZeroS ( )
inline

Matches a constant scalar / vector splat / tensor splat integer or a signed integer range that does not contain zero.

Note that this matcher interprets the target value as a signed integer.

Definition at line 462 of file Matchers.h.

Referenced by getDivSISpeculatability().

◆ m_IntRangeWithoutZeroU()

detail::constant_int_range_predicate_matcher mlir::m_IntRangeWithoutZeroU ( )
inline

Matches a constant scalar / vector splat / tensor splat integer or a unsigned integer range that does not contain zero.

Note that this matcher interprets the target value as an unsigned integer.

Definition at line 455 of file Matchers.h.

Referenced by getDivUISpeculatability().

◆ m_NaNFloat()

detail::constant_float_predicate_matcher mlir::m_NaNFloat ( )
inline

Matches a constant scalar / vector splat / tensor splat float ones.

Definition at line 421 of file Matchers.h.

◆ m_NegInfFloat()

detail::constant_float_predicate_matcher mlir::m_NegInfFloat ( )
inline

Matches a constant scalar / vector splat / tensor splat float negative infinity.

Definition at line 435 of file Matchers.h.

◆ m_NegZeroFloat()

detail::constant_float_predicate_matcher mlir::m_NegZeroFloat ( )
inline

Matches a constant scalar / vector splat / tensor splat float negative zero.

Definition at line 409 of file Matchers.h.

◆ m_NonZero()

detail::constant_int_predicate_matcher mlir::m_NonZero ( )
inline

Matches a constant scalar / vector splat / tensor splat integer that is any non-zero value.

Definition at line 448 of file Matchers.h.

◆ m_One()

Matches a constant scalar / vector splat / tensor splat integer one.

Definition at line 478 of file Matchers.h.

Referenced by FoldLaunchArguments::matchAndRewrite(), SelectToExtUI::matchAndRewrite(), and UMulExtendedOpXOne::matchAndRewrite().

◆ m_OneFloat()

detail::constant_float_predicate_matcher mlir::m_OneFloat ( )
inline

Matches a constant scalar / vector splat / tensor splat float ones.

Definition at line 414 of file Matchers.h.

◆ m_Op() [1/3]

template<typename OpClass>
detail::op_matcher< OpClass > mlir::m_Op ( )
inline

Matches the given OpClass.

Definition at line 484 of file Matchers.h.

Referenced by mlir::linalg::RegionMatcher::matchAsScalarBinaryOp().

◆ m_Op() [2/3]

template<typename OpType, typename... Matchers>
auto mlir::m_Op ( Matchers... matchers)

Definition at line 532 of file Matchers.h.

◆ m_Op() [3/3]

detail::NameOpMatcher mlir::m_Op ( StringRef opName)
inline

Matches a named operation.

Definition at line 379 of file Matchers.h.

Referenced by mlir::linalg::RegionMatcher::matchAsScalarBinaryOp(), and tryFoldTensors().

◆ m_PosInfFloat()

detail::constant_float_predicate_matcher mlir::m_PosInfFloat ( )
inline

Matches a constant scalar / vector splat / tensor splat float positive infinity.

Definition at line 427 of file Matchers.h.

◆ m_PosZeroFloat()

detail::constant_float_predicate_matcher mlir::m_PosZeroFloat ( )
inline

Matches a constant scalar / vector splat / tensor splat float positive zero.

Definition at line 404 of file Matchers.h.

◆ m_Zero()

detail::constant_int_predicate_matcher mlir::m_Zero ( )
inline

Matches a constant scalar / vector splat / tensor splat integer zero.

Definition at line 442 of file Matchers.h.

Referenced by isDefinedAsZero(), isZeroValue(), IAddCarryFold::matchAndRewrite(), MulExtendedFold< spirv::SMulExtendedOp, true >::matchAndRewrite(), and SelectToExtUI::matchAndRewrite().

◆ makeCanonicalStridedLayoutExpr() [1/2]

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

Strides are multiplicative and once a dynamic dimension is encountered, all canonical strides become dynamic and need to be encoded with a different symbol. For canonical strides expressions, the offset is always 0 and the fastest varying stride is always 1.

Examples:

  • memref<3x4x5xf32> has canonical stride expression 20*exprs[0] + 5*exprs[1] + exprs[2].
  • memref<3x?x5xf32> has canonical stride expression s0*exprs[0] + 5*exprs[1] + exprs[2].
  • memref<3x4x?xf32> has canonical stride expression s1*exprs[0] + s0*exprs[1] + exprs[2].

Definition at line 855 of file BuiltinTypes.cpp.

References getAffineConstantExpr(), getAffineSymbolExpr(), mlir::AffineMap::inferFromExprList(), and simplifyAffineExpr().

Referenced by getStridesAndOffset(), and makeCanonicalStridedLayoutExpr().

◆ makeCanonicalStridedLayoutExpr() [2/2]

AffineExpr mlir::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)}.

Definition at line 887 of file BuiltinTypes.cpp.

References getAffineDimExpr(), and makeCanonicalStridedLayoutExpr().

◆ makeOptimizingTransformer()

std::function< llvm::Error(llvm::Module *)> mlir::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.

-O2 or -Os). If not null, targetMachine is used to initialize passes that provide target-specific information to the LLVM optimizer. targetMachine must outlive the returned std::function.

Referenced by JitRunnerMain(), mlirExecutionEngineCreate(), and mlir::LLVM::ModuleToObject::optimizeModule().

◆ makeRegionIsolatedFromAbove()

SmallVector< Value > mlir::makeRegionIsolatedFromAbove ( RewriterBase & rewriter,
Region & region,
llvm::function_ref< bool(Operation *)> cloneOperationIntoRegion = [](Operation *) { return false; } )

Make a region isolated from above.

  • Capture the values that are defined above the region and used within it.
  • Append to the entry block arguments that represent the captured values (one per captured value).
  • Replace all uses within the region of the captured values with the newly added arguments.
  • cloneOperationIntoRegion is a callback that allows caller to specify if the operation defining an OpOperand needs to be cloned into the region. Then the operands of this operation become part of the captured values set (unless the operations that define the operands themeselves are to be cloned). The cloned operations are added to the entry block of the region. Return the set of captured values for the operation.

Definition at line 87 of file RegionUtils.cpp.

References b, mlir::Region::begin(), mlir::OpBuilder::clone(), computeTopologicalSorting(), mlir::OpBuilder::createBlock(), mlir::Region::front(), mlir::Block::getArguments(), mlir::Block::getArgumentTypes(), mlir::Value::getDefiningOp(), mlir::Block::getNumArguments(), mlir::Operation::getOperands(), mlir::Operation::getResults(), getUsedValuesDefinedAbove(), mlir::IRMapping::map(), mlir::RewriterBase::mergeBlocks(), mlir::RewriterBase::replaceOpUsesWithIf(), mlir::RewriterBase::replaceUsesWithIf(), and mlir::OpBuilder::setInsertionPointToStart().

◆ makeReproducer()

std::string mlir::makeReproducer ( StringRef anchorName,
const llvm::iterator_range< OpPassManager::pass_iterator > & passes,
Operation * op,
StringRef outputFile,
bool disableThreads = false,
bool verifyPasses = false )

◆ makeStridedLinearLayoutMap()

AffineMap mlir::makeStridedLinearLayoutMap ( ArrayRef< int64_t > strides,
int64_t offset,
MLIRContext * context )

Given a list of strides (in which ShapedType::kDynamic represents a dynamic value), return the single result AffineMap which represents the linearized strided layout map.

Dimensions correspond to the offset followed by the strides in order. Symbols are inserted for each dynamic dimension in order. A stride is always positive.

Examples:

  1. For offset: 0 strides: ?, ?, 1 return (i, j, k)[M, N]->(M * i + N * j + k)
  2. For offset: 3 strides: 32, ?, 16 return (i, j, k)[M]->(3 + 32 * i + M * j + 16 * k)
  3. For offset: ? strides: ?, ?, ? return (i, j, k)[off, M, N, P]->(off + M * i + N * j + P * k)

Definition at line 1808 of file BuiltinAttributes.cpp.

References mlir::AffineMap::get(), getAffineConstantExpr(), getAffineDimExpr(), and getAffineSymbolExpr().

◆ matchConstantIndex()

detail::op_matcher< arith::ConstantIndexOp > mlir::matchConstantIndex ( )

Matches a ConstantIndexOp.

TODO: This should probably just be a general matcher that uses matchConstant and checks the operation for an index type.

Definition at line 86 of file Utils.cpp.

◆ matchPattern() [1/3]

template<typename Pattern>
bool mlir::matchPattern ( Attribute attr,
const Pattern & pattern )
inline

Entry point for matching a pattern over an Attribute.

Returns false when attr is null.

Definition at line 508 of file Matchers.h.

◆ matchPattern() [2/3]

template<typename Pattern>
bool mlir::matchPattern ( Operation * op,
const Pattern & pattern )
inline

Entry point for matching a pattern over an Operation.

Definition at line 500 of file Matchers.h.

◆ matchPattern() [3/3]

template<typename Pattern>
bool mlir::matchPattern ( Value value,
const Pattern & pattern )
inline

Entry point for matching a pattern over a Value.

Definition at line 490 of file Matchers.h.

References mlir::Value::getDefiningOp().

Referenced by mlir::LocalAliasAnalysis::aliasImpl(), allocateSubviewGPUMemoryInAddressSpace(), canonicalizeAssociativeCommutativeBinaryOp(), canonicalizeMapOrSetAndOperands(), checkMatchingPadConstAndZp(), mlir::scf::computeUbMinusLb(), convertFPowIOp(), convertMixedValuesToInt(), convertPowfOp(), createLinalgBodyCalculationForElementwiseOp(), createNewAliasScopesFromNoAliasParameter(), destructureIndices(), mlir::Operation::fold(), foldDynamicIndexList(), foldLoopBounds(), getAsOpFoldResult(), getAttributeIndexFromIndexOperands(), getBroadcastableOperands(), getConstantAPIntValue(), getConstantIntValue(), getConstantUint32(), getDivSISpeculatability(), getDivUISpeculatability(), getIntOrSplatIntValue(), getKnownLaunchDim(), mlir::shape::getShapeVec(), getSinglyExecutedRegionsToSink(), mlir::ValueShapeRange::getValueAsShape(), getZeroPoint(), handleInlinedAllocas(), mlir::OperationFolder::insertKnownConstant(), isDefinedAsZero(), isDefinedOutsideOrConstant(), isLikelyAnIndexComputation(), isMaskTriviallyFoldable(), isSplatWriteConsistentWithMaskedRead(), mlir::affine::isValidSymbol(), isZeroValue(), mlir::affine::makeComposedFoldedAffineApply(), makeComposedFoldedMinMax(), mlir::linalg::makeComposedPadHighOp(), CmpFIntToFPConst::matchAndRewrite(), ConcatSliceOptimization::matchAndRewrite(), FoldLaunchArguments::matchAndRewrite(), IAddCarryFold::matchAndRewrite(), MulExtendedFold< spirv::SMulExtendedOp, true >::matchAndRewrite(), PadSliceOptimization::matchAndRewrite(), ReduceRedundantZero::matchAndRewrite(), SelectToExtUI::matchAndRewrite(), SliceDynamicSizeCanonicalization::matchAndRewrite(), UModSimplification::matchAndRewrite(), UMulExtendedOpXOne::matchAndRewrite(), mlir::LLVM::ModuleImport::matchFloatAttr(), mlir::LLVM::ModuleImport::matchIntegerAttr(), materializeConstant(), maybeConstantDimsAttr(), memsetGetStored(), movePaddingToFillOrGenericOp(), mlir::OperationFolder::notifyRemoval(), reifyMixedParamAndHandleResults(), remainsLegalAfterInline(), simplifyConstSwitchValue(), and tryFoldTensors().

◆ matchReduction()

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

If a reduction is matched, returns the reduced value and the topologically-sorted list of combiner operations involved in the reduction. Otherwise, returns a null value.

The matching algorithm relies on the following invariants, which are subject to change:

  1. The first combiner operation must be a binary operation with the iteration-carried value and the reduced value as operands.
  2. The iteration-carried value and combiner operations must be side effect-free, have single result and a single use.
  3. Combiner operations must be immediately nested in the region op performing the reduction.
  4. Reduction def-use chain must end in a terminator op that yields the next iteration/output values in the same order as the iteration-carried values in iterCarriedArgs.
  5. iterCarriedArgs must contain all the iteration-carried/output values of the region op performing the reduction.

This utility is generic enough to detect reductions involving multiple combiner operations (disabled for now) across multiple dialects, including Linalg, Affine and SCF. For the sake of genericity, it does not return specific enum values for the combiner operations since its goal is also matching reductions without pre-defined semantics in core MLIR. It's up to each client to make sense out of the list of combiner operations. It's also up to each client to check for additional invariants on the expected reductions not covered by this generic matching.

Definition at line 290 of file SliceAnalysis.cpp.

References dependsOnCarriedVals(), mlir::Operation::getNumOperands(), mlir::Operation::getNumResults(), mlir::Operation::getOperand(), mlir::Operation::getParentOp(), mlir::Operation::getUsers(), mlir::Value::getUsers(), mlir::Operation::hasOneUse(), mlir::Value::hasOneUse(), isMemoryEffectFree(), and mlir::Operation::mightHaveTrait().

Referenced by mlir::linalg::createDestinationPassingStyleInitOperand(), mlir::linalg::getCombinerOp(), getSupportedReduction(), matchLinalgReduction(), matchSimpleReduction(), mlir::linalg::splitReduction(), mlir::linalg::splitReductionByScaling(), vectorizeAffineYieldOp(), and vectorizeOneOp().

◆ mayBeGraphRegion()

bool mlir::mayBeGraphRegion ( Region & region)

Return "true" if the given region may be a graph region without SSA dominance.

This function returns "true" in case the owner op is an unregistered op. It returns "false" if it is a registered op that does not implement the RegionKindInterface.

Definition at line 27 of file RegionKindInterface.cpp.

References mlir::Region::getParentOp(), mlir::Region::getRegionNumber(), and mlir::Operation::isRegistered().

◆ mayHaveSSADominance()

bool mlir::mayHaveSSADominance ( Region & region)

Return "true" if the given region may have SSA dominance.

This function also returns "true" in case the owner op is an unregistered op or an op that does not implement the RegionKindInterface.

Definition at line 20 of file RegionKindInterface.cpp.

References mlir::Region::getParentOp(), and mlir::Region::getRegionNumber().

Referenced by mlir::ForwardDominanceIterator< NoGraphRegions >::makeIterable(), and mlir::ReverseDominanceIterator< NoGraphRegions >::makeIterable().

◆ mightHaveEffect() [1/3]

template<typename... EffectTys>
bool mlir::mightHaveEffect ( Operation * op)

Returns "true" if op might have an effect of type EffectTy.

Returns "true" if the op has unknown effects. Recursive effects are not taken into account.

Definition at line 431 of file SideEffectInterfaces.h.

References hasEffect(), and hasUnknownEffects().

Referenced by hasNeitherAllocateNorFreeSideEffect().

◆ mightHaveEffect() [2/3]

template<typename... EffectTys>
bool mlir::mightHaveEffect ( Operation * op,
Value value )

Returns "true" if op might have an effect of type EffectTy on value.

Returns "true" if the op has unknown effects. Recursive effects are not taken into account.

Definition at line 439 of file SideEffectInterfaces.h.

References hasEffect(), and hasUnknownEffects().

◆ mightHaveEffect() [3/3]

template<typename ValueTy, typename... EffectTys>
bool mlir::mightHaveEffect ( Operation * op,
ValueTy value )

Returns "true" if op might have an effect of type EffectTy on value of type ValueTy.

Returns "true" if the op has unknown effects. Recursive effects are not taken into account.

Definition at line 447 of file SideEffectInterfaces.h.

References hasEffect(), and hasUnknownEffects().

◆ MlirLspServerMain() [1/2]

llvm::LogicalResult mlir::MlirLspServerMain ( int argc,
char ** argv,
DialectRegistry & registry )

Implementation for tools like mlir-lsp-server.

  • registry should contain all the dialects that can be parsed in source IR passed to the server.

Definition at line 82 of file MlirLspServerMain.cpp.

References MlirLspServerMain().

Referenced by MlirLspServerMain().

◆ MlirLspServerMain() [2/2]

LogicalResult mlir::MlirLspServerMain ( int argc,
char ** argv,
lsp::DialectRegistryFn registry_fn )

Implementation for tools like mlir-lsp-server.

  • registry should contain all the dialects that can be parsed in source IR passed to the server and may register different dialects depending on the input URI.

Definition at line 24 of file MlirLspServerMain.cpp.

References mlir::lsp::runMlirLSPServer().

◆ MlirOptMain() [1/3]

LogicalResult mlir::MlirOptMain ( int argc,
char ** argv,
llvm::StringRef inputFilename,
llvm::StringRef outputFilename,
DialectRegistry & registry )

Implementation for tools like mlir-opt.

This function can be used with registerAndParseCLIOptions so that CLI options can be accessed before running MlirOptMain.

  • inputFilename is the name of the input mlir file.
  • outputFilename is the name of the output file.
  • registry should contain all the dialects that can be parsed in the source.

Definition at line 786 of file MlirOptMain.cpp.

References config, mlir::MlirOptMainConfig::createFromCLOptions(), MlirOptMain(), openInputFile(), openOutputFile(), printRegisteredDialects(), printRegisteredPassesAndReturn(), and success().

◆ MlirOptMain() [2/3]

LogicalResult mlir::MlirOptMain ( int argc,
char ** argv,
llvm::StringRef toolName,
DialectRegistry & registry )

Implementation for tools like mlir-opt.

  • toolName is used for the header displayed by --help.
  • registry should contain all the dialects that can be parsed in the source.

Definition at line 830 of file MlirOptMain.cpp.

References MlirOptMain(), and registerAndParseCLIOptions().

◆ MlirOptMain() [3/3]

LogicalResult mlir::MlirOptMain ( llvm::raw_ostream & outputStream,
std::unique_ptr< llvm::MemoryBuffer > buffer,
DialectRegistry & registry,
const MlirOptMainConfig & config )

Perform the core processing behind mlir-opt.

  • outputStream is the stream where the resulting IR is printed.
  • buffer is the in-memory file to parser and process.
  • registry should contain all the dialects that can be parsed in the source.
  • config contains the configuration options for the tool.

Definition at line 735 of file MlirOptMain.cpp.

References config, mlir::MLIRContext::getThreadPool(), mlir::MLIRContext::isMultithreadingEnabled(), printRegisteredDialects(), printRegisteredPassesAndReturn(), processBuffer(), splitAndProcessBuffer(), and mlir::SourceMgrDiagnosticVerifierHandler::verify().

Referenced by MlirOptMain(), and MlirOptMain().

◆ MlirPdllLspServerMain()

LogicalResult mlir::MlirPdllLspServerMain ( int argc,
char ** argv )

Implementation for tools like mlir-pdll-lsp-server.

Definition at line 23 of file MlirPdllLspServerMain.cpp.

References options, and mlir::lsp::runPdllLSPServer().

◆ mlirQueryMain()

llvm::LogicalResult mlir::mlirQueryMain ( int argc,
char ** argv,
MLIRContext & context,
const mlir::query::matcher::Registry & matcherRegistry )

◆ mlirReduceMain()

◆ MlirTblgenMain()

int mlir::MlirTblgenMain ( int argc,
char ** argv )

Main Program for tools like 'mlir-tblgen' with custom backends.

To add a new backend, simply create a new 'mlir::GenRegistration' global variable. See its documentation for more info.

The 'argc' and 'argv' arguments are simply forwarded from a main function. The return value is the exit code from llvm::TableGenMain.

Definition at line 139 of file MlirTblgenMain.cpp.

References actionOnDeprecatedValue, Error, generator, mlirTableGenMain(), None, and Warn.

◆ mlirTranslateMain()

LogicalResult mlir::mlirTranslateMain ( int argc,
char ** argv,
StringRef toolName )

Translate to/from an MLIR module from/to an external representation (e.g.

LLVM IR, SPIRV binary, ...). This is the entry point for the implementation of tools like mlir-translate. The translation to perform is parsed from the command line. The toolName argument is used for the header displayed by --help.

◆ moveLoopInvariantCode() [1/2]

size_t mlir::moveLoopInvariantCode ( ArrayRef< Region * > regions,
function_ref< bool(Value, Region *)> isDefinedOutsideRegion,
function_ref< bool(Operation *, Region *)> shouldMoveOutOfRegion,
function_ref< void(Operation *, Region *)> moveOutOfRegion )

Given a list of regions, perform loop-invariant code motion.

An operation is loop-invariant if it depends only of values defined outside of the loop. LICM moves these operations out of the loop body so that they are not computed more than once.

Example:

affine.for %arg0 = 0 to 10 {
affine.for %arg1 = 0 to 10 {
%v0 = arith.addi %arg0, %arg0 : i32
%v1 = arith.addi %v0, %arg1 : i32
}
}

After LICM:

affine.for %arg0 = 0 to 10 {
%v0 = arith.addi %arg0, %arg0 : i32
affine.for %arg1 = 0 to 10 {
%v1 = arith.addi %v0, %arg1 : i32
}
}

Users must supply three callbacks.

  • isDefinedOutsideRegion returns true if the given value is invariant with respect to the given region. A common implementation might be: value.getParentRegion()->isProperAncestor(region).
  • shouldMoveOutOfRegion returns true if the provided operation can be moved of the given region, e.g. if it is side-effect free.
  • moveOutOfRegion moves the operation out of the given region. A common implementation might be: op->moveBefore(region->getParentOp()).

An operation is moved if all of its operands satisfy isDefinedOutsideRegion and it satisfies shouldMoveOutOfRegion.

Returns the number of operations moved.

Definition at line 61 of file LoopInvariantCodeMotionUtils.cpp.

References canBeHoisted(), mlir::Operation::getParentRegion(), and mlir::Operation::getUsers().

Referenced by mlir::linalg::hoistRedundantVectorBroadcasts(), mlir::linalg::hoistRedundantVectorTransfers(), and moveLoopInvariantCode().

◆ moveLoopInvariantCode() [2/2]

size_t mlir::moveLoopInvariantCode ( LoopLikeOpInterface loopLike)

Move side-effect free loop invariant code out of a loop-like op using methods provided by the interface.

Definition at line 111 of file LoopInvariantCodeMotionUtils.cpp.

References moveLoopInvariantCode().

◆ moveOperationDependencies() [1/2]

LogicalResult mlir::moveOperationDependencies ( RewriterBase & rewriter,
Operation * op,
Operation * insertionPoint )

Definition at line 1138 of file RegionUtils.cpp.

References moveOperationDependencies().

◆ moveOperationDependencies() [2/2]

LogicalResult mlir::moveOperationDependencies ( RewriterBase & rewriter,
Operation * op,
Operation * insertionPoint,
DominanceInfo & dominance )

Move SSA values used within an operation before an insertion point, so that the operation itself (or its replacement) can be moved to the insertion point.

Current support is only for movement of dependencies of op before insertionPoint in the same basic block.

Definition at line 1089 of file RegionUtils.cpp.

References getBackwardSlice(), mlir::Operation::getBlock(), mlir::RewriterBase::moveOpBefore(), mlir::RewriterBase::notifyMatchFailure(), options, mlir::DominanceInfo::properlyDominates(), result, and success().

Referenced by moveOperationDependencies().

◆ moveValueDefinitions() [1/2]

LogicalResult mlir::moveValueDefinitions ( RewriterBase & rewriter,
ValueRange values,
Operation * insertionPoint )

Definition at line 1207 of file RegionUtils.cpp.

References moveValueDefinitions().

◆ moveValueDefinitions() [2/2]

LogicalResult mlir::moveValueDefinitions ( RewriterBase & rewriter,
ValueRange values,
Operation * insertionPoint,
DominanceInfo & dominance )

Move definitions of values before an insertion point.

Current support is only for movement of definitions within the same basic block. Note that this is an all-or-nothing approach. Either definitions of all values are moved before insertion point, or none of them are.

Definition at line 1145 of file RegionUtils.cpp.

References getBackwardSlice(), mlir::Operation::getBlock(), mlir::Value::getDefiningOp(), mlir::RewriterBase::moveOpBefore(), mlir::RewriterBase::notifyMatchFailure(), options, mlir::DominanceInfo::properlyDominates(), result, success(), and topologicalSort().

Referenced by fuseWithReshapeByExpansion(), and moveValueDefinitions().

◆ normalizeForallOp()

FailureOr< scf::ForallOp > mlir::normalizeForallOp ( RewriterBase & rewriter,
scf::ForallOp forallOp )

Normalize an scf.forall operation.

Returns failure()if normalization fails. newly created operation with all uses of the original operation replaced with results of the new operation.

Definition at line 1479 of file Utils.cpp.

References denormalizeInductionVariable(), emitNormalizedLoopBounds(), mlir::RewriterBase::eraseBlock(), foldDynamicIndexList(), getValueOrCreateConstantIndexOp(), mlir::RewriterBase::inlineRegionBefore(), mlir::RewriterBase::replaceOp(), mlir::OpBuilder::setInsertionPoint(), mlir::OpBuilder::setInsertionPointToStart(), and mlir::Range::size.

◆ openInputFile() [1/2]

std::unique_ptr< llvm::MemoryBuffer > mlir::openInputFile ( llvm::StringRef inputFilename,
llvm::Align alignment,
std::string * errorMessage = nullptr )

Open the file specified by its name for reading, with the given buffer alignment constraint.

Write the error message to errorMessage if errors occur and errorMessage is not nullptr.

Definition at line 43 of file FileUtilities.cpp.

References openInputFileImpl().

◆ openInputFile() [2/2]

std::unique_ptr< llvm::MemoryBuffer > mlir::openInputFile ( llvm::StringRef inputFilename,
std::string * errorMessage = nullptr )

Open the file specified by its name for reading.

Write the error message to errorMessage if errors occur and errorMessage is not nullptr.

Referenced by loadIRDLDialects(), loadModule(), MlirOptMain(), mlirQueryMain(), parseMLIRInput(), and mlir::transform::detail::parseTransformModuleFromFile().

◆ openOutputFile()

std::unique_ptr< llvm::ToolOutputFile > mlir::openOutputFile ( llvm::StringRef outputFilename,
std::string * errorMessage = nullptr )

Open the file specified by its name for writing.

Write the error message to errorMessage if errors occur and errorMessage is not nullptr.

Referenced by createTreePrinterOutputPath(), mlir::SimpleObjectCache::dumpToObjectFile(), generateLocationsFromIR(), mlir::tracing::InstallDebugHandler::Impl::Impl(), makeReproducerStreamFactory(), MlirOptMain(), and mlirReduceMain().

◆ operator!=() [1/6]

bool mlir::operator!= ( OpState lhs,
OpState rhs )
inline

Definition at line 265 of file OpDefinition.h.

References lhs, and rhs.

◆ operator!=() [2/6]

bool mlir::operator!= ( RegionBranchPoint lhs,
RegionBranchPoint rhs )
inline

Definition at line 270 of file ControlFlowInterfaces.h.

References lhs, and rhs.

◆ operator!=() [3/6]

bool mlir::operator!= ( StringAttr lhs,
std::nullptr_t  )
inline

Definition at line 1060 of file BuiltinAttributes.h.

References lhs.

◆ operator!=() [4/6]

bool mlir::operator!= ( StringAttr lhs,
StringAttr rhs )
inline

Definition at line 1066 of file BuiltinAttributes.h.

References lhs, and rhs.

◆ operator!=() [5/6]

bool mlir::operator!= ( StringAttr lhs,
StringRef rhs )
inline

Definition at line 1072 of file BuiltinAttributes.h.

References lhs, and rhs.

◆ operator!=() [6/6]

bool mlir::operator!= ( StringRef lhs,
StringAttr rhs )
inline

Definition at line 1076 of file BuiltinAttributes.h.

References lhs, and rhs.

◆ operator&()

ChangeResult mlir::operator& ( ChangeResult lhs,
ChangeResult rhs )
inline

Definition at line 48 of file DataFlowFramework.h.

References lhs, NoChange, and rhs.

◆ operator*()

AffineExpr mlir::operator* ( int64_t val,
AffineExpr expr )
inline

Definition at line 252 of file AffineExpr.h.

◆ operator+()

AffineExpr mlir::operator+ ( int64_t val,
AffineExpr expr )
inline

Definition at line 251 of file AffineExpr.h.

◆ operator-()

AffineExpr mlir::operator- ( int64_t val,
AffineExpr expr )
inline

Definition at line 253 of file AffineExpr.h.

◆ operator<<() [1/44]

template<typename AsmPrinterT, typename ElementT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
ArrayRef< ElementT > types )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [2/44]

template<typename AsmPrinterT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
Attribute attr )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [3/44]

template<typename AsmPrinterT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
bool value )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [4/44]

template<typename AsmPrinterT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
const APFloat & value )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [5/44]

template<typename AsmPrinterT, typename T, std::enable_if_t<!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 > * = nullptr>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
const T & other )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [6/44]

template<typename AsmPrinterT, typename T>
std::enable_if_t< std::is_same< AsmPrinter, AsmPrinterT >::value &&std::is_convertible< T &, ValueRange >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
const T & other )
inlinedelete

◆ operator<<() [7/44]

template<typename AsmPrinterT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
const TypeRange & types )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [8/44]

template<typename AsmPrinterT, typename ValueRangeT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
const ValueTypeRange< ValueRangeT > & types )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [9/44]

template<typename AsmPrinterT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
double value )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [10/44]

template<typename AsmPrinterT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
float value )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [11/44]

template<typename AsmPrinterT>
std::enable_if_t< std::is_base_of< AsmPrinter, AsmPrinterT >::value, AsmPrinterT & > mlir::operator<< ( AsmPrinterT & p,
Type type )
inline

Definition at line 110 of file OpImplementation.h.

◆ operator<<() [12/44]

llvm::raw_ostream & mlir::operator<< ( llvm::raw_ostream & os,
Region & region )

◆ operator<<() [13/44]

llvm::raw_ostream & mlir::operator<< ( llvm::raw_ostream & os,
RegionBranchPoint point )
inline

◆ operator<<() [14/44]

llvm::raw_ostream & mlir::operator<< ( llvm::raw_ostream & os,
RegionSuccessor successor )
inline

◆ operator<<() [15/44]

OpAsmPrinter & mlir::operator<< ( OpAsmPrinter & p,
Block * value )
inline

Definition at line 565 of file OpImplementation.h.

References mlir::OpAsmPrinter::printSuccessor().

◆ operator<<() [16/44]

template<typename T, std::enable_if_t< std::is_convertible< T &, ValueRange >::value &&!std::is_convertible< T &, Value & >::value, T > * = nullptr>
OpAsmPrinter & mlir::operator<< ( OpAsmPrinter & p,
const T & values )
inline

Definition at line 560 of file OpImplementation.h.

References mlir::OpAsmPrinter::printOperands().

◆ operator<<() [17/44]

OpAsmPrinter & mlir::operator<< ( OpAsmPrinter & p,
Value value )
inline

Definition at line 551 of file OpImplementation.h.

References mlir::OpAsmPrinter::printOperand().

◆ operator<<() [18/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
Block & block )

Definition at line 4177 of file AsmPrinter.cpp.

References mlir::Block::print().

◆ operator<<() [19/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const IntegerValueRange & range )

Definition at line 144 of file InferIntRangeInterface.cpp.

References mlir::IntegerValueRange::print().

◆ operator<<() [20/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
AffineExpr expr )

Definition at line 1080 of file AffineExpr.cpp.

References mlir::AffineExpr::print().

◆ operator<<() [21/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
AffineMap map )
inline

Definition at line 664 of file AffineMap.h.

References mlir::AffineMap::print().

◆ operator<<() [22/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
Attribute attr )
inline

Definition at line 150 of file Attributes.h.

References mlir::Attribute::print().

◆ operator<<() [23/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const AliasResult & result )
inline

Definition at line 78 of file AliasAnalysis.h.

References result.

◆ operator<<() [24/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const AnalysisState & state )
inline

Definition at line 774 of file DataFlowFramework.h.

References mlir::AnalysisState::print().

◆ operator<<() [25/44]

◆ operator<<() [26/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const Diagnostic & diag )
inline

Definition at line 304 of file Diagnostics.h.

References diag().

◆ operator<<() [27/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const DiagnosticArgument & arg )
inline

Definition at line 144 of file Diagnostics.h.

References mlir::DiagnosticArgument::print().

◆ operator<<() [28/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const IRUnit & unit )

◆ operator<<() [29/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const LatticeAnchor & anchor )
inline

Definition at line 779 of file DataFlowFramework.h.

References mlir::LatticeAnchor::print().

◆ operator<<() [30/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const Location & loc )
inline

Definition at line 116 of file Location.h.

References mlir::Location::print().

◆ operator<<() [31/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const ModRefResult & result )
inline

Definition at line 165 of file AliasAnalysis.h.

References result.

◆ operator<<() [32/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const Operation & op )
inline

Definition at line 1100 of file Operation.h.

References print().

◆ operator<<() [33/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const OpWithState & opWithState )
inline

Definition at line 1145 of file Operation.h.

◆ operator<<() [34/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const ProgramPoint & point )
inline

Definition at line 150 of file DataFlowFramework.h.

References mlir::ProgramPoint::print().

◆ operator<<() [35/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const Range & range )

Definition at line 3174 of file MemRefOps.cpp.

References mlir::Range::offset, mlir::Range::size, and mlir::Range::stride.

◆ operator<<() [36/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const StridedMetadataRange & range )
inline

Print the strided metadata to os.

Definition at line 132 of file InferStridedMetadataInterface.h.

References mlir::StridedMetadataRange::print().

◆ operator<<() [37/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
const TypeRange & types )
inline

Emit a type range to the given output stream.

Definition at line 79 of file TypeRange.h.

◆ operator<<() [38/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
OperationName info )
inline

Definition at line 507 of file OperationSupport.h.

References mlir::OperationName::print().

◆ operator<<() [39/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
OpFoldResult ofr )
inline

Allow printing to a stream.

Definition at line 307 of file OpDefinition.h.

◆ operator<<() [40/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
OpState op )
inline

Allow printing to a stream.

Definition at line 315 of file OpDefinition.h.

References mlir::OpState::print().

◆ operator<<() [41/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
OpWithFlags opWithFlags )
inline

Definition at line 1125 of file Operation.h.

◆ operator<<() [42/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
SymbolTable::Visibility visibility )

◆ operator<<() [43/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
Type type )
inline

Definition at line 237 of file Types.h.

References mlir::Type::print().

◆ operator<<() [44/44]

raw_ostream & mlir::operator<< ( raw_ostream & os,
Value value )
inline

Definition at line 246 of file Value.h.

References mlir::Value::print().

◆ operator==() [1/6]

template<typename RangeT>
bool mlir::operator== ( ArrayRef< Type > lhs,
const ValueTypeRange< RangeT > & rhs )
inline

Definition at line 167 of file TypeRange.h.

References lhs, and rhs.

◆ operator==() [2/6]

bool mlir::operator== ( OpState lhs,
OpState rhs )
inline

Definition at line 262 of file OpDefinition.h.

References lhs, and rhs.

◆ operator==() [3/6]

bool mlir::operator== ( StringAttr lhs,
std::nullptr_t  )
inline

Define comparisons for StringAttr against nullptr and itself to avoid the StringRef overloads from being chosen when not desirable.

Definition at line 1059 of file BuiltinAttributes.h.

References lhs.

Referenced by mlir::ValueBoundsConstraintSet::BoundBuilder::operator==(), and mlir::ValueBoundsConstraintSet::BoundBuilder::operator==().

◆ operator==() [4/6]

bool mlir::operator== ( StringAttr lhs,
StringAttr rhs )
inline

Definition at line 1063 of file BuiltinAttributes.h.

References lhs, and rhs.

◆ operator==() [5/6]

bool mlir::operator== ( StringAttr lhs,
StringRef rhs )
inline

Allow direct comparison with StringRef.

Definition at line 1069 of file BuiltinAttributes.h.

References lhs, and rhs.

◆ operator==() [6/6]

bool mlir::operator== ( StringRef lhs,
StringAttr rhs )
inline

Definition at line 1073 of file BuiltinAttributes.h.

References lhs, and rhs.

◆ operator|()

ChangeResult mlir::operator| ( ChangeResult lhs,
ChangeResult rhs )
inline

Definition at line 41 of file DataFlowFramework.h.

References Change, lhs, and rhs.

◆ operator|=()

ChangeResult & mlir::operator|= ( ChangeResult & lhs,
ChangeResult rhs )
inline

Definition at line 44 of file DataFlowFramework.h.

References lhs, and rhs.

◆ outlineIfOp()

LogicalResult mlir::outlineIfOp ( RewriterBase & b,
scf::IfOp ifOp,
func::FuncOp * thenFn,
StringRef thenFnName,
func::FuncOp * elseFn,
StringRef elseFnName )

Outline the then and/or else regions of ifOp as follows:

  • if thenFn is not null, thenFnName must be specified and the then region is inlined into a new FuncOp that is captured by the pointer.
  • if elseFn is not null, elseFnName must be specified and the else region is inlined into a new FuncOp that is captured by the pointer. Creates new FuncOps and thus cannot be used in a FuncOp pass. The client is responsible for providing a unique thenFnName/elseFnName that will not collide with another FuncOp name.

Definition at line 217 of file Utils.cpp.

References b, outlineSingleBlockRegion(), and success().

◆ outlineKernelFunc()

gpu::GPUFuncOp mlir::outlineKernelFunc ( gpu::LaunchOp launchOp,
StringRef kernelFnName,
llvm::SmallVectorImpl< Value > & operands )

Get a gpu.func created from outlining the region of a gpu.launch op with the given kernelFnName.

The region of the launchOp can use values from above. These need to be captured and passed as arguments to the generated gpu.func. The generated function has arguments

  • corresponding to the values passed in as operands, in that order.
  • any additional values that might be used within the region of the launchOp and defined above it. These captured values are appended to the operands list.

Definition at line 264 of file KernelOutlining.cpp.

References outlineKernelFuncImpl().

◆ outlineSingleBlockRegion()

FailureOr< func::FuncOp > mlir::outlineSingleBlockRegion ( RewriterBase & rewriter,
Location loc,
Region & region,
StringRef funcName,
func::CallOp * callOp = nullptr )

Outline a region with a single block into a new FuncOp.

Assumes the FuncOp result types is the type of the yielded operands of the single block. This constraint makes it easy to determine the result. This method also clones the arith::ConstantIndexOp at the start of outlinedFuncBody to alloc simple canonicalizations. Creates a new FuncOp and thus cannot be used in a FuncOp pass. The client is responsible for providing a unique funcName that will not collide with another FuncOp name. If callOp is provided, it will be set to point to the operation that calls the outlined function.

Assumes the FuncOp result types is the type of the yielded operands of the single block. This constraint makes it easy to determine the result. This method also clones the arith::ConstantIndexOp at the start of outlinedFuncBody to alloc simple canonicalizations. If callOp is provided, it will be set to point to the operation that calls the outlined function.

Definition at line 114 of file Utils.cpp.

References mlir::Region::begin(), mlir::OpBuilder::clone(), mlir::OpBuilder::createBlock(), mlir::RewriterBase::eraseOp(), mlir::Region::front(), mlir::Block::getArguments(), mlir::Region::getArguments(), mlir::Builder::getContext(), mlir::Value::getDefiningOp(), mlir::Block::getNumArguments(), mlir::Operation::getOperands(), mlir::Operation::getOperandTypes(), mlir::detail::IROperandBase::getOwner(), mlir::Region::getParentOfType(), mlir::Operation::getResult(), mlir::Operation::getResultTypes(), mlir::Block::getTerminator(), getUsedValuesDefinedAbove(), mlir::Region::hasOneBlock(), mlir::IRMapping::map(), mlir::RewriterBase::mergeBlocks(), mlir::Value::replaceUsesWithIf(), mlir::OpBuilder::setInsertionPoint(), mlir::OpBuilder::setInsertionPointToEnd(), and mlir::OpBuilder::setInsertionPointToStart().

Referenced by outlineIfOp().

◆ parallelFor()

template<typename FuncT>
void mlir::parallelFor ( MLIRContext * context,
size_t begin,
size_t end,
FuncT && func )

Invoke the given function on the elements between [begin, end) asynchronously.

Diagnostics emitted during processing are ordered relative to the element's position within [begin, end). If the provided context does not have multi-threading enabled, this function always processes elements sequentially.

Definition at line 141 of file Threading.h.

References parallelForEach().

◆ parallelForEach() [1/2]

template<typename IteratorT, typename FuncT>
void mlir::parallelForEach ( MLIRContext * context,
IteratorT begin,
IteratorT end,
FuncT && func )

Invoke the given function on the elements between [begin, end) asynchronously.

Diagnostics emitted during processing are ordered relative to the element's position within [begin, end). If the provided context does not have multi-threading enabled, this function always processes elements sequentially.

Definition at line 117 of file Threading.h.

References failableParallelForEach(), and success().

Referenced by parallelFor(), and parallelForEach().

◆ parallelForEach() [2/2]

template<typename RangeT, typename FuncT>
void mlir::parallelForEach ( MLIRContext * context,
RangeT && range,
FuncT && func )

Invoke the given function on the elements in the provided range asynchronously.

Diagnostics emitted during processing are ordered relative to the element's position within the range. If the provided context does not have multi-threading enabled, this function always processes elements sequentially.

Definition at line 130 of file Threading.h.

References parallelForEach().

◆ parallelLoopUnrollByFactors()

FailureOr< scf::ParallelOp > mlir::parallelLoopUnrollByFactors ( scf::ParallelOp op,
ArrayRef< uint64_t > unrollFactors,
RewriterBase & rewriter,
function_ref< void(unsigned, Operation *, OpBuilder)> annotateFn = nullptr,
IRMapping * clonedToSrcOpsMap = nullptr )

Unroll this scf::Parallel loop by the specified unroll factors.

Returns the unrolled loop if the unroll succeded; otherwise returns failure if the loop cannot be unrolled either due to restrictions or to invalid unroll factors. Requires positive loop bounds and step. If specified, annotates the Ops in each unrolled iteration by applying annotateFn. If provided, 'clonedToSrcOpsMap' is populated with the mappings from the cloned ops to the original op.

Definition at line 1580 of file Utils.cpp.

References b, mlir::arith::ConstantIndexOp::create(), generateUnrolledLoop(), getConstantIntValue(), getConstLoopTripCounts(), mlir::RewriterBase::notifyMatchFailure(), mlir::OpBuilder::restoreInsertionPoint(), mlir::OpBuilder::saveInsertionPoint(), mlir::OpBuilder::setInsertionPoint(), and ValueRange.

◆ parseAffineMap()

AffineMap mlir::parseAffineMap ( llvm::StringRef str,
MLIRContext * context )

This parses a single IntegerSet/AffineMap to an MLIR context if it was valid.

If not, an error message is emitted through a new SourceMgrDiagnosticHandler constructed from a new SourceMgr with a single MemoryBuffer wrapping str. If the passed str has additional tokens that were not part of the IntegerSet/AffineMap, a failure is returned.

◆ parseAsmSourceFile()

LogicalResult mlir::parseAsmSourceFile ( const llvm::SourceMgr & sourceMgr,
Block * block,
const ParserConfig & config,
AsmParserState * asmState = nullptr,
AsmParserCodeCompleteContext * codeCompleteContext = nullptr )

This parses the file specified by the indicated SourceMgr and appends parsed operations to the given block.

If the block is non-empty, the operations are placed before the current terminator. If parsing is successful, success is returned. Otherwise, an error message is emitted through the error handler registered in the context, and failure is returned. If sourceFileLoc is non-null, it is populated with a file location representing the start of the source file that is being parsed. If asmState is non-null, it is populated with detailed information about the parsed IR (including exact locations for SSA uses and definitions). asmState should only be provided if this detailed information is desired. If codeCompleteContext is non-null, it is used to signal tracking of a code completion event (generally only ever useful for LSP or other high level language tooling).

Definition at line 2918 of file Parser.cpp.

References config, and mlir::FileLineColLoc::get().

◆ parseAttribute()

Attribute mlir::parseAttribute ( llvm::StringRef attrStr,
MLIRContext * context,
Type type = {},
size_t * numRead = nullptr,
bool isKnownNullTerminated = false )

This parses a single MLIR attribute to an MLIR context if it was valid.

If not, an error diagnostic is emitted to the context and a null value is returned. If numRead is provided, it is set to the number of consumed characters on successful parse. Otherwise, parsing fails if the entire string is not consumed. Some internal copying can be skipped if the source string is known to be null terminated.

Referenced by createGpuKernelOutliningPass(), and mlirAttributeParseGet().

◆ parseCLIOptions()

std::pair< std::string, std::string > mlir::parseCLIOptions ( int argc,
char ** argv,
llvm::StringRef helpHeader )

Parse command line options.

  • helpHeader is used for the header displayed by --help.
  • return std::pair<std::string, std::string> for inputFilename and outputFilename command line option values.

Definition at line 704 of file MlirOptMain.cpp.

Referenced by registerAndParseCLIOptions().

◆ parseDimensionList()

◆ parseDynamicIndexList() [1/2]

ParseResult mlir::parseDynamicIndexList ( OpAsmParser & parser,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > & values,
DenseI64ArrayAttr & integers,
DenseBoolArrayAttr & scalableFlags,
SmallVectorImpl< Type > * valueTypes = nullptr,
AsmParser::Delimiter delimiter = AsmParser::Delimiter::Square )

Parser hooks for custom directive in assemblyFormat.

custom<DynamicIndexList>($values, $integers) custom<DynamicIndexList>($values, $integers, type($values))

where values is of ODS type Variadic<*> and integers is of ODS type I64ArrayAttr. Parse a mixed list where each element is either a static integer or an SSA value. Fill integers with the integer ArrayAttr, where kDynamic encodes the position of SSA values. Add the parsed SSA values to values in-order.

If valueTypes is provided, fill it with the types corresponding to each value in values. Otherwise, the caller must handle the types and parsing will fail if the type of the value is found (e.g., [arg0 : index, 3, arg1 / : index]).

Integer indices can also be scalable in the context of scalable vectors,
denoted by square brackets (e.g., "[2, [4], 8]"). For each value in
`integers`, the corresponding `bool` in `scalableFlags` encodes whether it's
a scalable index.

Examples:

  * After parsing "[%arg0 : index, 7, 42, %arg42 : i32]":
      1. `result` is filled with `[kDynamic, 7, 42, kDynamic]`
      2. `values` is filled with "[%arg0, %arg1]".
      3. `scalableFlags` is filled with `[false, true, false]`.

  * After parsing `[2, [4], 8]`:
      1. `result` is filled with `[2, 4, 8]`
      2. `values` is empty.
      3. `scalableFlags` is filled with `[false, true, false]`.

Definition at line 231 of file ViewLikeInterface.cpp.

References mlir::AsmParser::emitError(), mlir::AsmParser::getBuilder(), mlir::Builder::getDenseBoolArrayAttr(), mlir::Builder::getDenseI64ArrayAttr(), mlir::AsmParser::getNameLoc(), mlir::AsmParser::parseColonType(), mlir::AsmParser::parseCommaSeparatedList(), mlir::AsmParser::parseInteger(), mlir::AsmParser::parseOptionalLSquare(), mlir::OpAsmParser::parseOptionalOperand(), mlir::AsmParser::parseOptionalRSquare(), and success().

Referenced by parseDynamicIndexList(), and mlir::transform::parsePackedOrDynamicIndexList().

◆ parseDynamicIndexList() [2/2]

ParseResult mlir::parseDynamicIndexList ( OpAsmParser & parser,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > & values,
DenseI64ArrayAttr & integers,
SmallVectorImpl< Type > * valueTypes = nullptr,
AsmParser::Delimiter delimiter = AsmParser::Delimiter::Square )
inline

Definition at line 216 of file ViewLikeInterface.h.

References parseDynamicIndexList(), and mlir::AsmParser::Square.

◆ parseIntegerSet()

IntegerSet mlir::parseIntegerSet ( llvm::StringRef str,
MLIRContext * context )

◆ parsePassPipeline() [1/2]

LogicalResult mlir::parsePassPipeline ( StringRef pipeline,
OpPassManager & pm,
raw_ostream & errorStream = llvm::errs() )

Parse the textual representation of a pass pipeline, adding the result to 'pm' on success.

Returns failure if the given pipeline was invalid. 'errorStream' is the output stream used to emit errors found during parsing.

Definition at line 768 of file PassRegistry.cpp.

References success().

Referenced by mlir::PassPipelineCLParser::addToPipeline(), mlir::PassReproducerOptions::apply(), mlirOpPassManagerAddPipeline(), mlirParsePassPipeline(), and parsePassPipeline().

◆ parsePassPipeline() [2/2]

FailureOr< OpPassManager > mlir::parsePassPipeline ( StringRef pipeline,
raw_ostream & errorStream = llvm::errs() )

Parse the given textual representation of a pass pipeline, and return the parsed pipeline on success.

The given pipeline string should be wrapped with the desired type of operation to root the created operation, i.e. builtin.module(cse) over cse. Returns failure if the given pipeline was invalid. 'errorStream' is the output stream used to emit errors found during parsing.

Definition at line 782 of file PassRegistry.cpp.

References parsePassPipeline().

◆ parseSemiFunctionType() [1/2]

ParseResult mlir::parseSemiFunctionType ( OpAsmParser & parser,
Type & argumentType,
SmallVectorImpl< Type > & resultTypes )

◆ parseSemiFunctionType() [2/2]

ParseResult mlir::parseSemiFunctionType ( OpAsmParser & parser,
Type & argumentType,
Type & resultType,
bool resultOptional = true )

Parses a single non-function type or a function type with at least one argument.

This allows for the following syntax:

  • type: just the argument type;
  • ( type ) -> type: one argument and one result type;
  • ( type ) -> ( comma-separated-type-list ): one argument and multiple result types.

Unlike FunctionType, this allows and requires one to omit the parens around the argument type in absence of result types, and does not accept the trailing -> () construct, which makes the syntax nicer for operations.

Definition at line 15 of file Syntax.cpp.

References mlir::AsmParser::parseArrow(), mlir::AsmParser::parseLParen(), mlir::AsmParser::parseOptionalLParen(), mlir::AsmParser::parseRParen(), mlir::AsmParser::parseType(), and success().

◆ parseSourceFile() [1/10]

LogicalResult mlir::parseSourceFile ( const llvm::SourceMgr & sourceMgr,
Block * block,
const ParserConfig & config,
LocationAttr * sourceFileLoc = nullptr )

This parses the file specified by the indicated SourceMgr and appends parsed operations to the given block.

If the block is non-empty, the operations are placed before the current terminator. If parsing is successful, success is returned. Otherwise, an error message is emitted through the error handler registered in the context, and failure is returned. If sourceFileLoc is non-null, it is populated with a file location representing the start of the source file that is being parsed.

Definition at line 38 of file Parser.cpp.

References mlir::pdll::ast::TypeRangeType::get(), mlir::pdll::ast::TypeType::get(), mlir::pdll::ast::ValueType::get(), and mlir::pdll::ast::Context::getDiagEngine().

Referenced by mlir::lsp::MLIRServer::convertFromBytecode(), loadIRDLDialects(), mlirModuleCreateParseFromFile(), mlirQueryMain(), parseSourceFileForTool(), and mlir::transform::detail::parseTransformModuleFromFile().

◆ parseSourceFile() [2/10]

template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile ( const llvm::SourceMgr & sourceMgr,
const ParserConfig & config )
inline

This parses the file specified by the indicated SourceMgr.

If the source IR contained a single instance of ContainerOpT, it is returned. Otherwise, a new instance of ContainerOpT is constructed containing all of the parsed operations. If parsing was not successful, null is returned and an error message is emitted through the error handler registered in the context, and failure is returned. ContainerOpT is required to have a single region containing a single block, and must implement the SingleBlockImplicitTerminator trait.

Definition at line 176 of file Parser.h.

References config, and mlir::detail::parseSourceFile().

◆ parseSourceFile() [3/10]

LogicalResult mlir::parseSourceFile ( const std::shared_ptr< llvm::SourceMgr > & sourceMgr,
Block * block,
const ParserConfig & config,
LocationAttr * sourceFileLoc = nullptr )

An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR).

This is useful, for example, to avoid copying some large resources into the MLIRContext and instead referencing the data directly from the input buffers.

Definition at line 52 of file Parser.cpp.

References mlir::pdll::ast::AttributeType::get(), and mlir::pdll::ast::ValueRangeType::get().

◆ parseSourceFile() [4/10]

template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile ( const std::shared_ptr< llvm::SourceMgr > & sourceMgr,
const ParserConfig & config )
inline

An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR).

This is useful, for example, to avoid copying some large resources into the MLIRContext and instead referencing the data directly from the input buffers.

Definition at line 186 of file Parser.h.

References config, and mlir::detail::parseSourceFile().

◆ parseSourceFile() [5/10]

LogicalResult mlir::parseSourceFile ( llvm::StringRef filename,
Block * block,
const ParserConfig & config,
LocationAttr * sourceFileLoc = nullptr )

This parses the file specified by the indicated filename and appends parsed operations to the given block.

If the block is non-empty, the operations are placed before the current terminator. If parsing is successful, success is returned. Otherwise, an error message is emitted through the error handler registered in the context, and failure is returned. If sourceFileLoc is non-null, it is populated with a file location representing the start of the source file that is being parsed.

Definition at line 67 of file Parser.cpp.

◆ parseSourceFile() [6/10]

LogicalResult mlir::parseSourceFile ( llvm::StringRef filename,
const std::shared_ptr< llvm::SourceMgr > & sourceMgr,
Block * block,
const ParserConfig & config,
LocationAttr * sourceFileLoc = nullptr )

An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR).

This is useful, for example, to avoid copying some large resources into the MLIRContext and instead referencing the data directly from the input buffers.

Definition at line 100 of file Parser.cpp.

◆ parseSourceFile() [7/10]

template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile ( llvm::StringRef filename,
const std::shared_ptr< llvm::SourceMgr > & sourceMgr,
const ParserConfig & config )
inline

An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR).

This is useful, for example, to avoid copying some large resources into the MLIRContext and instead referencing the data directly from the input buffers.

Definition at line 226 of file Parser.h.

References config, and mlir::detail::parseSourceFile().

◆ parseSourceFile() [8/10]

LogicalResult mlir::parseSourceFile ( llvm::StringRef filename,
llvm::SourceMgr & sourceMgr,
Block * block,
const ParserConfig & config,
LocationAttr * sourceFileLoc = nullptr )

This parses the file specified by the indicated filename using the provided SourceMgr and appends parsed operations to the given block.

If the block is non-empty, the operations are placed before the current terminator. If parsing is successful, success is returned. Otherwise, an error message is emitted through the error handler registered in the context, and failure is returned. If sourceFileLoc is non-null, it is populated with a file location representing the start of the source file that is being parsed.

Definition at line 92 of file Parser.cpp.

◆ parseSourceFile() [9/10]

template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile ( llvm::StringRef filename,
llvm::SourceMgr & sourceMgr,
const ParserConfig & config )
inline

This parses the file specified by the indicated filename using the provided SourceMgr.

If the source IR contained a single instance of ContainerOpT, it is returned. Otherwise, a new instance of ContainerOpT is constructed containing all of the parsed operations. If parsing was not successful, null is returned and an error message is emitted through the error handler registered in the context, and failure is returned. ContainerOpT is required to have a single region containing a single block, and must implement the SingleBlockImplicitTerminator trait.

Definition at line 214 of file Parser.h.

References config, and mlir::detail::parseSourceFile().

◆ parseSourceFile() [10/10]

template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile ( StringRef filename,
const ParserConfig & config )
inline

This parses the file specified by the indicated filename.

If the source IR contained a single instance of ContainerOpT, it is returned. Otherwise, a new instance of ContainerOpT is constructed containing all of the parsed operations. If parsing was not successful, null is returned and an error message is emitted through the error handler registered in the context, and failure is returned. ContainerOpT is required to have a single region containing a single block, and must implement the SingleBlockImplicitTerminator trait.

Definition at line 200 of file Parser.h.

References config, and mlir::detail::parseSourceFile().

◆ parseSourceFileForTool()

OwningOpRef< Operation * > mlir::parseSourceFileForTool ( const std::shared_ptr< llvm::SourceMgr > & sourceMgr,
const ParserConfig & config,
bool insertImplicitModule )
inline

This parses the file specified by the indicated SourceMgr.

If parsing was not successful, null is returned and an error message is emitted through the error handler registered in the context. If 'insertImplicitModule' is true a top-level 'builtin.module' op will be inserted that contains the parsed IR, unless one exists already.

Definition at line 27 of file ParseUtilities.h.

References config, and parseSourceFile().

Referenced by loadModule(), parseMLIRInput(), and performActions().

◆ parseSourceString() [1/2]

LogicalResult mlir::parseSourceString ( llvm::StringRef sourceStr,
Block * block,
const ParserConfig & config,
StringRef sourceName = "",
LocationAttr * sourceFileLoc = nullptr )

This parses the IR string and appends parsed operations to the given block.

If the block is non-empty, the operations are placed before the current terminator. If parsing is successful, success is returned. Otherwise, an error message is emitted through the error handler registered in the context, and failure is returned. sourceName is used as the file name of the source; any IR without locations will get a FileLineColLoc location with sourceName as the file name. If sourceFileLoc is non-null, it is populated with a file location representing the start of the source file that is being parsed.

Definition at line 108 of file Parser.cpp.

References diag().

Referenced by doVerifyRoundTrip(), mlirModuleCreateParse(), mlirOperationCreateParse(), and parseSourceString().

◆ parseSourceString() [2/2]

template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceString ( llvm::StringRef sourceStr,
const ParserConfig & config,
StringRef sourceName = "" )
inline

This parses the provided string containing MLIR.

If the source IR contained a single instance of ContainerOpT, it is returned. Otherwise, a new instance of ContainerOpT is constructed containing all of the parsed operations. If parsing was not successful, null is returned and an error message is emitted through the error handler registered in the context, and failure is returned. ContainerOpT is required to have a single region containing a single block, and must implement the SingleBlockImplicitTerminator trait. sourceName is used as the file name of the source; any IR without locations will get a FileLineColLoc location with sourceName as the file name.

Definition at line 244 of file Parser.h.

References config, mlir::detail::constructContainerOpForParserIfNecessary(), and parseSourceString().

◆ parseType()

Type mlir::parseType ( llvm::StringRef typeStr,
MLIRContext * context,
size_t * numRead = nullptr,
bool isKnownNullTerminated = false )

This parses a single MLIR type to an MLIR context if it was valid.

If not, an error diagnostic is emitted to the context. If numRead is provided, it is set to the number of consumed characters on successful parse. Otherwise, parsing fails if the entire string is not consumed. Some internal copying can be skipped if the source string is known to be null terminated.

Referenced by mlirTypeParseGet(), and parseExtTypeParams().

◆ populateAffineToStdConversionPatterns()

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

Definition at line 527 of file AffineToStandard.cpp.

References patterns.

◆ populateAffineToVectorConversionPatterns()

void mlir::populateAffineToVectorConversionPatterns ( RewritePatternSet & patterns)

Collect a set of patterns to convert vector-related Affine ops to the Vector dialect.

Definition at line 545 of file AffineToStandard.cpp.

References patterns.

◆ populateAMDGPUMemorySpaceAttributeConversions()

void mlir::populateAMDGPUMemorySpaceAttributeConversions ( TypeConverter & typeConverter)

Remap AMDGPU memory spaces to LLVM address spaces by mapping amdgpu::AddressSpace::fat_raw_buffer to ptr addrspace(7), amdgpu::AddressSpace::buffer_rsrc to ptr addrspace(8), and amdgpu::AddressSpace::fat_strided_buffer to ptr addrspace(9).

Definition at line 2293 of file AMDGPUToROCDL.cpp.

Referenced by populateAMDGPUToROCDLConversionPatterns().

◆ populateAMDGPUToROCDLConversionPatterns()

void mlir::populateAMDGPUToROCDLConversionPatterns ( LLVMTypeConverter & converter,
RewritePatternSet & patterns,
amdgpu::Chipset chipset )

Note: This function will also add conversions for the AMDGPU-specific address spaces, but those can be added separately using populateAMDGPUMemorySpaceAttributeConversions().

Definition at line 2312 of file AMDGPUToROCDL.cpp.

References patterns, and populateAMDGPUMemorySpaceAttributeConversions().

◆ populateAMXLegalizeForLLVMExportPatterns()

void mlir::populateAMXLegalizeForLLVMExportPatterns ( LLVMTypeConverter & converter,
RewritePatternSet & patterns )

Collect a set of patterns to lower AMX ops to ops that map to LLVM intrinsics.

Definition at line 41 of file LegalizeForLLVMExport.cpp.

References mlir::LLVMTypeConverter::getContext(), and patterns.

◆ populateArithToEmitCPatterns()

void mlir::populateArithToEmitCPatterns ( TypeConverter & typeConverter,
RewritePatternSet & patterns )

Definition at line 806 of file ArithToEmitC.cpp.

References patterns, and populateEmitCSizeTTypeConversions().

◆ populateArmSMEToLLVMConversionPatterns()

void mlir::populateArmSMEToLLVMConversionPatterns ( LLVMTypeConverter & converter,
RewritePatternSet & patterns )

Populate the given list with patterns that convert from the ArmSME dialect to LLVM intrinsics.

Definition at line 973 of file ArmSMEToLLVM.cpp.

References mlir::arm_sme::isValidSMETileVectorType(), and patterns.

◆ populateArmSMEToSCFConversionPatterns()

void mlir::populateArmSMEToSCFConversionPatterns ( RewritePatternSet & patterns)

Collect a set of patterns to convert from the ArmSME dialect to SCF.

Definition at line 403 of file ArmSMEToSCF.cpp.

References patterns.

◆ populateArmSVELegalizeForLLVMExportPatterns()

void mlir::populateArmSVELegalizeForLLVMExportPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns )

Collect a set of patterns to lower ArmSVE ops to ops that map to LLVM intrinsics.

Populate the given list with patterns that convert from ArmSVE to LLVM.

Definition at line 187 of file LegalizeForLLVMExport.cpp.

References patterns.

◆ populateAsyncFuncToAsyncRuntimeConversionPatterns()

void mlir::populateAsyncFuncToAsyncRuntimeConversionPatterns ( RewritePatternSet & patterns,
ConversionTarget & target )

Definition at line 853 of file AsyncToAsyncRuntime.cpp.

References patterns, and target.

◆ populateAsyncStructuralTypeConversionsAndLegality()

void mlir::populateAsyncStructuralTypeConversionsAndLegality ( TypeConverter & typeConverter,
RewritePatternSet & patterns,
ConversionTarget & target )

Populates patterns for async structural type conversions.

A "structural" type conversion is one where the underlying ops are completely agnostic to the actual types involved and simply need to update their types. An example of this is async.execute – the async.execute op and the corresponding async.yield ops need to update their types accordingly to the TypeConverter, but otherwise don't care what type conversions are happening.

Definition at line 1151 of file AsyncToLLVM.cpp.

References patterns, and target.

◆ populateBranchOpInterfaceTypeConversionPattern()

void mlir::populateBranchOpInterfaceTypeConversionPattern ( RewritePatternSet & patterns,
const TypeConverter & converter,
function_ref< bool(BranchOpInterface branchOp, int idx)> shouldConvertBranchOperand = nullptr,
PatternBenefit benefit = 1 )

Add a pattern to the given pattern list to rewrite branch operations to use operands that have been legalized by the conversion framework.

This can only be done if the branch operation implements the BranchOpInterface. Only needed for partial conversions.

If for some branch ops, we need to convert/legalize only a sub-set of the op's operands, such filtering behavior can be specified in shouldConvertBranchOperand. This callback should return true if branchOp's operand at index idx should be converted.

References patterns.

◆ populateBubbleDownMemorySpaceCastPatterns()

void mlir::populateBubbleDownMemorySpaceCastPatterns ( RewritePatternSet & patterns,
PatternBenefit benefit )

Collect a set of patterns to bubble-down memory-space cast operations.

Definition at line 66 of file BubbleDownMemorySpaceCasts.cpp.

References patterns.

Referenced by mlir::impl::BubbleDownMemorySpaceCastsBase< DerivedT >::getArgumentName().

◆ populateBuiltinFuncToSPIRVPatterns()

void mlir::populateBuiltinFuncToSPIRVPatterns ( const SPIRVTypeConverter & typeConverter,
RewritePatternSet & patterns )

Appends to a pattern list additional patterns for translating the builtin func op to the SPIR-V dialect.

These patterns do not handle shader interface/ABI; they convert function parameters to be of SPIR-V allowed types.

Definition at line 1712 of file SPIRVConversion.cpp.

References patterns.

◆ populateCallOpTypeConversionPattern()

void mlir::populateCallOpTypeConversionPattern ( RewritePatternSet & patterns,
const TypeConverter & converter,
PatternBenefit benefit = 1 )

Add a pattern to the given pattern list to convert the operand and result types of a CallOp with the given type converter.

Definition at line 67 of file FuncConversions.cpp.

References patterns.

Referenced by mlir::arith::populateArithNarrowTypeEmulationPatterns().

◆ populateCommutativityUtilsPatterns()

void mlir::populateCommutativityUtilsPatterns ( RewritePatternSet & patterns)

Populates the commutativity utility patterns.

Definition at line 311 of file CommutativityUtils.cpp.

References patterns.

◆ populateComplexToLibmConversionPatterns()

void mlir::populateComplexToLibmConversionPatterns ( RewritePatternSet & patterns,
PatternBenefit benefit )

Populate the given list with patterns that convert from Complex to Libm calls.

Definition at line 99 of file ComplexToLibm.cpp.

References patterns.

◆ populateComplexToLLVMConversionPatterns()

void mlir::populateComplexToLLVMConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
mlir::complex::ComplexRangeFlags complexRange = mlir::complex::ComplexRangeFlags::basic )

Populate the given list with patterns that convert from Complex to LLVM.

References patterns.

◆ populateComplexToROCDLLibraryCallsConversionPatterns()

void mlir::populateComplexToROCDLLibraryCallsConversionPatterns ( RewritePatternSet & patterns)

Populate the given list with patterns that convert from Complex to ROCDL calls.

Definition at line 109 of file ComplexToROCDLLibraryCalls.cpp.

References patterns.

◆ populateComplexToSPIRVPatterns()

void mlir::populateComplexToSPIRVPatterns ( const SPIRVTypeConverter & typeConverter,
RewritePatternSet & patterns )

Appends to a pattern list additional patterns for translating Complex ops to SPIR-V ops.

Definition at line 103 of file ComplexToSPIRV.cpp.

References patterns.

◆ populateComplexToStandardConversionPatterns()

void mlir::populateComplexToStandardConversionPatterns ( RewritePatternSet & patterns,
mlir::complex::ComplexRangeFlags complexRange = mlir::complex::ComplexRangeFlags::improved )

Populate the given list with patterns that convert from Complex to Standard.

References patterns.

◆ populateConversionTargetFromOperation() [1/2]

void mlir::populateConversionTargetFromOperation ( Operation * op,
ConversionTarget & target,
LLVMTypeConverter & typeConverter,
RewritePatternSet & patterns )

Recursively walk the IR and collect all dialects implementing the interface, and populate the conversion patterns.

Definition at line 15 of file ToLLVMInterface.cpp.

References mlir::Operation::getDialect(), patterns, target, and mlir::Operation::walk().

◆ populateConversionTargetFromOperation() [2/2]

void mlir::populateConversionTargetFromOperation ( Operation * op,
ConversionTarget & target,
TypeConverter & typeConverter,
RewritePatternSet & patterns )

Recursively walk the IR and collect all dialects implementing the interface, and populate the conversion patterns.

References patterns, and target.

◆ populateConvertArmNeon2dToIntrPatterns()

void mlir::populateConvertArmNeon2dToIntrPatterns ( RewritePatternSet & patterns)

Populates patterns for the lowering of Arm NEON 2D ops to intrinsics.

See createConvertArmNeon2dToIntrPass.

Definition at line 68 of file ArmNeon2dToIntr.cpp.

References patterns.

◆ populateConvertMathToEmitCPatterns()

void mlir::populateConvertMathToEmitCPatterns ( RewritePatternSet & patterns,
emitc::LanguageTarget languageTarget )

Definition at line 60 of file MathToEmitC.cpp.

References patterns.

◆ populateConvertShapeConstraintsConversionPatterns()

void mlir::populateConvertShapeConstraintsConversionPatterns ( RewritePatternSet & patterns)

Definition at line 42 of file ConvertShapeConstraints.cpp.

References patterns.

◆ populateEmitCSizeTTypeConversions()

void mlir::populateEmitCSizeTTypeConversions ( TypeConverter & converter)

Definition at line 30 of file TypeConversions.cpp.

Referenced by populateArithToEmitCPatterns().

◆ populateFinalizeMemRefToLLVMConversionPatterns()

void mlir::populateFinalizeMemRefToLLVMConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
SymbolTableCollection * symbolTables = nullptr )

Collect a set of patterns to convert memory-related operations from the MemRef dialect to the LLVM dialect.

Definition at line 2038 of file MemRefToLLVM.cpp.

References mlir::LowerToLLVMOptions::AlignedAlloc, mlir::LowerToLLVMOptions::allocLowering, mlir::LLVMTypeConverter::getOptions(), mlir::LowerToLLVMOptions::Malloc, and patterns.

◆ populateFuncOpVectorRewritePatterns()

void mlir::populateFuncOpVectorRewritePatterns ( RewritePatternSet & patterns)

Definition at line 1717 of file SPIRVConversion.cpp.

References patterns.

Referenced by mlir::spirv::unrollVectorsInSignatures().

◆ populateFuncToEmitCPatterns()

void mlir::populateFuncToEmitCPatterns ( const TypeConverter & typeConverter,
RewritePatternSet & patterns )

Definition at line 164 of file FuncToEmitC.cpp.

References patterns.

◆ populateFuncToLLVMConversionPatterns()

void mlir::populateFuncToLLVMConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
SymbolTableCollection * symbolTables = nullptr )

Collect the patterns to convert from the Func dialect to LLVM.

The conversion patterns capture the LLVMTypeConverter and the LowerToLLVMOptions by reference meaning the references have to remain alive during the entire pattern lifetime.

The symbolTable parameter can be used to speed up function lookups in the module. It's good to provide it, but only if we know that the patterns will be applied to a single module and the symbols referenced by the symbol table will not be removed and new symbols will not be added during the usage of the patterns. If provided, the lookups will have O(calls) cumulative runtime, otherwise O(calls * functions). The symbol table is currently not needed if converter.getOptions().useBarePtrCallConv is true, but it's not an error to provide it anyway.

Definition at line 791 of file FuncToLLVM.cpp.

References patterns, and populateFuncToLLVMFuncOpConversionPattern().

◆ populateFuncToLLVMFuncOpConversionPattern()

void mlir::populateFuncToLLVMFuncOpConversionPattern ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
SymbolTableCollection * symbolTables = nullptr )

Collect the default pattern to convert a FuncOp to the LLVM dialect.

If emitCWrappers is set, the pattern will also produce functions that pass memref descriptors by pointer-to-structure in addition to the default unpacked form.

Definition at line 785 of file FuncToLLVM.cpp.

References patterns.

Referenced by populateFuncToLLVMConversionPatterns().

◆ populateFuncToSPIRVPatterns()

void mlir::populateFuncToSPIRVPatterns ( const SPIRVTypeConverter & typeConverter,
RewritePatternSet & patterns )

Appends to a pattern list additional patterns for translating Func ops to SPIR-V ops.

Also adds the patterns to legalize ops not directly translated to SPIR-V dialect.

Definition at line 87 of file FuncToSPIRV.cpp.

References patterns.

◆ populateGpuAllReducePatterns()

void mlir::populateGpuAllReducePatterns ( RewritePatternSet & patterns)

Collect a set of patterns to rewrite all-reduce ops within the GPU dialect.

Definition at line 377 of file AllReduceLowering.cpp.

References patterns.

Referenced by populateGpuRewritePatterns().

◆ populateGpuBreakDownSubgroupReducePatterns()

void mlir::populateGpuBreakDownSubgroupReducePatterns ( RewritePatternSet & patterns,
unsigned maxShuffleBitwidth = 32,
PatternBenefit benefit = 1 )

Collect a set of patterns to break down subgroup_reduce ops into smaller ones supported by the target of size <= maxShuffleBitwidth, where size is the subgroup_reduce value bitwidth.

Definition at line 563 of file SubgroupReduceLowering.cpp.

References patterns.

◆ populateGpuDecomposeMemrefsPatterns()

void mlir::populateGpuDecomposeMemrefsPatterns ( RewritePatternSet & patterns)

Collect a set of patterns to decompose memrefs ops.

Definition at line 236 of file DecomposeMemRefs.cpp.

References patterns.

◆ populateGpuEliminateBarriersPatterns()

void mlir::populateGpuEliminateBarriersPatterns ( RewritePatternSet & patterns)

Erase barriers that do not enforce conflicting memory side effects.

Definition at line 617 of file EliminateBarriers.cpp.

References patterns.

◆ populateGpuGlobalIdPatterns()

void mlir::populateGpuGlobalIdPatterns ( RewritePatternSet & patterns)

Collect a set of patterns to rewrite GlobalIdOp op within the GPU dialect.

Definition at line 41 of file GlobalIdRewriter.cpp.

References patterns.

Referenced by populateGpuRewritePatterns().

◆ populateGpuLowerClusteredSubgroupReduceToDPPPatterns()

void mlir::populateGpuLowerClusteredSubgroupReduceToDPPPatterns ( RewritePatternSet & patterns,
unsigned subgroupSize,
amdgpu::Chipset chipset,
PatternBenefit benefit = 1 )

Disjoint counterpart of populateGpuLowerSubgroupReduceToDPPPatterns that only matches gpu.subgroup_reduce ops with a cluster_size.

Definition at line 579 of file SubgroupReduceLowering.cpp.

References patterns.

◆ populateGpuLowerClusteredSubgroupReduceToShufflePatterns()

void mlir::populateGpuLowerClusteredSubgroupReduceToShufflePatterns ( RewritePatternSet & patterns,
unsigned subgroupSize,
unsigned shuffleBitwidth = 32,
PatternBenefit benefit = 1 )

Disjoint counterpart of populateGpuLowerSubgroupReduceToShufflePatterns that only matches gpu.subgroup_reduce ops with a cluster_size.

Definition at line 595 of file SubgroupReduceLowering.cpp.

References patterns.

◆ populateGpuLowerSubgroupReduceToDPPPatterns()

void mlir::populateGpuLowerSubgroupReduceToDPPPatterns ( RewritePatternSet & patterns,
unsigned subgroupSize,
amdgpu::Chipset chipset,
PatternBenefit benefit = 1 )

Collect a set of patterns to lower gpu.subgroup_reduce into amdgpu.dpp ops over scalar types.

Assumes that the subgroup has subgroupSize lanes. Applicable only to AMD GPUs.

Definition at line 571 of file SubgroupReduceLowering.cpp.

References patterns.

◆ populateGpuLowerSubgroupReduceToShufflePatterns()

void mlir::populateGpuLowerSubgroupReduceToShufflePatterns ( RewritePatternSet & patterns,
unsigned subgroupSize,
unsigned shuffleBitwidth = 32,
PatternBenefit benefit = 1 )

Collect a set of patterns to lower gpu.subgroup_reduce into gpu.shuffle ops over shuffleBitwidth scalar types.

Assumes that the subgroup has subgroupSize lanes. Uses the butterfly shuffle algorithm.

The patterns populated by this function will ignore ops with the cluster_size attribute. populateGpuLowerClusteredSubgroupReduceToShufflePatterns is the opposite.

Definition at line 587 of file SubgroupReduceLowering.cpp.

References patterns.

◆ populateGpuMemorySpaceAttributeConversions() [1/2]

void mlir::populateGpuMemorySpaceAttributeConversions ( TypeConverter & typeConverter)

Populates memory space attribute conversion rules for lowering gpu.address_space to integer values.

Definition at line 534 of file GPUToLLVMSPV.cpp.

References populateGpuMemorySpaceAttributeConversions().

◆ populateGpuMemorySpaceAttributeConversions() [2/2]

void mlir::populateGpuMemorySpaceAttributeConversions ( TypeConverter & typeConverter,
const MemorySpaceMapping & mapping )

Populates memory space attribute conversion rules for lowering gpu.address_space to integer values.

Definition at line 818 of file GPUOpsLowering.cpp.

References wrapNumericMemorySpace().

Referenced by configureGpuToNVVMTypeConverter(), and populateGpuMemorySpaceAttributeConversions().

◆ populateGpuPromoteShuffleToAMDGPUPatterns()

void mlir::populateGpuPromoteShuffleToAMDGPUPatterns ( RewritePatternSet & patterns,
std::optional< amdgpu::Chipset > maybeChipset )

Tries to promote gpu.shuffles to specialized AMDGPU intrinsics.

Definition at line 101 of file PromoteShuffleToAMDGPU.cpp.

References kGfx950, and patterns.

◆ populateGpuRewritePatterns()

void mlir::populateGpuRewritePatterns ( RewritePatternSet & patterns)
inline

Collect all patterns to rewrite ops within the GPU dialect.

Definition at line 91 of file Passes.h.

References patterns, populateGpuAllReducePatterns(), populateGpuGlobalIdPatterns(), and populateGpuShufflePatterns().

◆ populateGpuShufflePatterns()

void mlir::populateGpuShufflePatterns ( RewritePatternSet & patterns)

Collect a set of patterns to rewrite shuffle ops within the GPU dialect.

Definition at line 95 of file ShuffleRewriter.cpp.

References patterns.

Referenced by populateGpuRewritePatterns().

◆ populateGpuSubgroupIdPatterns()

void mlir::populateGpuSubgroupIdPatterns ( RewritePatternSet & patterns)

Collect a set of patterns to rewrite SubgroupIdOp op within the GPU dialect.

Definition at line 83 of file SubgroupIdRewriter.cpp.

References patterns.

◆ populateGpuSubgroupReduceOpLoweringPattern()

void mlir::populateGpuSubgroupReduceOpLoweringPattern ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
PatternBenefit benefit = 1 )

Populate GpuSubgroupReduce pattern to NVVM.

It generates a specific nvvm op that is not available on every GPU.

Definition at line 598 of file LowerGpuOpsToNVVMOps.cpp.

References patterns.

◆ populateGpuToLLVMConversionPatterns()

void mlir::populateGpuToLLVMConversionPatterns ( LLVMTypeConverter & converter,
RewritePatternSet & patterns,
bool kernelBarePtrCallConv = false,
bool kernelIntersperseSizeCallConv = false )

Collect a set of patterns to convert from the GPU dialect to LLVM and populate converter for gpu types.

Definition at line 1790 of file GPUToLLVMConversion.cpp.

References addOpaquePointerConversion(), and patterns.

◆ populateGpuToLLVMSPVConversionPatterns()

void mlir::populateGpuToLLVMSPVConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns )

Definition at line 505 of file GPUToLLVMSPV.cpp.

References mlir::LLVMTypeConverter::getContext(), and patterns.

◆ populateGpuToNVVMConversionPatterns()

void mlir::populateGpuToNVVMConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
PatternBenefit benefit = 1 )

Collect a set of patterns to convert from the GPU dialect to NVVM.

Definition at line 695 of file LowerGpuOpsToNVVMOps.cpp.

References mlir::LLVMTypeConverter::getContext(), mlir::NVVM::kSharedMemoryAlignmentBit, patterns, and populateLibDeviceConversionPatterns().

◆ populateGpuToROCDLConversionPatterns()

void mlir::populateGpuToROCDLConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
gpu::amd::Runtime runtime,
amdgpu::Chipset chipset )

Collect a set of patterns to convert from the GPU dialect to ROCDL.

If runtime is Unknown, gpu.printf will not be lowered The resulting pattern set should be run over a gpu.module op

Definition at line 443 of file LowerGpuOpsToROCDLOps.cpp.

References mlir::LLVMTypeConverter::getContext(), mlir::MLIRContext::getLoadedDialect(), patterns, and populateMathToROCDLConversionPatterns().

◆ populateGPUToSPIRVPatterns()

void mlir::populateGPUToSPIRVPatterns ( const SPIRVTypeConverter & typeConverter,
RewritePatternSet & patterns )

Appends to a pattern list additional patterns for translating GPU Ops to SPIR-V ops.

For a gpu.func to be converted, it should have a spirv.entry_point_abi attribute.

Definition at line 830 of file GPUToSPIRV.cpp.

References patterns.

◆ populateGpuWMMAToNVVMConversionPatterns()

void mlir::populateGpuWMMAToNVVMConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
PatternBenefit benefit = 1 )

Collect a set of patterns to convert WMMA ops from GPU dialect to NVVM.

Definition at line 391 of file WmmaOpsToNvvm.cpp.

References patterns.

◆ populateGpuWMMAToSPIRVCoopMatrixKHRConversionPatterns()

void mlir::populateGpuWMMAToSPIRVCoopMatrixKHRConversionPatterns ( const SPIRVTypeConverter & typeConverter,
RewritePatternSet & patterns )

Collect a set of patterns to convert WMMA ops from GPU dialect to SPIRV, using the KHR Cooperative Matrix extension.

Definition at line 355 of file WmmaOpsToSPIRV.cpp.

References patterns.

◆ populateLibDeviceConversionPatterns()

void mlir::populateLibDeviceConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
PatternBenefit benefit = 1 )

Populate patterns that lower certain arith and math dialect ops to libdevice calls.

Definition at line 604 of file LowerGpuOpsToNVVMOps.cpp.

References patterns, populateFloatIntOpPatterns(), populateIntOpPatterns(), and populateOpPatterns().

Referenced by populateGpuToNVVMConversionPatterns().

◆ populateLowerContractionToSVEBFMMLAPatterns()

void mlir::populateLowerContractionToSVEBFMMLAPatterns ( RewritePatternSet & patterns)

Definition at line 590 of file LowerContractToSVEPatterns.cpp.

References patterns.

◆ populateLowerContractionToSVEI8MMPatterns()

void mlir::populateLowerContractionToSVEI8MMPatterns ( RewritePatternSet & patterns)

Definition at line 584 of file LowerContractToSVEPatterns.cpp.

References patterns.

◆ populateLowerForeachToSCFPatterns()

void mlir::populateLowerForeachToSCFPatterns ( RewritePatternSet & patterns)

Definition at line 1595 of file SparseTensorRewriting.cpp.

References patterns.

◆ populateLowerSparseIterationToSCFPatterns()

void mlir::populateLowerSparseIterationToSCFPatterns ( const TypeConverter & converter,
RewritePatternSet & patterns )

Definition at line 452 of file SparseIterationToScf.cpp.

References patterns.

◆ populateLowerSparseOpsToForeachPatterns()

void mlir::populateLowerSparseOpsToForeachPatterns ( RewritePatternSet & patterns,
bool enableRT,
bool enableConvert )

Definition at line 1579 of file SparseTensorRewriting.cpp.

References patterns.

◆ populateMathAlgebraicSimplificationPatterns()

void mlir::populateMathAlgebraicSimplificationPatterns ( RewritePatternSet & patterns)

Definition at line 246 of file AlgebraicSimplification.cpp.

References patterns.

◆ populateMathF32ExpansionPatterns()

void mlir::populateMathF32ExpansionPatterns ( RewritePatternSet & patterns,
llvm::function_ref< bool(StringRef)> predicate,
PatternBenefit benefit = 1 )

◆ populateMathPolynomialApproximationPatterns() [1/2]

void mlir::populateMathPolynomialApproximationPatterns ( RewritePatternSet & patterns,
const MathPolynomialApproximationOptions & options = {} )

◆ populateMathPolynomialApproximationPatterns() [2/2]

void mlir::populateMathPolynomialApproximationPatterns ( RewritePatternSet & patterns,
llvm::function_ref< bool(StringRef)> predicate,
PatternBenefit benefit = 1 )

◆ populateMathToLibmConversionPatterns()

void mlir::populateMathToLibmConversionPatterns ( RewritePatternSet & patterns,
PatternBenefit benefit = 1 )

Populate the given list with patterns that convert from Math to Libm calls.

If log1pBenefit is present, use it instead of benefit for the Log1p op.

Definition at line 163 of file MathToLibm.cpp.

References patterns.

◆ populateMathToLLVMConversionPatterns()

void mlir::populateMathToLLVMConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
bool approximateLog1p = true,
PatternBenefit benefit = 1 )

Definition at line 396 of file MathToLLVM.cpp.

References patterns.

◆ populateMathToROCDLConversionPatterns()

void mlir::populateMathToROCDLConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
std::optional< amdgpu::Chipset > chipset )

Populate the given list with patterns that convert from Math to ROCDL calls.

Definition at line 85 of file MathToROCDL.cpp.

References patterns, and populateOpPatterns().

Referenced by populateGpuToROCDLConversionPatterns(), and ConvertMathToROCDLPass::runOnOperation().

◆ populateMathToSPIRVPatterns()

void mlir::populateMathToSPIRVPatterns ( const SPIRVTypeConverter & typeConverter,
RewritePatternSet & patterns )

Appends to a pattern list additional patterns for translating Math ops to SPIR-V ops.

Definition at line 488 of file MathToSPIRV.cpp.

References patterns.

◆ populateMathToXeVMConversionPatterns()

void mlir::populateMathToXeVMConversionPatterns ( RewritePatternSet & patterns,
bool convertArith )

Populate the given list with patterns that convert from Math to XeVM calls.

Definition at line 122 of file MathToXeVM.cpp.

References patterns.

◆ populateMemRefToEmitCConversionPatterns()

void mlir::populateMemRefToEmitCConversionPatterns ( RewritePatternSet & patterns,
const TypeConverter & converter )

Definition at line 407 of file MemRefToEmitC.cpp.

References patterns.

◆ populateMemRefToEmitCTypeConversion()

void mlir::populateMemRefToEmitCTypeConversion ( TypeConverter & typeConverter)

Definition at line 379 of file MemRefToEmitC.cpp.

References isMemRefTypeLegalForEmitC().

◆ populateMemRefToSPIRVPatterns()

void mlir::populateMemRefToSPIRVPatterns ( const SPIRVTypeConverter & typeConverter,
RewritePatternSet & patterns )

Appends to a pattern list additional patterns for translating MemRef ops to SPIR-V ops.

Definition at line 1105 of file MemRefToSPIRV.cpp.

References patterns.

◆ populateMMAToSPIRVCoopMatrixTypeConversion()

void mlir::populateMMAToSPIRVCoopMatrixTypeConversion ( mlir::SPIRVTypeConverter & typeConverter)

Adds MMAMatrixType conversions to SPIR-V cooperative matrix KHR type conversion to the type converter.

Definition at line 368 of file WmmaOpsToSPIRV.cpp.

References mlir::spirv::CooperativeMatrixType::get(), mlir::gpu::MMAMatrixType::getElementType(), mlir::gpu::MMAMatrixType::getOperand(), and mlir::gpu::MMAMatrixType::getShape().

◆ populateNVGPUToNVVMConversionPatterns()

void mlir::populateNVGPUToNVVMConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns )

Definition at line 1718 of file NVGPUToNVVM.cpp.

References patterns.

◆ populateNVVMToLLVMConversionPatterns()

void mlir::populateNVVMToLLVMConversionPatterns ( RewritePatternSet & patterns)

Definition at line 112 of file NVVMToLLVM.cpp.

References patterns.

◆ populateOpConvertToLLVMConversionPatterns()

void mlir::populateOpConvertToLLVMConversionPatterns ( Operation * op,
ConversionTarget & target,
LLVMTypeConverter & typeConverter,
RewritePatternSet & patterns )

Helper function for populating LLVM conversion patterns.

If op implements the ConvertToLLVMOpInterface interface, then the LLVM conversion pattern attributes provided by the interface will be used to configure the conversion target, type converter, and the pattern set.

Definition at line 33 of file ToLLVMInterface.cpp.

References mlir::Operation::getParentOfType(), patterns, and target.

◆ populateOpenACCToSCFConversionPatterns()

void mlir::populateOpenACCToSCFConversionPatterns ( RewritePatternSet & patterns)

Collect the patterns to convert from the OpenACC dialect to OpenACC with SCF dialect.

Definition at line 59 of file OpenACCToSCF.cpp.

References patterns.

◆ populateOpenMPToLLVMConversionPatterns()

void mlir::populateOpenMPToLLVMConversionPatterns ( LLVMTypeConverter & converter,
RewritePatternSet & patterns )

Populate the given list with patterns that convert from OpenMP to LLVM.

Definition at line 147 of file OpenMPToLLVM.cpp.

References addOpenMPOpConversions(), and patterns.

◆ populateParallelLoopToGPUPatterns()

void mlir::populateParallelLoopToGPUPatterns ( RewritePatternSet & patterns)

Adds the conversion pattern from scf.parallel to gpu.launch to the provided pattern list.

Definition at line 770 of file SCFToGPU.cpp.

References patterns.

◆ populatePolynomialApproximateErfcPattern()

void mlir::populatePolynomialApproximateErfcPattern ( RewritePatternSet & patterns)

Definition at line 1778 of file PolynomialApproximation.cpp.

References patterns.

◆ populatePolynomialApproximateErfPattern()

void mlir::populatePolynomialApproximateErfPattern ( RewritePatternSet & patterns)

Definition at line 1773 of file PolynomialApproximation.cpp.

References patterns.

◆ populatePolynomialApproximateTanhPattern()

void mlir::populatePolynomialApproximateTanhPattern ( RewritePatternSet & patterns)

Definition at line 1768 of file PolynomialApproximation.cpp.

References patterns.

◆ populatePrepareVectorToMMAPatterns()

void mlir::populatePrepareVectorToMMAPatterns ( RewritePatternSet & patterns,
bool useNvGpu = false )

Patterns to transform vector ops into a canonical form to convert to MMA matrix operations.

If useNvGpu is true, then the patterns will populated will prepare for conversion to nvgpu mma operations rather than the gpu dialect WMMA operations.

Definition at line 1229 of file VectorToGPU.cpp.

References patterns, and mlir::vector::populateVectorContractCanonicalizeMatmulToMMT().

◆ populatePreSparsificationRewriting()

void mlir::populatePreSparsificationRewriting ( RewritePatternSet & patterns)

Definition at line 1572 of file SparseTensorRewriting.cpp.

References patterns.

◆ populateRemoveShapeConstraintsPatterns()

void mlir::populateRemoveShapeConstraintsPatterns ( RewritePatternSet & patterns)

Definition at line 64 of file RemoveShapeConstraints.cpp.

References patterns.

◆ populateReturnOpTypeConversionPattern()

void mlir::populateReturnOpTypeConversionPattern ( RewritePatternSet & patterns,
const TypeConverter & converter,
PatternBenefit benefit = 1 )

Add a pattern to the given pattern list to rewrite return ops to use operands that have been legalized by the conversion framework.

Definition at line 164 of file FuncConversions.cpp.

References patterns.

Referenced by mlir::arith::populateArithNarrowTypeEmulationPatterns().

◆ populateReturnOpVectorRewritePatterns()

void mlir::populateReturnOpVectorRewritePatterns ( RewritePatternSet & patterns)

Definition at line 1721 of file SPIRVConversion.cpp.

References patterns.

Referenced by mlir::spirv::unrollVectorsInSignatures().

◆ populateSCFToControlFlowConversionPatterns()

void mlir::populateSCFToControlFlowConversionPatterns ( RewritePatternSet & patterns)

Collect a set of patterns to convert SCF operations to CFG branch-based operations within the ControlFlow dialect.

Definition at line 723 of file SCFToControlFlow.cpp.

References patterns.

◆ populateSCFToEmitCConversionPatterns()

void mlir::populateSCFToEmitCConversionPatterns ( RewritePatternSet & patterns,
TypeConverter & typeConverter )

Collect a set of patterns to convert SCF operations to the EmitC dialect.

Definition at line 504 of file SCFToEmitC.cpp.

References patterns.

◆ populateSCFToSPIRVPatterns()

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

Definition at line 448 of file SCFToSPIRV.cpp.

References mlir::ScfToSPIRVContext::getImpl(), and patterns.

◆ populateShapeRewritePatterns()

void mlir::populateShapeRewritePatterns ( RewritePatternSet & patterns)

Collects a set of patterns to rewrite ops within the Shape dialect.

Definition at line 80 of file ShapeToShapeLowering.cpp.

References patterns.

◆ populateShapeToStandardConversionPatterns()

void mlir::populateShapeToStandardConversionPatterns ( RewritePatternSet & patterns)

Definition at line 708 of file ShapeToStandard.cpp.

References patterns.

◆ populateSparseAssembler()

void mlir::populateSparseAssembler ( RewritePatternSet & patterns,
bool directOut )

Definition at line 249 of file SparseAssembler.cpp.

References patterns.

◆ populateSparseBufferRewriting()

void mlir::populateSparseBufferRewriting ( RewritePatternSet & patterns,
bool enableBufferInitialization )

Definition at line 1430 of file SparseBufferRewriting.cpp.

References patterns.

◆ populateSparseGPUCodegenPatterns()

void mlir::populateSparseGPUCodegenPatterns ( RewritePatternSet & patterns,
unsigned numThreads )

Definition at line 1334 of file SparseGPUCodegen.cpp.

References patterns.

◆ populateSparseGPULibgenPatterns()

void mlir::populateSparseGPULibgenPatterns ( RewritePatternSet & patterns,
bool enableRT )

Definition at line 1339 of file SparseGPUCodegen.cpp.

References patterns.

◆ populateSparseReinterpretMap()

Definition at line 796 of file SparseReinterpretMap.cpp.

References kAll, kExceptGeneric, kGenericOnly, and patterns.

◆ populateSparseTensorCodegenPatterns()

void mlir::populateSparseTensorCodegenPatterns ( const TypeConverter & typeConverter,
RewritePatternSet & patterns,
bool createSparseDeallocs,
bool enableBufferInitialization )

Sets up sparse tensor codegen rules.

Populates the given patterns list with conversion rules required for the sparsification of linear algebra operations.

Definition at line 1615 of file SparseTensorCodegen.cpp.

References patterns.

◆ populateSparseTensorConversionPatterns()

void mlir::populateSparseTensorConversionPatterns ( const TypeConverter & typeConverter,
RewritePatternSet & patterns )

Sets up sparse tensor conversion rules.

Populates the given patterns list with conversion rules required for the sparsification of linear algebra operations.

Definition at line 914 of file SparseTensorConversion.cpp.

References patterns.

◆ populateSparseVectorizationPatterns()

void mlir::populateSparseVectorizationPatterns ( RewritePatternSet & patterns,
unsigned vectorLength,
bool enableVLAVectorization,
bool enableSIMDIndex32 )

Populates the given patterns list with vectorization rules.

Definition at line 682 of file SparseVectorization.cpp.

References patterns, and mlir::vector::populateVectorStepLoweringPatterns().

◆ populateSparsificationPatterns()

void mlir::populateSparsificationPatterns ( RewritePatternSet & patterns,
const SparsificationOptions & options = SparsificationOptions() )

Sets up sparsification rewriting rules with the given options.

Populates the given patterns list with rewriting rules required for the sparsification of linear algebra operations.

Definition at line 1482 of file Sparsification.cpp.

References options, and patterns.

◆ populateSPIRVToLLVMConversionPatterns()

void mlir::populateSPIRVToLLVMConversionPatterns ( const LLVMTypeConverter & typeConverter,
RewritePatternSet & patterns,
spirv::ClientAPI clientAPIForAddressSpaceMapping = spirv::ClientAPI::Unknown )

Populates the given list with patterns that convert from SPIR-V to LLVM.

Definition at line 1790 of file SPIRVToLLVM.cpp.

References patterns.

◆ populateSPIRVToLLVMFunctionConversionPatterns()

void mlir::populateSPIRVToLLVMFunctionConversionPatterns ( const LLVMTypeConverter & typeConverter,
RewritePatternSet & patterns )

Populates the given list with patterns for function conversion from SPIR-V to LLVM.

Definition at line 1956 of file SPIRVToLLVM.cpp.

References patterns.

◆ populateSPIRVToLLVMModuleConversionPatterns()

void mlir::populateSPIRVToLLVMModuleConversionPatterns ( const LLVMTypeConverter & typeConverter,
RewritePatternSet & patterns )

Populates the given patterns for module conversion from SPIR-V to LLVM.

Definition at line 1961 of file SPIRVToLLVM.cpp.

References patterns.

◆ populateSPIRVToLLVMTypeConversion()

void mlir::populateSPIRVToLLVMTypeConversion ( LLVMTypeConverter & typeConverter,
spirv::ClientAPI clientAPIForAddressSpaceMapping = spirv::ClientAPI::Unknown )

Populates type conversions with additional SPIR-V types.

Definition at line 1774 of file SPIRVToLLVM.cpp.

References convertArrayType(), convertPointerType(), convertRuntimeArrayType(), and convertStructType().

◆ populateStageSparseOperationsPatterns()

void mlir::populateStageSparseOperationsPatterns ( RewritePatternSet & patterns)

Sets up StageSparseOperation rewriting rules.

Definition at line 70 of file StageSparseOperations.cpp.

References patterns.

◆ populateStorageSpecifierToLLVMPatterns()

void mlir::populateStorageSpecifierToLLVMPatterns ( const TypeConverter & converter,
RewritePatternSet & patterns )

Definition at line 353 of file SparseStorageSpecifierToLLVM.cpp.

References patterns.

◆ populateTensorToLinalgPatterns()

void mlir::populateTensorToLinalgPatterns ( RewritePatternSet & patterns)

Appends to a pattern list additional patterns for translating tensor ops to Linalg ops.

Definition at line 24 of file TensorToLinalg.cpp.

References patterns.

◆ populateTensorToSPIRVPatterns()

void mlir::populateTensorToSPIRVPatterns ( const SPIRVTypeConverter & typeConverter,
int64_t byteCountThreshold,
RewritePatternSet & patterns )

Appends to a pattern list additional patterns for translating tensor ops to SPIR-V ops.

Note: Normally tensors will be stored in buffers before converting to SPIR-V, given that is how a large amount of data is sent to the GPU. However, SPIR-V supports converting from tensors directly too. This is for the cases where the tensor just contains a small amount of elements and it makes sense to directly inline them as a small data array in the shader. To handle this, internally the conversion might create new local variables. SPIR-V consumers in GPU drivers may or may not optimize that away. So this has implications over register pressure. Therefore, a threshold is used to control when the patterns should kick in.

Definition at line 103 of file TensorToSPIRV.cpp.

References patterns.

◆ populateUpliftToFMAPatterns()

void mlir::populateUpliftToFMAPatterns ( RewritePatternSet & patterns)

Definition at line 76 of file UpliftToFMA.cpp.

References patterns.

◆ populateVectorReductionToSPIRVDotProductPatterns()

void mlir::populateVectorReductionToSPIRVDotProductPatterns ( RewritePatternSet & patterns)

Appends patterns to convert vector reduction of the form:

vector.reduction <add>, (muli (ext %lhs), (ext %rhs)), [%acc]
lhs
#define add(a, b)

to SPIR-V integer dot product ops.

Definition at line 1092 of file VectorToSPIRV.cpp.

References patterns.

◆ populateVectorToAMXConversionPatterns()

void mlir::populateVectorToAMXConversionPatterns ( RewritePatternSet & patterns)

Collect a set of patterns to convert from the vector to AMX ops.

Definition at line 426 of file VectorToAMX.cpp.

References patterns.

◆ populateVectorToArmSMEPatterns()

void mlir::populateVectorToArmSMEPatterns ( RewritePatternSet & patterns,
MLIRContext & ctx )

Collect a set of patterns to lower Vector ops to ArmSME ops that map to LLVM intrinsics.

Definition at line 736 of file VectorToArmSME.cpp.

References patterns.

◆ populateVectorToLLVMConversionPatterns()

void mlir::populateVectorToLLVMConversionPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns,
bool reassociateFPReductions = false,
bool force32BitVectorIndices = false,
bool useVectorAlignment = false )

Collect a set of patterns to convert from the Vector dialect to LLVM.

Populate the given list with patterns that convert from Vector to LLVM.

Definition at line 2199 of file ConvertVectorToLLVM.cpp.

References mlir::LLVMTypeConverter::getDialect(), and patterns.

◆ populateVectorToSCFConversionPatterns()

void mlir::populateVectorToSCFConversionPatterns ( RewritePatternSet & patterns,
const VectorTransferToSCFOptions & options = VectorTransferToSCFOptions() )

Collect a set of patterns to convert from the Vector dialect to SCF + func.

Definition at line 1697 of file VectorToSCF.cpp.

References options, and patterns.

◆ populateVectorToSPIRVPatterns()

void mlir::populateVectorToSPIRVPatterns ( const SPIRVTypeConverter & typeConverter,
RewritePatternSet & patterns )

Appends to a pattern list additional patterns for translating Vector Ops to SPIR-V ops.

Definition at line 1069 of file VectorToSPIRV.cpp.

References patterns.

◆ populateVectorToXeGPUConversionPatterns()

void mlir::populateVectorToXeGPUConversionPatterns ( RewritePatternSet & patterns)

Collect a set of patterns to convert from the vector to XeGPU ops.

Definition at line 817 of file VectorToXeGPU.cpp.

References patterns.

◆ populateX86VectorLegalizeForLLVMExportPatterns()

void mlir::populateX86VectorLegalizeForLLVMExportPatterns ( const LLVMTypeConverter & converter,
RewritePatternSet & patterns )

Collect a set of patterns to lower X86Vector ops to ops that map to LLVM intrinsics.

Populate the given list with patterns that convert from X86Vector to LLVM.

Definition at line 41 of file LegalizeForLLVMExport.cpp.

References patterns.

◆ populateXeGPUToXeVMConversionPatterns()

void mlir::populateXeGPUToXeVMConversionPatterns ( const LLVMTypeConverter & typeConverter,
RewritePatternSet & patterns )

Definition at line 1137 of file XeGPUToXeVM.cpp.

References patterns.

◆ populateXeVMToLLVMConversionPatterns()

void::mlir::populateXeVMToLLVMConversionPatterns ( ConversionTarget & target,
RewritePatternSet & patterns )

Definition at line 910 of file XeVMToLLVM.cpp.

References patterns, and target.

◆ printDimensionList() [1/2]

void mlir::printDimensionList ( OpAsmPrinter & printer,
Operation * op,
ArrayRef< int64_t > dimensions )

Definition at line 4187 of file AsmPrinter.cpp.

References mlir::AsmPrinter::printDimensionList().

◆ printDimensionList() [2/2]

void mlir::printDimensionList ( OpAsmPrinter & printer,
Operation * op,
ArrayRef< int64_t > dimensions )

Definition at line 4187 of file AsmPrinter.cpp.

References mlir::AsmPrinter::printDimensionList().

◆ printDynamicIndexList() [1/2]

void mlir::printDynamicIndexList ( OpAsmPrinter & printer,
Operation * op,
OperandRange values,
ArrayRef< int64_t > integers,
ArrayRef< bool > scalableFlags,
TypeRange valueTypes = TypeRange(),
AsmParser::Delimiter delimiter = AsmParser::Delimiter::Square )

Printer hooks for custom directive in assemblyFormat.

custom<DynamicIndexList>($values, $integers) custom<DynamicIndexList>($values, $integers, type($values))

where values is of ODS type Variadic<*> and integers is of ODS type I64ArrayAttr. Print a list where each element is either:

  1. the static integer value in integers, if it's not kDynamic or,
  2. the next value in values, otherwise.

If valueTypes is provided, the corresponding type of each dynamic value is printed. Otherwise, the type is not printed. Each type must match the type of the corresponding value in values. valueTypes is redundant for printing as we can retrieve the types from the actual values. However, valueTypes is needed for parsing and we must keep the API symmetric for parsing and printing. The type for integer elements is i64 by default and never printed.

Integer indices can also be scalable in the context of scalable vectors, denoted by square brackets (e.g., "[2, [4], 8]"). For each value in integers, the corresponding bool in scalableFlags encodes whether it's a scalable index. If scalableFlags is empty then assume that all indices are non-scalable.

Examples:

  • Input: integers = [kDynamic, 7, 42, kDynamic], values = [arg0, arg42] and valueTypes = [index, index] prints: [arg0 : index, 7, 42, arg42 : i32]
  • Input: integers = [kDynamic, 7, 42, kDynamic], values = [arg0, arg42] and valueTypes = [] prints: [arg0, 7, 42, arg42]
  • Input: integers = [2, 4, 8], values = [] and scalableFlags = [false, true, false] prints: [2, [4], 8]

Definition at line 195 of file ViewLikeInterface.cpp.

References getLeftDelimiter(), and getRightDelimiter().

Referenced by printDynamicIndexList(), printOptionalDynamicIndexList(), and mlir::transform::printPackedOrDynamicIndexList().

◆ printDynamicIndexList() [2/2]

void mlir::printDynamicIndexList ( OpAsmPrinter & printer,
Operation * op,
OperandRange values,
ArrayRef< int64_t > integers,
TypeRange valueTypes = TypeRange(),
AsmParser::Delimiter delimiter = AsmParser::Delimiter::Square )
inline

Definition at line 169 of file ViewLikeInterface.h.

References printDynamicIndexList(), and mlir::AsmParser::Square.

◆ printRegisteredPasses()

void mlir::printRegisteredPasses ( )

Prints the passes that were previously registered and stored in passRegistry.

Definition at line 72 of file PassRegistry.cpp.

References lhs, passRegistry, and rhs.

Referenced by printRegisteredPassesAndReturn().

◆ printSemiFunctionType() [1/2]

void mlir::printSemiFunctionType ( OpAsmPrinter & printer,
Operation * op,
Type argumentType,
Type resultType,
bool resultOptional = true )

Definition at line 76 of file Syntax.cpp.

References printSemiFunctionType(), and TypeRange.

◆ printSemiFunctionType() [2/2]

void mlir::printSemiFunctionType ( OpAsmPrinter & printer,
Operation * op,
Type argumentType,
TypeRange resultType )

Prints argument and result types in a syntax similar to that of FunctionType but allowing and requiring one to omit the parens around the argument type in absence of result types, and without the trailing -> ().

Definition at line 60 of file Syntax.cpp.

Referenced by printSemiFunctionType().

◆ projectDims()

AffineMap mlir::projectDims ( AffineMap map,
const llvm::SmallBitVector & projectedDimensions,
bool compressDimsFlag = false )

Returns the map that results from projecting out the dimensions specified in projectedDimensions.

The projected dimensions are set to 0.

Example: 1) map : affine_map<(d0, d1, d2) -> (d0, d1)> projected_dimensions : {2} result : affine_map<(d0, d1) -> (d0, d1)>

2) map : affine_map<(d0, d1) -> (d0 + d1)> projected_dimensions : {1} result : affine_map<(d0) -> (d0)>

3) map : affine_map<(d0, d1, d2) -> (d0, d1)> projected_dimensions : {1} result : affine_map<(d0, d1) -> (d0, 0)>

This function also compresses the dims when the boolean flag is true.

Definition at line 899 of file AffineMap.cpp.

References projectCommonImpl().

Referenced by compressDims(), mlir::linalg::computePaddedShape(), and getProjectedMap().

◆ projectSymbols()

AffineMap mlir::projectSymbols ( AffineMap map,
const llvm::SmallBitVector & projectedSymbols,
bool compressSymbolsFlag = false )

Symbol counterpart of projectDims.

This function also compresses the symbols when the boolean flag is true.

Definition at line 906 of file AffineMap.cpp.

References projectCommonImpl().

Referenced by compressSymbols().

◆ promoteToWorkgroupMemory()

void mlir::promoteToWorkgroupMemory ( gpu::GPUFuncOp op,
unsigned arg )

Promotes a function argument to workgroup memory in the given function.

The copies will be inserted in the beginning and in the end of the function.

◆ readBytecodeFile() [1/2]

LogicalResult mlir::readBytecodeFile ( const std::shared_ptr< llvm::SourceMgr > & sourceMgr,
Block * block,
const ParserConfig & config )

An overload with a source manager whose main file buffer is used for parsing.

The lifetime of the source manager may be freely extended during parsing such that the source manager is not destroyed before the parsed IR.

Definition at line 2684 of file BytecodeReader.cpp.

References config, and readBytecodeFileImpl().

◆ readBytecodeFile() [2/2]

LogicalResult mlir::readBytecodeFile ( llvm::MemoryBufferRef buffer,
Block * block,
const ParserConfig & config )

Read the operations defined within the given memory buffer, containing MLIR bytecode, into the provided block.

Definition at line 2679 of file BytecodeReader.cpp.

References config, and readBytecodeFileImpl().

◆ readResourceHandle()

template<typename T, typename... Ts>
LogicalResult mlir::readResourceHandle ( DialectBytecodeReader & reader,
FailureOr< T > & value,
Ts &&... params )
static

Helper for resource handle reading that returns LogicalResult.

Definition at line 494 of file BytecodeImplementation.h.

References mlir::DialectBytecodeReader::readResourceHandle(), result, and success().

◆ reconcileUnrealizedCasts()

void mlir::reconcileUnrealizedCasts ( const DenseMap< UnrealizedConversionCastOp, UnresolvedMaterializationInfo > & castOps,
SmallVectorImpl< UnrealizedConversionCastOp > * remainingCastOps )
static

◆ registerAllDialects() [1/2]

void mlir::registerAllDialects ( DialectRegistry & registry)

Add all the MLIR dialects to the provided registry.

Definition at line 109 of file RegisterAllDialects.cpp.

References mlir::DialectRegistry::insert(), mlir::linalg::registerAllDialectInterfaceImplementations(), mlir::memref::registerAllocationOpInterfaceExternalModels(), mlir::arith::registerBufferDeallocationOpInterfaceExternalModels(), mlir::cf::registerBufferDeallocationOpInterfaceExternalModels(), mlir::gpu::registerBufferDeallocationOpInterfaceExternalModels(), mlir::scf::registerBufferDeallocationOpInterfaceExternalModels(), mlir::arith::registerBufferizableOpInterfaceExternalModels(), mlir::bufferization::func_ext::registerBufferizableOpInterfaceExternalModels(), mlir::cf::registerBufferizableOpInterfaceExternalModels(), mlir::ml_program::registerBufferizableOpInterfaceExternalModels(), mlir::scf::registerBufferizableOpInterfaceExternalModels(), mlir::shape::registerBufferizableOpInterfaceExternalModels(), mlir::sparse_tensor::registerBufferizableOpInterfaceExternalModels(), mlir::tensor::registerBufferizableOpInterfaceExternalModels(), mlir::vector::registerBufferizableOpInterfaceExternalModels(), mlir::arith::registerBufferViewFlowOpInterfaceExternalModels(), mlir::memref::registerBufferViewFlowOpInterfaceExternalModels(), mlir::builtin::registerCastOpInterfaceExternalModels(), mlir::tensor::registerFindPayloadReplacementOpInterfaceExternalModels(), mlir::tensor::registerInferTypeOpInterfaceExternalModels(), mlir::LLVM::registerInlinerInterface(), mlir::NVVM::registerInlinerInterface(), mlir::memref::registerMemorySlotExternalModels(), mlir::NVVM::registerNVVMTargetInterfaceExternalModels(), mlir::ROCDL::registerROCDLTargetInterfaceExternalModels(), mlir::linalg::registerRuntimeVerifiableOpInterfaceExternalModels(), mlir::memref::registerRuntimeVerifiableOpInterfaceExternalModels(), mlir::tensor::registerRuntimeVerifiableOpInterfaceExternalModels(), mlir::arith::registerShardingInterfaceExternalModels(), mlir::tosa::registerShardingInterfaceExternalModels(), mlir::spirv::registerSPIRVTargetInterfaceExternalModels(), mlir::tensor::registerSubsetOpInterfaceExternalModels(), mlir::vector::registerSubsetOpInterfaceExternalModels(), mlir::tensor::registerTilingInterfaceExternalModels(), mlir::affine::registerValueBoundsOpInterfaceExternalModels(), mlir::arith::registerValueBoundsOpInterfaceExternalModels(), mlir::gpu::registerValueBoundsOpInterfaceExternalModels(), mlir::memref::registerValueBoundsOpInterfaceExternalModels(), mlir::scf::registerValueBoundsOpInterfaceExternalModels(), mlir::tensor::registerValueBoundsOpInterfaceExternalModels(), mlir::vector::registerValueBoundsOpInterfaceExternalModels(), and mlir::xevm::registerXeVMTargetInterfaceExternalModels().

Referenced by mlirRegisterAllDialects(), and registerAllDialects().

◆ registerAllDialects() [2/2]

void mlir::registerAllDialects ( MLIRContext & context)

Append all the MLIR dialects to the registry contained in the given context.

Definition at line 207 of file RegisterAllDialects.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerAllDialects().

◆ registerAllExtensions()

void mlir::registerAllExtensions ( DialectRegistry & registry)

This function may be called to register all MLIR dialect extensions with the provided registry.

If you're building a compiler, you generally shouldn't use this: you would individually register the specific extensions that are useful for the pipelines and transformations you are using.

Definition at line 71 of file RegisterAllExtensions.cpp.

References mlir::func::registerAllExtensions(), mlir::tensor::registerAllExtensions(), registerConvertAMXToLLVMInterface(), registerConvertArithToEmitCInterface(), mlir::arith::registerConvertArithToLLVMInterface(), registerConvertComplexToLLVMInterface(), mlir::cf::registerConvertControlFlowToLLVMInterface(), registerConvertFuncToEmitCInterface(), registerConvertFuncToLLVMInterface(), mlir::gpu::registerConvertGpuToLLVMInterface(), mlir::NVVM::registerConvertGpuToNVVMInterface(), mlir::index::registerConvertIndexToLLVMInterface(), registerConvertMathToLLVMInterface(), registerConvertMemRefToEmitCInterface(), registerConvertMemRefToLLVMInterface(), mlir::mpi::registerConvertMPIToLLVMInterface(), registerConvertNVVMToLLVMInterface(), registerConvertOpenMPToLLVMInterface(), mlir::ptr::registerConvertPtrToLLVMInterface(), registerConvertSCFToEmitCInterface(), mlir::ub::registerConvertUBToLLVMInterface(), mlir::vector::registerConvertVectorToLLVMInterface(), registerConvertXeVMToLLVMInterface(), mlir::transform::registerDebugExtension(), mlir::transform::registerIRDLExtension(), mlir::transform::registerLoopExtension(), mlir::transform::registerPDLExtension(), mlir::transform::registerSMTExtension(), mlir::affine::registerTransformDialectExtension(), mlir::arm_neon::registerTransformDialectExtension(), mlir::arm_sve::registerTransformDialectExtension(), mlir::bufferization::registerTransformDialectExtension(), mlir::dlti::registerTransformDialectExtension(), mlir::func::registerTransformDialectExtension(), mlir::gpu::registerTransformDialectExtension(), mlir::linalg::registerTransformDialectExtension(), mlir::memref::registerTransformDialectExtension(), mlir::nvgpu::registerTransformDialectExtension(), mlir::scf::registerTransformDialectExtension(), mlir::sparse_tensor::registerTransformDialectExtension(), mlir::tensor::registerTransformDialectExtension(), mlir::vector::registerTransformDialectExtension(), mlir::xegpu::registerTransformDialectExtension(), and mlir::transform::registerTuneExtension().

Referenced by mlirRegisterAllDialects().

◆ registerAllFromLLVMIRTranslations()

void mlir::registerAllFromLLVMIRTranslations ( DialectRegistry & registry)
inlinestatic

Registers all dialects that can be translated from LLVM IR and the corresponding translation interfaces.

Definition at line 79 of file All.h.

References registerLLVMDialectImport(), and registerNVVMDialectImport().

Referenced by registerFromLLVMIRTranslation().

◆ registerAllGPUToLLVMIRTranslations()

void mlir::registerAllGPUToLLVMIRTranslations ( DialectRegistry & registry)
inlinestatic

Registers all the translations to LLVM IR required by GPU passes.

TODO: Remove this function when a safe dialect interface registration mechanism is implemented, see D157703.

Definition at line 63 of file All.h.

References registerBuiltinDialectTranslation(), registerGPUDialectTranslation(), registerLLVMDialectTranslation(), registerNVVMDialectTranslation(), mlir::gpu::registerOffloadingLLVMTranslationInterfaceExternalModels(), registerROCDLDialectTranslation(), registerSPIRVDialectTranslation(), and registerXeVMDialectTranslation().

◆ registerAllPasses()

◆ registerAllToLLVMIRTranslations()

◆ registerAllTranslations()

◆ registerAndParseCLIOptions()

std::pair< std::string, std::string > mlir::registerAndParseCLIOptions ( int argc,
char ** argv,
llvm::StringRef toolName,
DialectRegistry & registry )

Register and parse command line options.

  • toolName is used for the header displayed by --help.
  • registry should contain all the dialects that can be parsed in the source.
  • return std::pair<std::string, std::string> for inputFilename and outputFilename command line option values.

Definition at line 716 of file MlirOptMain.cpp.

References parseCLIOptions(), and registerCLIOptions().

Referenced by MlirOptMain().

◆ registerArithToAMDGPUConversionPass()

void mlir::registerArithToAMDGPUConversionPass ( )
inline

Definition at line 7223 of file ArmSMEToLLVM.h.

◆ registerArithToAMDGPUConversionPassPass()

void mlir::registerArithToAMDGPUConversionPassPass ( )
inline

Definition at line 7230 of file ArmSMEToLLVM.h.

◆ registerArithToAPFloatConversionPass()

void mlir::registerArithToAPFloatConversionPass ( )
inline

Definition at line 7244 of file ArmSMEToLLVM.h.

◆ registerArithToAPFloatConversionPassPass()

void mlir::registerArithToAPFloatConversionPassPass ( )
inline

Definition at line 7251 of file ArmSMEToLLVM.h.

◆ registerArithToArmSMEConversionPass()

void mlir::registerArithToArmSMEConversionPass ( )
inline

Definition at line 7265 of file ArmSMEToLLVM.h.

◆ registerArithToArmSMEConversionPassPass()

void mlir::registerArithToArmSMEConversionPassPass ( )
inline

Definition at line 7272 of file ArmSMEToLLVM.h.

◆ registerArithToLLVMConversionPass()

void mlir::registerArithToLLVMConversionPass ( )
inline

Definition at line 7286 of file ArmSMEToLLVM.h.

◆ registerArithToLLVMConversionPassPass()

void mlir::registerArithToLLVMConversionPassPass ( )
inline

Definition at line 7293 of file ArmSMEToLLVM.h.

◆ registerArmNeonDialectTranslation() [1/2]

void mlir::registerArmNeonDialectTranslation ( DialectRegistry & registry)

Register the ArmNeon dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 46 of file ArmNeonToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllToLLVMIRTranslations(), and registerArmNeonDialectTranslation().

◆ registerArmNeonDialectTranslation() [2/2]

void mlir::registerArmNeonDialectTranslation ( MLIRContext & context)

Register the ArmNeon dialect and the translation from it in the registry associated with the given context.

Definition at line 54 of file ArmNeonToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerArmNeonDialectTranslation().

◆ registerArmSMEDialectTranslation() [1/2]

void mlir::registerArmSMEDialectTranslation ( DialectRegistry & registry)

Register the ArmSME dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 46 of file ArmSMEToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllToLLVMIRTranslations(), and registerArmSMEDialectTranslation().

◆ registerArmSMEDialectTranslation() [2/2]

void mlir::registerArmSMEDialectTranslation ( MLIRContext & context)

Register the ArmSME dialect and the translation from it in the registry associated with the given context.

Definition at line 53 of file ArmSMEToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerArmSMEDialectTranslation().

◆ registerArmSVEDialectTranslation() [1/2]

void mlir::registerArmSVEDialectTranslation ( DialectRegistry & registry)

Register the ArmSVE dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 45 of file ArmSVEToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllToLLVMIRTranslations(), and registerArmSVEDialectTranslation().

◆ registerArmSVEDialectTranslation() [2/2]

void mlir::registerArmSVEDialectTranslation ( MLIRContext & context)

Register the ArmSVE dialect and the translation from it in the registry associated with the given context.

Definition at line 52 of file ArmSVEToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerArmSVEDialectTranslation().

◆ registerAsmPrinterCLOptions()

void mlir::registerAsmPrinterCLOptions ( )

Register a set of useful command-line options that can be used to configure various flags within the AsmPrinter.

Definition at line 211 of file AsmPrinter.cpp.

References clOptions.

Referenced by registerCLIOptions().

◆ registerAsyncFuncToAsyncRuntimePass()

void mlir::registerAsyncFuncToAsyncRuntimePass ( )
inline

Definition at line 511 of file Passes.h.

◆ registerAsyncFuncToAsyncRuntimePassPass()

void mlir::registerAsyncFuncToAsyncRuntimePassPass ( )
inline

Definition at line 518 of file Passes.h.

◆ registerAsyncParallelForPass()

void mlir::registerAsyncParallelForPass ( )
inline

Definition at line 532 of file Passes.h.

◆ registerAsyncParallelForPassPass()

void mlir::registerAsyncParallelForPassPass ( )
inline

Definition at line 539 of file Passes.h.

◆ registerAsyncPasses()

void mlir::registerAsyncPasses ( )
inline

Definition at line 637 of file Passes.h.

Referenced by registerAllPasses().

◆ registerAsyncRuntimePolicyBasedRefCountingPass()

void mlir::registerAsyncRuntimePolicyBasedRefCountingPass ( )
inline

Definition at line 553 of file Passes.h.

◆ registerAsyncRuntimePolicyBasedRefCountingPassPass()

void mlir::registerAsyncRuntimePolicyBasedRefCountingPassPass ( )
inline

Definition at line 560 of file Passes.h.

◆ registerAsyncRuntimeRefCountingOptPass()

void mlir::registerAsyncRuntimeRefCountingOptPass ( )
inline

Definition at line 574 of file Passes.h.

◆ registerAsyncRuntimeRefCountingOptPassPass()

void mlir::registerAsyncRuntimeRefCountingOptPassPass ( )
inline

Definition at line 581 of file Passes.h.

◆ registerAsyncRuntimeRefCountingPass()

void mlir::registerAsyncRuntimeRefCountingPass ( )
inline

Definition at line 595 of file Passes.h.

◆ registerAsyncRuntimeRefCountingPassPass()

void mlir::registerAsyncRuntimeRefCountingPassPass ( )
inline

Definition at line 602 of file Passes.h.

◆ registerAsyncToAsyncRuntimePass()

void mlir::registerAsyncToAsyncRuntimePass ( )
inline

Definition at line 616 of file Passes.h.

◆ registerAsyncToAsyncRuntimePassPass()

void mlir::registerAsyncToAsyncRuntimePassPass ( )
inline

Definition at line 623 of file Passes.h.

◆ registerBubbleDownMemorySpaceCasts()

void mlir::registerBubbleDownMemorySpaceCasts ( )
inline

Definition at line 1611 of file Passes.h.

◆ registerBubbleDownMemorySpaceCastsPass()

void mlir::registerBubbleDownMemorySpaceCastsPass ( )
inline

Definition at line 1618 of file Passes.h.

◆ registerBuiltinDialectTranslation() [1/2]

void mlir::registerBuiltinDialectTranslation ( DialectRegistry & registry)

Register the translation from the builtin dialect to the LLVM IR in the given registry.

Definition at line 36 of file BuiltinToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by mlirExecutionEngineCreate(), registerAllGPUToLLVMIRTranslations(), registerAllToLLVMIRTranslations(), and registerBuiltinDialectTranslation().

◆ registerBuiltinDialectTranslation() [2/2]

void mlir::registerBuiltinDialectTranslation ( MLIRContext & context)

Register the translation from the builtin dialect in the registry associated with the given context.

Definition at line 42 of file BuiltinToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerBuiltinDialectTranslation().

◆ registerCanonicalizer()

void mlir::registerCanonicalizer ( )
inline

Definition at line 1653 of file Passes.h.

◆ registerCanonicalizerPass()

void mlir::registerCanonicalizerPass ( )
inline

Definition at line 1660 of file Passes.h.

◆ registerCLIOptions()

std::string mlir::registerCLIOptions ( llvm::StringRef toolName,
DialectRegistry & registry )

Register basic command line options.

  • toolName is used for the header displayed by --help.
  • registry should contain all the dialects that can be parsed in the source.
  • return std::string for help header.

Definition at line 684 of file MlirOptMain.cpp.

References mlir::DialectRegistry::getDialectNames(), registerAsmPrinterCLOptions(), mlir::MlirOptMainConfig::registerCLOptions(), mlir::tracing::DebugCounter::registerCLOptions(), registerDefaultTimingManagerCLOptions(), registerMLIRContextCLOptions(), and registerPassManagerCLOptions().

Referenced by registerAndParseCLIOptions().

◆ registerCompositeFixedPointPass()

void mlir::registerCompositeFixedPointPass ( )
inline

Definition at line 1674 of file Passes.h.

◆ registerCompositeFixedPointPassPass()

void mlir::registerCompositeFixedPointPassPass ( )
inline

Definition at line 1681 of file Passes.h.

◆ registerControlFlowSink()

void mlir::registerControlFlowSink ( )
inline

Definition at line 1695 of file Passes.h.

◆ registerControlFlowSinkPass()

void mlir::registerControlFlowSinkPass ( )
inline

Definition at line 1702 of file Passes.h.

◆ registerConversionPasses()

void mlir::registerConversionPasses ( )
inline

Definition at line 8945 of file ArmSMEToLLVM.h.

Referenced by registerAllPasses().

◆ registerConvertAffineForToGPUPass()

void mlir::registerConvertAffineForToGPUPass ( )
inline

Definition at line 7328 of file ArmSMEToLLVM.h.

◆ registerConvertAffineForToGPUPassPass()

void mlir::registerConvertAffineForToGPUPassPass ( )
inline

Definition at line 7335 of file ArmSMEToLLVM.h.

◆ registerConvertAMDGPUToROCDLPass()

void mlir::registerConvertAMDGPUToROCDLPass ( )
inline

Definition at line 7307 of file ArmSMEToLLVM.h.

◆ registerConvertAMDGPUToROCDLPassPass()

void mlir::registerConvertAMDGPUToROCDLPassPass ( )
inline

Definition at line 7314 of file ArmSMEToLLVM.h.

◆ registerConvertAMXToLLVMInterface()

void mlir::registerConvertAMXToLLVMInterface ( DialectRegistry & registry)

Register LLVM conversion interface for AMX dialect.

Definition at line 66 of file LegalizeForLLVMExport.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertArithToEmitC()

void mlir::registerConvertArithToEmitC ( )
inline

Definition at line 7349 of file ArmSMEToLLVM.h.

◆ registerConvertArithToEmitCInterface()

void mlir::registerConvertArithToEmitCInterface ( DialectRegistry & registry)

Definition at line 41 of file ArithToEmitC.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertArithToEmitCPass()

void mlir::registerConvertArithToEmitCPass ( )
inline

Definition at line 7356 of file ArmSMEToLLVM.h.

◆ registerConvertArithToSPIRVPass()

void mlir::registerConvertArithToSPIRVPass ( )
inline

Definition at line 7370 of file ArmSMEToLLVM.h.

◆ registerConvertArithToSPIRVPassPass()

void mlir::registerConvertArithToSPIRVPassPass ( )
inline

Definition at line 7377 of file ArmSMEToLLVM.h.

◆ registerConvertArmNeon2dToIntrPass()

void mlir::registerConvertArmNeon2dToIntrPass ( )
inline

Definition at line 7391 of file ArmSMEToLLVM.h.

◆ registerConvertArmNeon2dToIntrPassPass()

void mlir::registerConvertArmNeon2dToIntrPassPass ( )
inline

Definition at line 7398 of file ArmSMEToLLVM.h.

◆ registerConvertArmSMEToLLVM()

void mlir::registerConvertArmSMEToLLVM ( )
inline

Definition at line 7412 of file ArmSMEToLLVM.h.

◆ registerConvertArmSMEToLLVMPass()

void mlir::registerConvertArmSMEToLLVMPass ( )
inline

Definition at line 7419 of file ArmSMEToLLVM.h.

◆ registerConvertArmSMEToSCFPass()

void mlir::registerConvertArmSMEToSCFPass ( )
inline

Definition at line 7433 of file ArmSMEToLLVM.h.

◆ registerConvertArmSMEToSCFPassPass()

void mlir::registerConvertArmSMEToSCFPassPass ( )
inline

Definition at line 7440 of file ArmSMEToLLVM.h.

◆ registerConvertAsyncToLLVMPass()

void mlir::registerConvertAsyncToLLVMPass ( )
inline

Definition at line 7454 of file ArmSMEToLLVM.h.

◆ registerConvertAsyncToLLVMPassPass()

void mlir::registerConvertAsyncToLLVMPassPass ( )
inline

Definition at line 7461 of file ArmSMEToLLVM.h.

◆ registerConvertBufferizationToMemRefPass()

void mlir::registerConvertBufferizationToMemRefPass ( )
inline

Definition at line 7475 of file ArmSMEToLLVM.h.

◆ registerConvertBufferizationToMemRefPassPass()

void mlir::registerConvertBufferizationToMemRefPassPass ( )
inline

Definition at line 7482 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToLibm()

void mlir::registerConvertComplexToLibm ( )
inline

Definition at line 7517 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToLibmPass()

void mlir::registerConvertComplexToLibmPass ( )
inline

Definition at line 7524 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToLLVMInterface()

void mlir::registerConvertComplexToLLVMInterface ( DialectRegistry & registry)

Definition at line 393 of file ComplexToLLVM.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertComplexToLLVMPass()

void mlir::registerConvertComplexToLLVMPass ( )
inline

Definition at line 7496 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToLLVMPassPass()

void mlir::registerConvertComplexToLLVMPassPass ( )
inline

Definition at line 7503 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToROCDLLibraryCalls()

void mlir::registerConvertComplexToROCDLLibraryCalls ( )
inline

Definition at line 7538 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToROCDLLibraryCallsPass()

void mlir::registerConvertComplexToROCDLLibraryCallsPass ( )
inline

Definition at line 7545 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToSPIRVPass()

void mlir::registerConvertComplexToSPIRVPass ( )
inline

Definition at line 7559 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToSPIRVPassPass()

void mlir::registerConvertComplexToSPIRVPassPass ( )
inline

Definition at line 7566 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToStandardPass()

void mlir::registerConvertComplexToStandardPass ( )
inline

Definition at line 7580 of file ArmSMEToLLVM.h.

◆ registerConvertComplexToStandardPassPass()

void mlir::registerConvertComplexToStandardPassPass ( )
inline

Definition at line 7587 of file ArmSMEToLLVM.h.

◆ registerConvertControlFlowToLLVMPass()

void mlir::registerConvertControlFlowToLLVMPass ( )
inline

Definition at line 7601 of file ArmSMEToLLVM.h.

◆ registerConvertControlFlowToLLVMPassPass()

void mlir::registerConvertControlFlowToLLVMPassPass ( )
inline

Definition at line 7608 of file ArmSMEToLLVM.h.

◆ registerConvertControlFlowToSPIRVPass()

void mlir::registerConvertControlFlowToSPIRVPass ( )
inline

Definition at line 7622 of file ArmSMEToLLVM.h.

◆ registerConvertControlFlowToSPIRVPassPass()

void mlir::registerConvertControlFlowToSPIRVPassPass ( )
inline

Definition at line 7629 of file ArmSMEToLLVM.h.

◆ registerConvertElementwiseToLinalgPass()

void mlir::registerConvertElementwiseToLinalgPass ( )
inline

Definition at line 1219 of file Passes.h.

◆ registerConvertElementwiseToLinalgPassPass()

void mlir::registerConvertElementwiseToLinalgPassPass ( )
inline

Definition at line 1226 of file Passes.h.

◆ registerConvertFuncToEmitC()

void mlir::registerConvertFuncToEmitC ( )
inline

Definition at line 7643 of file ArmSMEToLLVM.h.

◆ registerConvertFuncToEmitCInterface()

void mlir::registerConvertFuncToEmitCInterface ( DialectRegistry & registry)

Definition at line 39 of file FuncToEmitC.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertFuncToEmitCPass()

void mlir::registerConvertFuncToEmitCPass ( )
inline

Definition at line 7650 of file ArmSMEToLLVM.h.

◆ registerConvertFuncToLLVMInterface()

void mlir::registerConvertFuncToLLVMInterface ( DialectRegistry & registry)

Definition at line 887 of file FuncToLLVM.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertFuncToLLVMPass()

void mlir::registerConvertFuncToLLVMPass ( )
inline

Definition at line 7664 of file ArmSMEToLLVM.h.

◆ registerConvertFuncToLLVMPassPass()

void mlir::registerConvertFuncToLLVMPassPass ( )
inline

Definition at line 7671 of file ArmSMEToLLVM.h.

◆ registerConvertFuncToSPIRVPass()

void mlir::registerConvertFuncToSPIRVPass ( )
inline

Definition at line 7685 of file ArmSMEToLLVM.h.

◆ registerConvertFuncToSPIRVPassPass()

void mlir::registerConvertFuncToSPIRVPassPass ( )
inline

Definition at line 7692 of file ArmSMEToLLVM.h.

◆ registerConvertGpuOpsToLLVMSPVOps()

void mlir::registerConvertGpuOpsToLLVMSPVOps ( )
inline

Definition at line 7727 of file ArmSMEToLLVM.h.

◆ registerConvertGpuOpsToLLVMSPVOpsPass()

void mlir::registerConvertGpuOpsToLLVMSPVOpsPass ( )
inline

Definition at line 7734 of file ArmSMEToLLVM.h.

◆ registerConvertGpuOpsToNVVMOps()

void mlir::registerConvertGpuOpsToNVVMOps ( )
inline

Definition at line 7748 of file ArmSMEToLLVM.h.

◆ registerConvertGpuOpsToNVVMOpsPass()

void mlir::registerConvertGpuOpsToNVVMOpsPass ( )
inline

Definition at line 7755 of file ArmSMEToLLVM.h.

◆ registerConvertGpuOpsToROCDLOps()

void mlir::registerConvertGpuOpsToROCDLOps ( )
inline

Definition at line 7769 of file ArmSMEToLLVM.h.

◆ registerConvertGpuOpsToROCDLOpsPass()

void mlir::registerConvertGpuOpsToROCDLOpsPass ( )
inline

Definition at line 7776 of file ArmSMEToLLVM.h.

◆ registerConvertGPUToSPIRV()

void mlir::registerConvertGPUToSPIRV ( )
inline

Definition at line 7706 of file ArmSMEToLLVM.h.

◆ registerConvertGPUToSPIRVPass()

void mlir::registerConvertGPUToSPIRVPass ( )
inline

Definition at line 7713 of file ArmSMEToLLVM.h.

◆ registerConvertIndexToLLVMPass()

void mlir::registerConvertIndexToLLVMPass ( )
inline

Definition at line 7790 of file ArmSMEToLLVM.h.

◆ registerConvertIndexToLLVMPassPass()

void mlir::registerConvertIndexToLLVMPassPass ( )
inline

Definition at line 7797 of file ArmSMEToLLVM.h.

◆ registerConvertIndexToSPIRVPass()

void mlir::registerConvertIndexToSPIRVPass ( )
inline

Definition at line 7811 of file ArmSMEToLLVM.h.

◆ registerConvertIndexToSPIRVPassPass()

void mlir::registerConvertIndexToSPIRVPassPass ( )
inline

Definition at line 7818 of file ArmSMEToLLVM.h.

◆ registerConvertLinalgToAffineLoopsPass()

void mlir::registerConvertLinalgToAffineLoopsPass ( )
inline

Definition at line 1240 of file Passes.h.

◆ registerConvertLinalgToAffineLoopsPassPass()

void mlir::registerConvertLinalgToAffineLoopsPassPass ( )
inline

Definition at line 1247 of file Passes.h.

◆ registerConvertLinalgToLoopsPass()

void mlir::registerConvertLinalgToLoopsPass ( )
inline

Definition at line 1261 of file Passes.h.

◆ registerConvertLinalgToLoopsPassPass()

void mlir::registerConvertLinalgToLoopsPassPass ( )
inline

Definition at line 1268 of file Passes.h.

◆ registerConvertLinalgToParallelLoopsPass()

void mlir::registerConvertLinalgToParallelLoopsPass ( )
inline

Definition at line 1282 of file Passes.h.

◆ registerConvertLinalgToParallelLoopsPassPass()

void mlir::registerConvertLinalgToParallelLoopsPassPass ( )
inline

Definition at line 1289 of file Passes.h.

◆ registerConvertLinalgToStandardPass()

void mlir::registerConvertLinalgToStandardPass ( )
inline

Definition at line 7832 of file ArmSMEToLLVM.h.

◆ registerConvertLinalgToStandardPassPass()

void mlir::registerConvertLinalgToStandardPassPass ( )
inline

Definition at line 7839 of file ArmSMEToLLVM.h.

◆ registerConvertMathToEmitC()

void mlir::registerConvertMathToEmitC ( )
inline

Definition at line 7853 of file ArmSMEToLLVM.h.

◆ registerConvertMathToEmitCPass()

void mlir::registerConvertMathToEmitCPass ( )
inline

Definition at line 7860 of file ArmSMEToLLVM.h.

◆ registerConvertMathToFuncs()

void mlir::registerConvertMathToFuncs ( )
inline

Definition at line 7874 of file ArmSMEToLLVM.h.

◆ registerConvertMathToFuncsPass()

void mlir::registerConvertMathToFuncsPass ( )
inline

Definition at line 7881 of file ArmSMEToLLVM.h.

◆ registerConvertMathToLibmPass()

void mlir::registerConvertMathToLibmPass ( )
inline

Definition at line 7916 of file ArmSMEToLLVM.h.

◆ registerConvertMathToLibmPassPass()

void mlir::registerConvertMathToLibmPassPass ( )
inline

Definition at line 7923 of file ArmSMEToLLVM.h.

◆ registerConvertMathToLLVMInterface()

void mlir::registerConvertMathToLLVMInterface ( DialectRegistry & registry)

Definition at line 464 of file MathToLLVM.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertMathToLLVMPass()

void mlir::registerConvertMathToLLVMPass ( )
inline

Definition at line 7895 of file ArmSMEToLLVM.h.

◆ registerConvertMathToLLVMPassPass()

void mlir::registerConvertMathToLLVMPassPass ( )
inline

Definition at line 7902 of file ArmSMEToLLVM.h.

◆ registerConvertMathToROCDL()

void mlir::registerConvertMathToROCDL ( )
inline

Definition at line 7937 of file ArmSMEToLLVM.h.

◆ registerConvertMathToROCDLPass()

void mlir::registerConvertMathToROCDLPass ( )
inline

Definition at line 7944 of file ArmSMEToLLVM.h.

◆ registerConvertMathToSPIRVPass()

void mlir::registerConvertMathToSPIRVPass ( )
inline

Definition at line 7958 of file ArmSMEToLLVM.h.

◆ registerConvertMathToSPIRVPassPass()

void mlir::registerConvertMathToSPIRVPassPass ( )
inline

Definition at line 7965 of file ArmSMEToLLVM.h.

◆ registerConvertMathToXeVM()

void mlir::registerConvertMathToXeVM ( )
inline

Definition at line 7979 of file ArmSMEToLLVM.h.

◆ registerConvertMathToXeVMPass()

void mlir::registerConvertMathToXeVMPass ( )
inline

Definition at line 7986 of file ArmSMEToLLVM.h.

◆ registerConvertMemRefToEmitC()

void mlir::registerConvertMemRefToEmitC ( )
inline

Definition at line 8000 of file ArmSMEToLLVM.h.

◆ registerConvertMemRefToEmitCInterface()

void mlir::registerConvertMemRefToEmitCInterface ( DialectRegistry & registry)

Definition at line 53 of file MemRefToEmitC.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertMemRefToEmitCPass()

void mlir::registerConvertMemRefToEmitCPass ( )
inline

Definition at line 8007 of file ArmSMEToLLVM.h.

◆ registerConvertMemRefToLLVMInterface()

void mlir::registerConvertMemRefToLLVMInterface ( DialectRegistry & registry)

Definition at line 2129 of file MemRefToLLVM.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertMemRefToSPIRVPass()

void mlir::registerConvertMemRefToSPIRVPass ( )
inline

Definition at line 8021 of file ArmSMEToLLVM.h.

◆ registerConvertMemRefToSPIRVPassPass()

void mlir::registerConvertMemRefToSPIRVPassPass ( )
inline

Definition at line 8028 of file ArmSMEToLLVM.h.

◆ registerConvertNVGPUToNVVMPass()

void mlir::registerConvertNVGPUToNVVMPass ( )
inline

Definition at line 8042 of file ArmSMEToLLVM.h.

◆ registerConvertNVGPUToNVVMPassPass()

void mlir::registerConvertNVGPUToNVVMPassPass ( )
inline

Definition at line 8049 of file ArmSMEToLLVM.h.

◆ registerConvertNVVMToLLVMInterface()

void mlir::registerConvertNVVMToLLVMInterface ( DialectRegistry & registry)

Definition at line 116 of file NVVMToLLVM.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertNVVMToLLVMPass()

void mlir::registerConvertNVVMToLLVMPass ( )
inline

Definition at line 8063 of file ArmSMEToLLVM.h.

◆ registerConvertNVVMToLLVMPassPass()

void mlir::registerConvertNVVMToLLVMPassPass ( )
inline

Definition at line 8070 of file ArmSMEToLLVM.h.

◆ registerConvertOpenACCToSCFPass()

void mlir::registerConvertOpenACCToSCFPass ( )
inline

Definition at line 8084 of file ArmSMEToLLVM.h.

◆ registerConvertOpenACCToSCFPassPass()

void mlir::registerConvertOpenACCToSCFPassPass ( )
inline

Definition at line 8091 of file ArmSMEToLLVM.h.

◆ registerConvertOpenMPToLLVMInterface()

void mlir::registerConvertOpenMPToLLVMInterface ( DialectRegistry & registry)

Registers the ConvertToLLVMPatternInterface interface in the OpenMP dialect.

Definition at line 214 of file OpenMPToLLVM.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertOpenMPToLLVMPass()

void mlir::registerConvertOpenMPToLLVMPass ( )
inline

Definition at line 8105 of file ArmSMEToLLVM.h.

◆ registerConvertOpenMPToLLVMPassPass()

void mlir::registerConvertOpenMPToLLVMPassPass ( )
inline

Definition at line 8112 of file ArmSMEToLLVM.h.

◆ registerConvertParallelLoopToGpuPass()

void mlir::registerConvertParallelLoopToGpuPass ( )
inline

Definition at line 8147 of file ArmSMEToLLVM.h.

◆ registerConvertParallelLoopToGpuPassPass()

void mlir::registerConvertParallelLoopToGpuPassPass ( )
inline

Definition at line 8154 of file ArmSMEToLLVM.h.

◆ registerConvertPDLToPDLInterpPass()

void mlir::registerConvertPDLToPDLInterpPass ( )
inline

Definition at line 8126 of file ArmSMEToLLVM.h.

◆ registerConvertPDLToPDLInterpPassPass()

void mlir::registerConvertPDLToPDLInterpPassPass ( )
inline

Definition at line 8133 of file ArmSMEToLLVM.h.

◆ registerConvertSCFToEmitCInterface()

void mlir::registerConvertSCFToEmitCInterface ( DialectRegistry & registry)

Definition at line 51 of file SCFToEmitC.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertSCFToOpenMPPass()

void mlir::registerConvertSCFToOpenMPPass ( )
inline

Definition at line 8168 of file ArmSMEToLLVM.h.

◆ registerConvertSCFToOpenMPPassPass()

void mlir::registerConvertSCFToOpenMPPassPass ( )
inline

Definition at line 8175 of file ArmSMEToLLVM.h.

◆ registerConvertShapeConstraintsPass()

void mlir::registerConvertShapeConstraintsPass ( )
inline

Definition at line 8210 of file ArmSMEToLLVM.h.

◆ registerConvertShapeConstraintsPassPass()

void mlir::registerConvertShapeConstraintsPassPass ( )
inline

Definition at line 8217 of file ArmSMEToLLVM.h.

◆ registerConvertShapeToStandardPass()

void mlir::registerConvertShapeToStandardPass ( )
inline

Definition at line 8231 of file ArmSMEToLLVM.h.

◆ registerConvertShapeToStandardPassPass()

void mlir::registerConvertShapeToStandardPassPass ( )
inline

Definition at line 8238 of file ArmSMEToLLVM.h.

◆ registerConvertShardToMPIPass()

void mlir::registerConvertShardToMPIPass ( )
inline

Definition at line 8252 of file ArmSMEToLLVM.h.

◆ registerConvertShardToMPIPassPass()

void mlir::registerConvertShardToMPIPassPass ( )
inline

Definition at line 8259 of file ArmSMEToLLVM.h.

◆ registerConvertSPIRVToLLVMPass()

void mlir::registerConvertSPIRVToLLVMPass ( )
inline

Definition at line 8189 of file ArmSMEToLLVM.h.

◆ registerConvertSPIRVToLLVMPassPass()

void mlir::registerConvertSPIRVToLLVMPassPass ( )
inline

Definition at line 8196 of file ArmSMEToLLVM.h.

◆ registerConvertTensorToLinalgPass()

void mlir::registerConvertTensorToLinalgPass ( )
inline

Definition at line 8273 of file ArmSMEToLLVM.h.

◆ registerConvertTensorToLinalgPassPass()

void mlir::registerConvertTensorToLinalgPassPass ( )
inline

Definition at line 8280 of file ArmSMEToLLVM.h.

◆ registerConvertTensorToSPIRVPass()

void mlir::registerConvertTensorToSPIRVPass ( )
inline

Definition at line 8294 of file ArmSMEToLLVM.h.

◆ registerConvertTensorToSPIRVPassPass()

void mlir::registerConvertTensorToSPIRVPassPass ( )
inline

Definition at line 8301 of file ArmSMEToLLVM.h.

◆ registerConvertToEmitC()

void mlir::registerConvertToEmitC ( )
inline

Definition at line 8315 of file ArmSMEToLLVM.h.

◆ registerConvertToEmitCPass()

void mlir::registerConvertToEmitCPass ( )
inline

Definition at line 8322 of file ArmSMEToLLVM.h.

◆ registerConvertToLLVMDependentDialectLoading()

void mlir::registerConvertToLLVMDependentDialectLoading ( DialectRegistry & registry)

Register the extension that will load dependent dialects for LLVM conversion.

This is useful to implement a pass similar to "convert-to-llvm".

Definition at line 292 of file ConvertToLLVMPass.cpp.

References mlir::DialectRegistry::addExtensions().

◆ registerConvertToLLVMPass()

void mlir::registerConvertToLLVMPass ( )
inline

Definition at line 8336 of file ArmSMEToLLVM.h.

◆ registerConvertToLLVMPassPass()

void mlir::registerConvertToLLVMPassPass ( )
inline

Definition at line 8343 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToAMX()

void mlir::registerConvertVectorToAMX ( )
inline

Definition at line 8357 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToAMXPass()

void mlir::registerConvertVectorToAMXPass ( )
inline

Definition at line 8364 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToArmSMEPass()

void mlir::registerConvertVectorToArmSMEPass ( )
inline

Definition at line 8378 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToArmSMEPassPass()

void mlir::registerConvertVectorToArmSMEPassPass ( )
inline

Definition at line 8385 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToGPU()

void mlir::registerConvertVectorToGPU ( )
inline

Definition at line 8399 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToGPUPass()

void mlir::registerConvertVectorToGPUPass ( )
inline

Definition at line 8406 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToLLVMPass()

void mlir::registerConvertVectorToLLVMPass ( )
inline

Definition at line 8420 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToLLVMPassPass()

void mlir::registerConvertVectorToLLVMPassPass ( )
inline

Definition at line 8427 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToSCF()

void mlir::registerConvertVectorToSCF ( )
inline

Definition at line 8441 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToSCFPass()

void mlir::registerConvertVectorToSCFPass ( )
inline

Definition at line 8448 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToSPIRVPass()

void mlir::registerConvertVectorToSPIRVPass ( )
inline

Definition at line 8462 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToSPIRVPassPass()

void mlir::registerConvertVectorToSPIRVPassPass ( )
inline

Definition at line 8469 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToXeGPU()

void mlir::registerConvertVectorToXeGPU ( )
inline

Definition at line 8483 of file ArmSMEToLLVM.h.

◆ registerConvertVectorToXeGPUPass()

void mlir::registerConvertVectorToXeGPUPass ( )
inline

Definition at line 8490 of file ArmSMEToLLVM.h.

◆ registerConvertXeGPUToXeVMPass()

void mlir::registerConvertXeGPUToXeVMPass ( )
inline

Definition at line 8504 of file ArmSMEToLLVM.h.

◆ registerConvertXeGPUToXeVMPassPass()

void mlir::registerConvertXeGPUToXeVMPassPass ( )
inline

Definition at line 8511 of file ArmSMEToLLVM.h.

◆ registerConvertXeVMToLLVMInterface()

void::mlir::registerConvertXeVMToLLVMInterface ( DialectRegistry & registry)

Definition at line 941 of file XeVMToLLVM.cpp.

References mlir::DialectRegistry::addExtension().

Referenced by registerAllExtensions().

◆ registerConvertXeVMToLLVMPass()

void mlir::registerConvertXeVMToLLVMPass ( )
inline

Definition at line 8525 of file ArmSMEToLLVM.h.

◆ registerConvertXeVMToLLVMPassPass()

void mlir::registerConvertXeVMToLLVMPassPass ( )
inline

Definition at line 8532 of file ArmSMEToLLVM.h.

◆ registerCSE()

void mlir::registerCSE ( )
inline

Definition at line 1632 of file Passes.h.

◆ registerCSEPass()

void mlir::registerCSEPass ( )
inline

Definition at line 1639 of file Passes.h.

◆ registerDefaultTimingManagerCLOptions()

void mlir::registerDefaultTimingManagerCLOptions ( )

Register a set of useful command-line options that can be used to configure a DefaultTimingManager.

The values of these options can be applied via the applyDefaultTimingManagerCLOptions method.

Definition at line 612 of file Timing.cpp.

References options.

Referenced by registerCLIOptions().

◆ registerFinalizeMemRefToLLVMConversionPass()

void mlir::registerFinalizeMemRefToLLVMConversionPass ( )
inline

Definition at line 8546 of file ArmSMEToLLVM.h.

◆ registerFinalizeMemRefToLLVMConversionPassPass()

void mlir::registerFinalizeMemRefToLLVMConversionPassPass ( )
inline

Definition at line 8553 of file ArmSMEToLLVM.h.

◆ registerFromLLVMIRTranslation()

void mlir::registerFromLLVMIRTranslation ( )

◆ registerFromSPIRVTranslation()

void mlir::registerFromSPIRVTranslation ( )

Definition at line 58 of file TranslateRegistration.cpp.

References deserializeModule().

Referenced by registerAllTranslations().

◆ registerFromWasmTranslation()

void mlir::registerFromWasmTranslation ( )

◆ registerGenerateRuntimeVerification()

void mlir::registerGenerateRuntimeVerification ( )
inline

Definition at line 1716 of file Passes.h.

◆ registerGenerateRuntimeVerificationPass()

void mlir::registerGenerateRuntimeVerificationPass ( )
inline

Definition at line 1723 of file Passes.h.

◆ registerGpuAsyncRegionPass()

void mlir::registerGpuAsyncRegionPass ( )
inline

Definition at line 1117 of file Passes.h.

◆ registerGpuAsyncRegionPassPass()

void mlir::registerGpuAsyncRegionPassPass ( )
inline

Definition at line 1124 of file Passes.h.

◆ registerGpuDecomposeMemrefsPass()

void mlir::registerGpuDecomposeMemrefsPass ( )
inline

Definition at line 1138 of file Passes.h.

◆ registerGpuDecomposeMemrefsPassPass()

void mlir::registerGpuDecomposeMemrefsPassPass ( )
inline

Definition at line 1145 of file Passes.h.

◆ registerGPUDialectTranslation() [1/2]

void mlir::registerGPUDialectTranslation ( DialectRegistry & registry)

Register the GPU dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 66 of file GPUToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllGPUToLLVMIRTranslations(), registerAllToLLVMIRTranslations(), and registerGPUDialectTranslation().

◆ registerGPUDialectTranslation() [2/2]

void mlir::registerGPUDialectTranslation ( MLIRContext & context)

Register the GPU dialect and the translation from it in the registry associated with the given context.

Definition at line 73 of file GPUToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerGPUDialectTranslation().

◆ registerGpuEliminateBarriers()

void mlir::registerGpuEliminateBarriers ( )
inline

Definition at line 1159 of file Passes.h.

◆ registerGpuEliminateBarriersPass()

void mlir::registerGpuEliminateBarriersPass ( )
inline

Definition at line 1166 of file Passes.h.

◆ registerGpuKernelOutliningPass()

void mlir::registerGpuKernelOutliningPass ( )
inline

Definition at line 1180 of file Passes.h.

◆ registerGpuKernelOutliningPassPass()

void mlir::registerGpuKernelOutliningPassPass ( )
inline

Definition at line 1187 of file Passes.h.

◆ registerGpuLaunchSinkIndexComputationsPass()

void mlir::registerGpuLaunchSinkIndexComputationsPass ( )
inline

Definition at line 1201 of file Passes.h.

◆ registerGpuLaunchSinkIndexComputationsPassPass()

void mlir::registerGpuLaunchSinkIndexComputationsPassPass ( )
inline

Definition at line 1208 of file Passes.h.

◆ registerGpuMapParallelLoopsPass()

void mlir::registerGpuMapParallelLoopsPass ( )
inline

Definition at line 1222 of file Passes.h.

◆ registerGpuMapParallelLoopsPassPass()

void mlir::registerGpuMapParallelLoopsPassPass ( )
inline

Definition at line 1229 of file Passes.h.

◆ registerGpuModuleToBinaryPass()

void mlir::registerGpuModuleToBinaryPass ( )
inline

Definition at line 1243 of file Passes.h.

◆ registerGpuModuleToBinaryPassPass()

void mlir::registerGpuModuleToBinaryPassPass ( )
inline

Definition at line 1250 of file Passes.h.

◆ registerGpuNVVMAttachTarget()

void mlir::registerGpuNVVMAttachTarget ( )
inline

Definition at line 1264 of file Passes.h.

◆ registerGpuNVVMAttachTargetPass()

void mlir::registerGpuNVVMAttachTargetPass ( )
inline

Definition at line 1271 of file Passes.h.

◆ registerGPUPasses()

void mlir::registerGPUPasses ( )
inline

Definition at line 1348 of file Passes.h.

Referenced by registerAllPasses().

◆ registerGpuROCDLAttachTarget()

void mlir::registerGpuROCDLAttachTarget ( )
inline

Definition at line 1285 of file Passes.h.

◆ registerGpuROCDLAttachTargetPass()

void mlir::registerGpuROCDLAttachTargetPass ( )
inline

Definition at line 1292 of file Passes.h.

◆ registerGpuSPIRVAttachTarget()

void mlir::registerGpuSPIRVAttachTarget ( )
inline

Definition at line 1306 of file Passes.h.

◆ registerGpuSPIRVAttachTargetPass()

void mlir::registerGpuSPIRVAttachTargetPass ( )
inline

Definition at line 1313 of file Passes.h.

◆ registerGpuToLLVMConversionPass()

void mlir::registerGpuToLLVMConversionPass ( )
inline

Definition at line 8567 of file ArmSMEToLLVM.h.

◆ registerGpuToLLVMConversionPassPass()

void mlir::registerGpuToLLVMConversionPassPass ( )
inline

Definition at line 8574 of file ArmSMEToLLVM.h.

◆ registerGpuXeVMAttachTarget()

void mlir::registerGpuXeVMAttachTarget ( )
inline

Definition at line 1327 of file Passes.h.

◆ registerGpuXeVMAttachTargetPass()

void mlir::registerGpuXeVMAttachTargetPass ( )
inline

Definition at line 1334 of file Passes.h.

◆ registerInliner()

void mlir::registerInliner ( )
inline

Definition at line 1737 of file Passes.h.

◆ registerInlinerPass()

void mlir::registerInlinerPass ( )
inline

Definition at line 1744 of file Passes.h.

◆ registerIRDLToCppTranslation()

void mlir::registerIRDLToCppTranslation ( )

◆ registerLiftControlFlowToSCFPass()

void mlir::registerLiftControlFlowToSCFPass ( )
inline

Definition at line 8588 of file ArmSMEToLLVM.h.

◆ registerLiftControlFlowToSCFPassPass()

void mlir::registerLiftControlFlowToSCFPassPass ( )
inline

Definition at line 8595 of file ArmSMEToLLVM.h.

◆ registerLinalgBlockPackMatmul()

void mlir::registerLinalgBlockPackMatmul ( )
inline

Definition at line 1303 of file Passes.h.

◆ registerLinalgBlockPackMatmulPass()

void mlir::registerLinalgBlockPackMatmulPass ( )
inline

Definition at line 1310 of file Passes.h.

◆ registerLinalgDetensorizePass()

void mlir::registerLinalgDetensorizePass ( )
inline

Definition at line 1324 of file Passes.h.

◆ registerLinalgDetensorizePassPass()

void mlir::registerLinalgDetensorizePassPass ( )
inline

Definition at line 1331 of file Passes.h.

◆ registerLinalgElementwiseOpFusionPass()

void mlir::registerLinalgElementwiseOpFusionPass ( )
inline

Definition at line 1345 of file Passes.h.

◆ registerLinalgElementwiseOpFusionPassPass()

void mlir::registerLinalgElementwiseOpFusionPassPass ( )
inline

Definition at line 1352 of file Passes.h.

◆ registerLinalgFoldIntoElementwisePass()

void mlir::registerLinalgFoldIntoElementwisePass ( )
inline

Definition at line 1366 of file Passes.h.

◆ registerLinalgFoldIntoElementwisePassPass()

void mlir::registerLinalgFoldIntoElementwisePassPass ( )
inline

Definition at line 1373 of file Passes.h.

◆ registerLinalgFoldUnitExtentDimsPass()

void mlir::registerLinalgFoldUnitExtentDimsPass ( )
inline

Definition at line 1387 of file Passes.h.

◆ registerLinalgFoldUnitExtentDimsPassPass()

void mlir::registerLinalgFoldUnitExtentDimsPassPass ( )
inline

Definition at line 1394 of file Passes.h.

◆ registerLinalgGeneralizeNamedOpsPass()

void mlir::registerLinalgGeneralizeNamedOpsPass ( )
inline

Definition at line 1408 of file Passes.h.

◆ registerLinalgGeneralizeNamedOpsPassPass()

void mlir::registerLinalgGeneralizeNamedOpsPassPass ( )
inline

Definition at line 1415 of file Passes.h.

◆ registerLinalgInlineScalarOperandsPass()

void mlir::registerLinalgInlineScalarOperandsPass ( )
inline

Definition at line 1429 of file Passes.h.

◆ registerLinalgInlineScalarOperandsPassPass()

void mlir::registerLinalgInlineScalarOperandsPassPass ( )
inline

Definition at line 1436 of file Passes.h.

◆ registerLinalgMorphOpsPass()

void mlir::registerLinalgMorphOpsPass ( )
inline

Definition at line 1450 of file Passes.h.

◆ registerLinalgMorphOpsPassPass()

void mlir::registerLinalgMorphOpsPassPass ( )
inline

Definition at line 1457 of file Passes.h.

◆ registerLinalgPasses()

void mlir::registerLinalgPasses ( )
inline

Definition at line 1513 of file Passes.h.

Referenced by registerAllPasses().

◆ registerLinalgSpecializeGenericOpsPass()

void mlir::registerLinalgSpecializeGenericOpsPass ( )
inline

Definition at line 1471 of file Passes.h.

◆ registerLinalgSpecializeGenericOpsPassPass()

void mlir::registerLinalgSpecializeGenericOpsPassPass ( )
inline

Definition at line 1478 of file Passes.h.

◆ registerLLVMDialectImport() [1/2]

void mlir::registerLLVMDialectImport ( DialectRegistry & registry)

Registers the LLVM dialect and its import from LLVM IR in the given registry.

Definition at line 502 of file LLVMIRToLLVMTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllFromLLVMIRTranslations(), and registerLLVMDialectImport().

◆ registerLLVMDialectImport() [2/2]

void mlir::registerLLVMDialectImport ( MLIRContext & context)

Registers the LLVM dialect and its import from LLVM IR with the given context.

Definition at line 509 of file LLVMIRToLLVMTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerLLVMDialectImport().

◆ registerLLVMDialectTranslation() [1/2]

void mlir::registerLLVMDialectTranslation ( DialectRegistry & registry)

Register the LLVM dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 795 of file LLVMToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by mlirExecutionEngineCreate(), registerAllGPUToLLVMIRTranslations(), registerAllToLLVMIRTranslations(), and registerLLVMDialectTranslation().

◆ registerLLVMDialectTranslation() [2/2]

void mlir::registerLLVMDialectTranslation ( MLIRContext & context)

Register the LLVM dialect and the translation from it in the registry associated with the given context.

Definition at line 802 of file LLVMToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerLLVMDialectTranslation().

◆ registerLocationSnapshot()

void mlir::registerLocationSnapshot ( )
inline

Definition at line 1758 of file Passes.h.

◆ registerLocationSnapshotPass()

void mlir::registerLocationSnapshotPass ( )
inline

Definition at line 1765 of file Passes.h.

◆ registerLoopInvariantCodeMotion()

void mlir::registerLoopInvariantCodeMotion ( )
inline

Definition at line 1779 of file Passes.h.

◆ registerLoopInvariantCodeMotionPass()

void mlir::registerLoopInvariantCodeMotionPass ( )
inline

Definition at line 1786 of file Passes.h.

◆ registerLoopInvariantSubsetHoisting()

void mlir::registerLoopInvariantSubsetHoisting ( )
inline

Definition at line 1800 of file Passes.h.

◆ registerLoopInvariantSubsetHoistingPass()

void mlir::registerLoopInvariantSubsetHoistingPass ( )
inline

Definition at line 1807 of file Passes.h.

◆ registerLowerAffinePass()

void mlir::registerLowerAffinePass ( )
inline

Definition at line 8609 of file ArmSMEToLLVM.h.

◆ registerLowerAffinePassPass()

void mlir::registerLowerAffinePassPass ( )
inline

Definition at line 8616 of file ArmSMEToLLVM.h.

◆ registerLowerForeachToSCF()

void mlir::registerLowerForeachToSCF ( )
inline

Definition at line 1257 of file Passes.h.

◆ registerLowerForeachToSCFPass()

void mlir::registerLowerForeachToSCFPass ( )
inline

Definition at line 1264 of file Passes.h.

◆ registerLowerHostCodeToLLVMPass()

void mlir::registerLowerHostCodeToLLVMPass ( )
inline

Definition at line 8630 of file ArmSMEToLLVM.h.

◆ registerLowerHostCodeToLLVMPassPass()

void mlir::registerLowerHostCodeToLLVMPassPass ( )
inline

Definition at line 8637 of file ArmSMEToLLVM.h.

◆ registerLowerSparseIterationToSCF()

void mlir::registerLowerSparseIterationToSCF ( )
inline

Definition at line 1278 of file Passes.h.

◆ registerLowerSparseIterationToSCFPass()

void mlir::registerLowerSparseIterationToSCFPass ( )
inline

Definition at line 1285 of file Passes.h.

◆ registerLowerSparseOpsToForeach()

void mlir::registerLowerSparseOpsToForeach ( )
inline

Definition at line 1299 of file Passes.h.

◆ registerLowerSparseOpsToForeachPass()

void mlir::registerLowerSparseOpsToForeachPass ( )
inline

Definition at line 1306 of file Passes.h.

◆ registerMapMemRefStorageClass()

void mlir::registerMapMemRefStorageClass ( )
inline

Definition at line 8651 of file ArmSMEToLLVM.h.

◆ registerMapMemRefStorageClassPass()

void mlir::registerMapMemRefStorageClassPass ( )
inline

Definition at line 8658 of file ArmSMEToLLVM.h.

◆ registerMem2Reg()

void mlir::registerMem2Reg ( )
inline

Definition at line 1821 of file Passes.h.

◆ registerMem2RegPass()

void mlir::registerMem2RegPass ( )
inline

Definition at line 1828 of file Passes.h.

◆ registerMLIRContextCLOptions()

void mlir::registerMLIRContextCLOptions ( )

Register a set of useful command-line options that can be used to configure various flags within the MLIRContext.

These flags are used when constructing an MLIR context for initialization.

Definition at line 88 of file MLIRContext.cpp.

References clOptions.

Referenced by registerCLIOptions().

◆ registerNVGPUPasses()

void mlir::registerNVGPUPasses ( )
inline

Definition at line 103 of file Passes.h.

Referenced by registerAllPasses().

◆ registerNVVMDialectImport() [1/2]

void mlir::registerNVVMDialectImport ( DialectRegistry & registry)

Registers the NVVM dialect and its import from LLVM IR in the given registry.

Definition at line 87 of file LLVMIRToNVVMTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllFromLLVMIRTranslations(), and registerNVVMDialectImport().

◆ registerNVVMDialectImport() [2/2]

void mlir::registerNVVMDialectImport ( MLIRContext & context)

Registers the NVVM dialect and its import from LLVM IR with the given context.

Definition at line 94 of file LLVMIRToNVVMTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerNVVMDialectImport().

◆ registerNVVMDialectTranslation() [1/2]

void mlir::registerNVVMDialectTranslation ( DialectRegistry & registry)

Register the NVVM dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 507 of file NVVMToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllGPUToLLVMIRTranslations(), registerAllToLLVMIRTranslations(), and registerNVVMDialectTranslation().

◆ registerNVVMDialectTranslation() [2/2]

void mlir::registerNVVMDialectTranslation ( MLIRContext & context)

Register the NVVM dialect and the translation from it in the registry associated with the given context.

Definition at line 514 of file NVVMToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerNVVMDialectTranslation().

◆ registerOpenACCDialectTranslation() [1/2]

void mlir::registerOpenACCDialectTranslation ( DialectRegistry & registry)

Register the OpenACC dialect and the translation to the LLVM IR in the given registry;.

Definition at line 530 of file OpenACCToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllToLLVMIRTranslations(), and registerOpenACCDialectTranslation().

◆ registerOpenACCDialectTranslation() [2/2]

void mlir::registerOpenACCDialectTranslation ( MLIRContext & context)

Register the OpenACC dialect and the translation in the registry associated with the given context.

Definition at line 537 of file OpenACCToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerOpenACCDialectTranslation().

◆ registerOpenMPDialectTranslation() [1/2]

void mlir::registerOpenMPDialectTranslation ( DialectRegistry & registry)

Register the OpenMP dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 6541 of file OpenMPToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by mlirExecutionEngineCreate(), registerAllToLLVMIRTranslations(), and registerOpenMPDialectTranslation().

◆ registerOpenMPDialectTranslation() [2/2]

void mlir::registerOpenMPDialectTranslation ( MLIRContext & context)

Register the OpenMP dialect and the translation from it in the registry associated with the given context.

Definition at line 6548 of file OpenMPToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerOpenMPDialectTranslation().

◆ registerOptimizeSharedMemory()

void mlir::registerOptimizeSharedMemory ( )
inline

Definition at line 82 of file Passes.h.

◆ registerOptimizeSharedMemoryPass()

void mlir::registerOptimizeSharedMemoryPass ( )
inline

Definition at line 89 of file Passes.h.

◆ registerOptReductionPass()

void mlir::registerOptReductionPass ( )
inline

Definition at line 223 of file Passes.h.

◆ registerOptReductionPassPass()

void mlir::registerOptReductionPassPass ( )
inline

Definition at line 230 of file Passes.h.

◆ registerOutlineShapeComputationPass()

void mlir::registerOutlineShapeComputationPass ( )
inline

Definition at line 248 of file Passes.h.

◆ registerOutlineShapeComputationPassPass()

void mlir::registerOutlineShapeComputationPassPass ( )
inline

Definition at line 255 of file Passes.h.

◆ registerPass()

void mlir::registerPass ( const PassAllocatorFunction & function)

Register a specific dialect pass allocator function with the system, typically used through the PassRegistration template.

Definition at line 149 of file PassRegistry.cpp.

References passRegistry, and passRegistryTypeIDs.

Referenced by mlir::PassRegistration< ConcretePass >::PassRegistration().

◆ registerPassManagerCLOptions()

void mlir::registerPassManagerCLOptions ( )

Register a set of useful command-line options that can be used to configure a pass manager.

The values of these options can be applied via the 'applyPassManagerCLOptions' method below.

Definition at line 140 of file PassManagerOptions.cpp.

References options.

Referenced by registerCLIOptions().

◆ registerPassPipeline()

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

Referenced by mlir::PassPipelineRegistration< Options >::PassPipelineRegistration(), and mlir::PassPipelineRegistration< EmptyPipelineOptions >::PassPipelineRegistration().

◆ registerPreSparsificationRewrite()

void mlir::registerPreSparsificationRewrite ( )
inline

Definition at line 1320 of file Passes.h.

◆ registerPreSparsificationRewritePass()

void mlir::registerPreSparsificationRewritePass ( )
inline

Definition at line 1327 of file Passes.h.

◆ registerPrintIRPass()

void mlir::registerPrintIRPass ( )
inline

Definition at line 1842 of file Passes.h.

◆ registerPrintIRPassPass()

void mlir::registerPrintIRPassPass ( )
inline

Definition at line 1849 of file Passes.h.

◆ registerPrintOpStats()

void mlir::registerPrintOpStats ( )
inline

Definition at line 1863 of file Passes.h.

◆ registerPrintOpStatsPass()

void mlir::registerPrintOpStatsPass ( )
inline

Definition at line 1870 of file Passes.h.

◆ registerPtrDialectTranslation() [1/2]

void mlir::registerPtrDialectTranslation ( DialectRegistry & registry)

Register the ptr dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 454 of file PtrToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllToLLVMIRTranslations(), and registerPtrDialectTranslation().

◆ registerPtrDialectTranslation() [2/2]

void mlir::registerPtrDialectTranslation ( MLIRContext & context)

Register the ptr dialect and the translation from it in the registry associated with the given context.

Definition at line 461 of file PtrToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerPtrDialectTranslation().

◆ registerReconcileUnrealizedCastsPass()

void mlir::registerReconcileUnrealizedCastsPass ( )
inline

Definition at line 8672 of file ArmSMEToLLVM.h.

◆ registerReconcileUnrealizedCastsPassPass()

void mlir::registerReconcileUnrealizedCastsPassPass ( )
inline

Definition at line 8679 of file ArmSMEToLLVM.h.

◆ registerReducerPasses()

void mlir::registerReducerPasses ( )
inline

Definition at line 265 of file Passes.h.

Referenced by mlirReduceMain().

◆ registerReductionTreePass()

void mlir::registerReductionTreePass ( )
inline

Definition at line 244 of file Passes.h.

◆ registerReductionTreePassPass()

void mlir::registerReductionTreePassPass ( )
inline

Definition at line 251 of file Passes.h.

◆ registerRemoveDeadValues()

void mlir::registerRemoveDeadValues ( )
inline

Definition at line 1884 of file Passes.h.

◆ registerRemoveDeadValuesPass()

void mlir::registerRemoveDeadValuesPass ( )
inline

Definition at line 1891 of file Passes.h.

◆ registerRemoveShapeConstraintsPass()

void mlir::registerRemoveShapeConstraintsPass ( )
inline

Definition at line 269 of file Passes.h.

◆ registerRemoveShapeConstraintsPassPass()

void mlir::registerRemoveShapeConstraintsPassPass ( )
inline

Definition at line 276 of file Passes.h.

◆ registerROCDLDialectTranslation() [1/2]

void mlir::registerROCDLDialectTranslation ( DialectRegistry & registry)

Register the ROCDL dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 243 of file ROCDLToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllGPUToLLVMIRTranslations(), registerAllToLLVMIRTranslations(), and registerROCDLDialectTranslation().

◆ registerROCDLDialectTranslation() [2/2]

void mlir::registerROCDLDialectTranslation ( MLIRContext & context)

Register the ROCDL dialect and the translation from it in the registry associated with the given context.

Definition at line 250 of file ROCDLToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerROCDLDialectTranslation().

◆ registerSCCP()

void mlir::registerSCCP ( )
inline

Definition at line 1905 of file Passes.h.

◆ registerSCCPPass()

void mlir::registerSCCPPass ( )
inline

Definition at line 1912 of file Passes.h.

◆ registerSCFForallToForLoop()

void mlir::registerSCFForallToForLoop ( )
inline

Definition at line 925 of file Passes.h.

◆ registerSCFForallToForLoopPass()

void mlir::registerSCFForallToForLoopPass ( )
inline

Definition at line 932 of file Passes.h.

◆ registerSCFForallToParallelLoop()

void mlir::registerSCFForallToParallelLoop ( )
inline

Definition at line 946 of file Passes.h.

◆ registerSCFForallToParallelLoopPass()

void mlir::registerSCFForallToParallelLoopPass ( )
inline

Definition at line 953 of file Passes.h.

◆ registerSCFForLoopCanonicalization()

void mlir::registerSCFForLoopCanonicalization ( )
inline

Definition at line 820 of file Passes.h.

◆ registerSCFForLoopCanonicalizationPass()

void mlir::registerSCFForLoopCanonicalizationPass ( )
inline

Definition at line 827 of file Passes.h.

◆ registerSCFForLoopPeeling()

void mlir::registerSCFForLoopPeeling ( )
inline

Definition at line 841 of file Passes.h.

◆ registerSCFForLoopPeelingPass()

void mlir::registerSCFForLoopPeelingPass ( )
inline

Definition at line 848 of file Passes.h.

◆ registerSCFForLoopRangeFolding()

void mlir::registerSCFForLoopRangeFolding ( )
inline

Definition at line 862 of file Passes.h.

◆ registerSCFForLoopRangeFoldingPass()

void mlir::registerSCFForLoopRangeFoldingPass ( )
inline

Definition at line 869 of file Passes.h.

◆ registerSCFForLoopSpecialization()

void mlir::registerSCFForLoopSpecialization ( )
inline

Definition at line 883 of file Passes.h.

◆ registerSCFForLoopSpecializationPass()

void mlir::registerSCFForLoopSpecializationPass ( )
inline

Definition at line 890 of file Passes.h.

◆ registerSCFForToWhileLoop()

void mlir::registerSCFForToWhileLoop ( )
inline

Definition at line 904 of file Passes.h.

◆ registerSCFForToWhileLoopPass()

void mlir::registerSCFForToWhileLoopPass ( )
inline

Definition at line 911 of file Passes.h.

◆ registerSCFParallelForToNestedFors()

void mlir::registerSCFParallelForToNestedFors ( )
inline

Definition at line 967 of file Passes.h.

◆ registerSCFParallelForToNestedForsPass()

void mlir::registerSCFParallelForToNestedForsPass ( )
inline

Definition at line 974 of file Passes.h.

◆ registerSCFParallelLoopFusion()

void mlir::registerSCFParallelLoopFusion ( )
inline

Definition at line 988 of file Passes.h.

◆ registerSCFParallelLoopFusionPass()

void mlir::registerSCFParallelLoopFusionPass ( )
inline

Definition at line 995 of file Passes.h.

◆ registerSCFParallelLoopSpecialization()

void mlir::registerSCFParallelLoopSpecialization ( )
inline

Definition at line 1009 of file Passes.h.

◆ registerSCFParallelLoopSpecializationPass()

void mlir::registerSCFParallelLoopSpecializationPass ( )
inline

Definition at line 1016 of file Passes.h.

◆ registerSCFParallelLoopTiling()

void mlir::registerSCFParallelLoopTiling ( )
inline

Definition at line 1030 of file Passes.h.

◆ registerSCFParallelLoopTilingPass()

void mlir::registerSCFParallelLoopTilingPass ( )
inline

Definition at line 1037 of file Passes.h.

◆ registerSCFPasses()

void mlir::registerSCFPasses ( )
inline

Definition at line 1072 of file Passes.h.

Referenced by registerAllPasses().

◆ registerSCFToControlFlowPass()

void mlir::registerSCFToControlFlowPass ( )
inline

Definition at line 8693 of file ArmSMEToLLVM.h.

◆ registerSCFToControlFlowPassPass()

void mlir::registerSCFToControlFlowPassPass ( )
inline

Definition at line 8700 of file ArmSMEToLLVM.h.

◆ registerSCFToEmitC()

void mlir::registerSCFToEmitC ( )
inline

Definition at line 8714 of file ArmSMEToLLVM.h.

◆ registerSCFToEmitCPass()

void mlir::registerSCFToEmitCPass ( )
inline

Definition at line 8721 of file ArmSMEToLLVM.h.

◆ registerSCFToSPIRV()

void mlir::registerSCFToSPIRV ( )
inline

Definition at line 8735 of file ArmSMEToLLVM.h.

◆ registerSCFToSPIRVPass()

void mlir::registerSCFToSPIRVPass ( )
inline

Definition at line 8742 of file ArmSMEToLLVM.h.

◆ registerSetLLVMModuleDataLayoutPass()

void mlir::registerSetLLVMModuleDataLayoutPass ( )
inline

Definition at line 8756 of file ArmSMEToLLVM.h.

◆ registerSetLLVMModuleDataLayoutPassPass()

void mlir::registerSetLLVMModuleDataLayoutPassPass ( )
inline

Definition at line 8763 of file ArmSMEToLLVM.h.

◆ registerShapePasses()

void mlir::registerShapePasses ( )
inline

Definition at line 311 of file Passes.h.

Referenced by registerAllPasses().

◆ registerShapeToShapeLoweringPass()

void mlir::registerShapeToShapeLoweringPass ( )
inline

Definition at line 290 of file Passes.h.

◆ registerShapeToShapeLoweringPassPass()

void mlir::registerShapeToShapeLoweringPassPass ( )
inline

Definition at line 297 of file Passes.h.

◆ registerSimplifyDepthwiseConvPass()

void mlir::registerSimplifyDepthwiseConvPass ( )
inline

Definition at line 1492 of file Passes.h.

◆ registerSimplifyDepthwiseConvPassPass()

void mlir::registerSimplifyDepthwiseConvPassPass ( )
inline

Definition at line 1499 of file Passes.h.

◆ registerSparseAssembler()

void mlir::registerSparseAssembler ( )
inline

Definition at line 1341 of file Passes.h.

◆ registerSparseAssemblerPass()

void mlir::registerSparseAssemblerPass ( )
inline

Definition at line 1348 of file Passes.h.

◆ registerSparseBufferRewrite()

void mlir::registerSparseBufferRewrite ( )
inline

Definition at line 1362 of file Passes.h.

◆ registerSparseBufferRewritePass()

void mlir::registerSparseBufferRewritePass ( )
inline

Definition at line 1369 of file Passes.h.

◆ registerSparseGPUCodegen()

void mlir::registerSparseGPUCodegen ( )
inline

Definition at line 1383 of file Passes.h.

◆ registerSparseGPUCodegenPass()

void mlir::registerSparseGPUCodegenPass ( )
inline

Definition at line 1390 of file Passes.h.

◆ registerSparseReinterpretMap()

void mlir::registerSparseReinterpretMap ( )
inline

Definition at line 1404 of file Passes.h.

◆ registerSparseReinterpretMapPass()

void mlir::registerSparseReinterpretMapPass ( )
inline

Definition at line 1411 of file Passes.h.

◆ registerSparseSpaceCollapse()

void mlir::registerSparseSpaceCollapse ( )
inline

Definition at line 1425 of file Passes.h.

◆ registerSparseSpaceCollapsePass()

void mlir::registerSparseSpaceCollapsePass ( )
inline

Definition at line 1432 of file Passes.h.

◆ registerSparseTensorCodegen()

void mlir::registerSparseTensorCodegen ( )
inline

Definition at line 1446 of file Passes.h.

◆ registerSparseTensorCodegenPass()

void mlir::registerSparseTensorCodegenPass ( )
inline

Definition at line 1453 of file Passes.h.

◆ registerSparseTensorConversionPass()

void mlir::registerSparseTensorConversionPass ( )
inline

Definition at line 1467 of file Passes.h.

◆ registerSparseTensorConversionPassPass()

void mlir::registerSparseTensorConversionPassPass ( )
inline

Definition at line 1474 of file Passes.h.

◆ registerSparseTensorPasses()

void mlir::registerSparseTensorPasses ( )
inline

Definition at line 1593 of file Passes.h.

Referenced by registerAllPasses().

◆ registerSparseVectorization()

void mlir::registerSparseVectorization ( )
inline

Definition at line 1488 of file Passes.h.

◆ registerSparseVectorizationPass()

void mlir::registerSparseVectorizationPass ( )
inline

Definition at line 1495 of file Passes.h.

◆ registerSparsificationAndBufferization()

void mlir::registerSparsificationAndBufferization ( )
inline

Definition at line 1509 of file Passes.h.

◆ registerSparsificationAndBufferizationPass()

void mlir::registerSparsificationAndBufferizationPass ( )
inline

Definition at line 1516 of file Passes.h.

◆ registerSparsificationPass()

void mlir::registerSparsificationPass ( )
inline

Definition at line 1530 of file Passes.h.

◆ registerSparsificationPassPass()

void mlir::registerSparsificationPassPass ( )
inline

Definition at line 1537 of file Passes.h.

◆ registerSPIRVDialectTranslation() [1/2]

void mlir::registerSPIRVDialectTranslation ( DialectRegistry & registry)

Register the SPIR-V dialect and the translation from it to the LLVM IR in the given registry;.

Definition at line 21 of file SPIRVToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::insert().

Referenced by registerAllGPUToLLVMIRTranslations(), registerAllToLLVMIRTranslations(), and registerSPIRVDialectTranslation().

◆ registerSPIRVDialectTranslation() [2/2]

void mlir::registerSPIRVDialectTranslation ( MLIRContext & context)

Register the SPIR-V dialect and the translation from it in the registry associated with the given context.

Definition at line 25 of file SPIRVToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerSPIRVDialectTranslation().

◆ registerSROA()

void mlir::registerSROA ( )
inline

Definition at line 1926 of file Passes.h.

◆ registerSROAPass()

void mlir::registerSROAPass ( )
inline

Definition at line 1933 of file Passes.h.

◆ registerStageSparseOperations()

void mlir::registerStageSparseOperations ( )
inline

Definition at line 1551 of file Passes.h.

◆ registerStageSparseOperationsPass()

void mlir::registerStageSparseOperationsPass ( )
inline

Definition at line 1558 of file Passes.h.

◆ registerStorageSpecifierToLLVM()

void mlir::registerStorageSpecifierToLLVM ( )
inline

Definition at line 1572 of file Passes.h.

◆ registerStorageSpecifierToLLVMPass()

void mlir::registerStorageSpecifierToLLVMPass ( )
inline

Definition at line 1579 of file Passes.h.

◆ registerStripDebugInfo()

void mlir::registerStripDebugInfo ( )
inline

Definition at line 1947 of file Passes.h.

◆ registerStripDebugInfoPass()

void mlir::registerStripDebugInfoPass ( )
inline

Definition at line 1954 of file Passes.h.

◆ registerSymbolDCE()

void mlir::registerSymbolDCE ( )
inline

Definition at line 1968 of file Passes.h.

◆ registerSymbolDCEPass()

void mlir::registerSymbolDCEPass ( )
inline

Definition at line 1975 of file Passes.h.

◆ registerSymbolPrivatize()

void mlir::registerSymbolPrivatize ( )
inline

Definition at line 1989 of file Passes.h.

◆ registerSymbolPrivatizePass()

void mlir::registerSymbolPrivatizePass ( )
inline

Definition at line 1996 of file Passes.h.

◆ registerTestRoundtripDebugSPIRV()

void mlir::registerTestRoundtripDebugSPIRV ( )

Definition at line 188 of file TranslateRegistration.cpp.

References roundTripModule().

◆ registerTestRoundtripSPIRV()

void mlir::registerTestRoundtripSPIRV ( )

Definition at line 177 of file TranslateRegistration.cpp.

References roundTripModule().

◆ registerTestSCFParallelLoopCollapsing()

void mlir::registerTestSCFParallelLoopCollapsing ( )
inline

Definition at line 1051 of file Passes.h.

◆ registerTestSCFParallelLoopCollapsingPass()

void mlir::registerTestSCFParallelLoopCollapsingPass ( )
inline

Definition at line 1058 of file Passes.h.

◆ registerToCppTranslation()

void mlir::registerToCppTranslation ( )

Definition at line 24 of file TranslateRegistration.cpp.

References mlir::emitc::translateToCpp().

Referenced by registerAllTranslations().

◆ registerToLLVMIRTranslation()

void mlir::registerToLLVMIRTranslation ( )

◆ registerTopologicalSort()

void mlir::registerTopologicalSort ( )
inline

Definition at line 2010 of file Passes.h.

◆ registerTopologicalSortPass()

void mlir::registerTopologicalSortPass ( )
inline

Definition at line 2017 of file Passes.h.

◆ registerTosaToArithPass()

void mlir::registerTosaToArithPass ( )
inline

Definition at line 8777 of file ArmSMEToLLVM.h.

◆ registerTosaToArithPassPass()

void mlir::registerTosaToArithPassPass ( )
inline

Definition at line 8784 of file ArmSMEToLLVM.h.

◆ registerTosaToLinalg()

void mlir::registerTosaToLinalg ( )
inline

Definition at line 8798 of file ArmSMEToLLVM.h.

◆ registerTosaToLinalgNamed()

void mlir::registerTosaToLinalgNamed ( )
inline

Definition at line 8819 of file ArmSMEToLLVM.h.

◆ registerTosaToLinalgNamedPass()

void mlir::registerTosaToLinalgNamedPass ( )
inline

Definition at line 8826 of file ArmSMEToLLVM.h.

◆ registerTosaToLinalgPass()

void mlir::registerTosaToLinalgPass ( )
inline

Definition at line 8805 of file ArmSMEToLLVM.h.

◆ registerTosaToMLProgram()

void mlir::registerTosaToMLProgram ( )
inline

Definition at line 8840 of file ArmSMEToLLVM.h.

◆ registerTosaToMLProgramPass()

void mlir::registerTosaToMLProgramPass ( )
inline

Definition at line 8847 of file ArmSMEToLLVM.h.

◆ registerTosaToSCFPass()

void mlir::registerTosaToSCFPass ( )
inline

Definition at line 8861 of file ArmSMEToLLVM.h.

◆ registerTosaToSCFPassPass()

void mlir::registerTosaToSCFPassPass ( )
inline

Definition at line 8868 of file ArmSMEToLLVM.h.

◆ registerTosaToTensorPass()

void mlir::registerTosaToTensorPass ( )
inline

Definition at line 8882 of file ArmSMEToLLVM.h.

◆ registerTosaToTensorPassPass()

void mlir::registerTosaToTensorPassPass ( )
inline

Definition at line 8889 of file ArmSMEToLLVM.h.

◆ registerToSPIRVTranslation()

void mlir::registerToSPIRVTranslation ( )

Definition at line 124 of file TranslateRegistration.cpp.

References serializeModule().

Referenced by registerAllTranslations().

◆ registerTransformsPasses()

void mlir::registerTransformsPasses ( )
inline

Definition at line 2052 of file Passes.h.

Referenced by registerAllPasses().

◆ registerTranslationCLOptions()

void mlir::registerTranslationCLOptions ( )

Register command-line options used by the translation registry.

Definition at line 37 of file Translation.cpp.

References clOptions.

◆ registerUBToLLVMConversionPass()

void mlir::registerUBToLLVMConversionPass ( )
inline

Definition at line 8903 of file ArmSMEToLLVM.h.

◆ registerUBToLLVMConversionPassPass()

void mlir::registerUBToLLVMConversionPassPass ( )
inline

Definition at line 8910 of file ArmSMEToLLVM.h.

◆ registerUBToSPIRVConversionPass()

void mlir::registerUBToSPIRVConversionPass ( )
inline

Definition at line 8924 of file ArmSMEToLLVM.h.

◆ registerUBToSPIRVConversionPassPass()

void mlir::registerUBToSPIRVConversionPassPass ( )
inline

Definition at line 8931 of file ArmSMEToLLVM.h.

◆ registerVCIXDialectTranslation() [1/2]

void mlir::registerVCIXDialectTranslation ( DialectRegistry & registry)

Register the VCIX dialect and the translation from it to the LLVM IR in the given registry.

Definition at line 76 of file VCIXToLLVMIRTranslation.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::DialectRegistry::insert().

Referenced by registerAllToLLVMIRTranslations(), and registerVCIXDialectTranslation().

◆ registerVCIXDialectTranslation() [2/2]

void mlir::registerVCIXDialectTranslation ( MLIRContext & context)

Register the VCIX dialect and the translation from it in the registry associated with the given context.

Definition at line 83 of file VCIXToLLVMIRTranslation.cpp.

References mlir::MLIRContext::appendDialectRegistry(), and registerVCIXDialectTranslation().

◆ registerViewOpGraph()

void mlir::registerViewOpGraph ( )
inline

Definition at line 2031 of file Passes.h.

◆ registerViewOpGraphPass()

void mlir::registerViewOpGraphPass ( )
inline

Definition at line 2038 of file Passes.h.

◆ registerXeVMDialectTranslation() [1/2]

void mlir::registerXeVMDialectTranslation ( mlir::DialectRegistry & registry)

Register the XeVM dialect and the translation from it to the LLVM IR in the given registry;.

Referenced by registerAllGPUToLLVMIRTranslations(), and registerAllToLLVMIRTranslations().

◆ registerXeVMDialectTranslation() [2/2]

void mlir::registerXeVMDialectTranslation ( mlir::MLIRContext & context)

Register the XeVM dialect and the translation from it in the registry associated with the given context.

◆ reifyDimOfResult()

FailureOr< OpFoldResult > mlir::reifyDimOfResult ( OpBuilder & b,
Operation * op,
int resultIndex,
int dim )

Definition at line 69 of file InferTypeOpInterface.cpp.

References b.

◆ reifyResultShapes()

LogicalResult mlir::reifyResultShapes ( OpBuilder & b,
Operation * op,
ReifiedRankedShapedTypeDims & reifiedReturnShapes )

◆ reifyShapeOfResult()

FailureOr< SmallVector< OpFoldResult > > mlir::reifyShapeOfResult ( OpBuilder & b,
Operation * op,
int resultIndex )

Definition at line 62 of file InferTypeOpInterface.cpp.

References b.

◆ removeDuplicateExprs()

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

Definition at line 776 of file AffineMap.cpp.

References mlir::AffineMap::get(), mlir::AffineMap::getContext(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumSymbols(), and mlir::AffineMap::getResults().

Referenced by canonicalizeLoopBounds().

◆ replaceAllUsesInRegionWith()

void mlir::replaceAllUsesInRegionWith ( Value orig,
Value replacement,
Region & region )

Replace all uses of orig within the given region with replacement.

Definition at line 35 of file RegionUtils.cpp.

References mlir::Value::getUses(), mlir::Region::isAncestor(), and replacement().

Referenced by mlir::async::cloneConstantsIntoTheRegion(), collapseParallelLoops(), sinkOperationsIntoLaunchOp(), stripmineSink(), and stripmineSink().

◆ replaceLoopNestWithNewYields()

SmallVector< scf::ForOp > mlir::replaceLoopNestWithNewYields ( RewriterBase & rewriter,
MutableArrayRef< scf::ForOp > loopNest,
ValueRange newIterOperands,
const NewYieldValuesFn & newYieldValuesFn,
bool replaceIterOperandsUsesInLoop = true )

Update a perfectly nested loop nest to yield new values from the innermost loop and propagating it up through the loop nest.

This function

  • Expects loopNest to be a perfectly nested loop with outer most loop first and innermost loop last.
  • newIterOperands are the initialization values to be used for the outermost loop
  • newYielValueFn is the callback that generates the new values to be yielded from within the innermost loop.
  • The original loops are not erased, but are left in a "no-op" state where the body of the loop just yields the basic block arguments that correspond to the initialization values of a loop. The original loops are dead after this method.
  • If replaceIterOperandsUsesInLoop is true, all uses of the newIterOperands within the generated new loop are replaced with the corresponding BlockArgument in the loop body.

Definition at line 35 of file Utils.cpp.

References replaceLoopNestWithNewYields().

Referenced by replaceLoopNestWithNewYields().

◆ runRegionDCE()

LogicalResult mlir::runRegionDCE ( RewriterBase & rewriter,
MutableArrayRef< Region > regions )

This function returns success if any operations or arguments were deleted, failure otherwise.

Definition at line 495 of file RegionUtils.cpp.

References deleteDeadness(), and propagateLiveness().

Referenced by simplifyRegions().

◆ setupDebuggerExecutionContextHook()

◆ simplifyAffineExpr()

AffineExpr mlir::simplifyAffineExpr ( AffineExpr expr,
unsigned numDims,
unsigned numSymbols )

Simplify an affine expression by flattening and some amount of simple analysis.

Simplify the affine expression by flattening it and reconstructing it.

This has complexity linear in the number of nodes in 'expr'. Returns the simplified expression, which is the same as the input expression if it can't be simplified. When expr is semi-affine, a simplified semi-affine expression is constructed in the sorted order of dimension and symbol positions.

Definition at line 1612 of file AffineExpr.cpp.

References getAffineExprFromFlatForm(), mlir::AffineExpr::getContext(), getSemiAffineExprFromFlatForm(), mlir::AffineExpr::isPureAffine(), mlir::SimpleAffineExprFlattener::localExprs, mlir::SimpleAffineExprFlattener::operandExprStack, and mlir::AffineExprVisitor< SubClass, RetTy >::walkPostOrder().

Referenced by createPrivateMemRef(), mlir::FlatLinearConstraints::getConstantBoundOnDimSize(), getConstDifference(), mlir::FlatLinearConstraints::getSliceBounds(), getStridesAndOffset(), makeCanonicalStridedLayoutExpr(), mlirSimplifyAffineExpr(), mlir::affine::reorderOperandsByHoistability(), mlir::MutableAffineMap::simplify(), and simplifyAffineMap().

◆ simplifyAffineMap()

◆ simplifyRegions()

LogicalResult mlir::simplifyRegions ( RewriterBase & rewriter,
MutableArrayRef< Region > regions,
bool mergeBlocks = true )

Run a set of structural simplifications over the given regions.

This includes transformations like unreachable block elimination, dead argument elimination, as well as some other DCE. This function returns success if any of the regions were simplified, failure otherwise. The provided rewriter is used to notify callers of operation and block deletion. Structurally similar blocks will be merged if the mergeBlock argument is true. Note this can lead to merged blocks with extra arguments.

This includes transformations like unreachable block elimination, dead argument elimination, as well as some other DCE. This function returns success if any of the regions were simplified, failure otherwise.

Definition at line 1069 of file RegionUtils.cpp.

References dropRedundantArguments(), eraseUnreachableBlocks(), mergeIdenticalBlocks(), runRegionDCE(), and success().

◆ sinkOperationsIntoLaunchOp()

LogicalResult mlir::sinkOperationsIntoLaunchOp ( gpu::LaunchOp launchOp,
llvm::function_ref< bool(Operation *)> isSinkingBeneficiary )

Sink operations into the launchOp to reduce the number of values that are used within the region of the operation, but defined outside of the region.

Definition at line 122 of file KernelOutlining.cpp.

References mlir::OpBuilder::clone(), extractBeneficiaryOps(), mlir::Operation::getResults(), getUsedValuesDefinedAbove(), replaceAllUsesInRegionWith(), and success().

◆ sortTopologically() [1/2]

bool mlir::sortTopologically ( Block * block,
function_ref< bool(Value, Operation *)> isOperandReady = nullptr )

Given a block, sort its operations in topological order, excluding its terminator if it has one.

This sort is stable.

Definition at line 102 of file TopologicalSortUtils.cpp.

References sortTopologically(), and mlir::Block::without_terminator().

◆ sortTopologically() [2/2]

bool mlir::sortTopologically ( Block * block,
iterator_range< Block::iterator > ops,
function_ref< bool(Value, Operation *)> isOperandReady = nullptr )

Given a block, sort a range operations in said block in topological order.

The main purpose is readability of graph regions, potentially faster processing of certain transformations and analyses, or fixing the SSA dominance of blocks that require it after transformations. The function sorts the given operations such that, as much as possible, all users appear after their producers.

For example:

%0 = test.foo
%1 = test.bar %0, %2
%2 = test.baz

Will become:

%0 = test.foo
%1 = test.baz
%2 = test.bar %0, %1

The sort also works on operations with regions and implicit captures. For example:

%0 = test.foo {
test.baz %1
%1 = test.bar %2
}
%2 = test.foo

Will become:

%0 = test.foo
%1 = test.foo {
test.baz %2
%2 = test.bar %0
}

Note that the sort is not recursive on nested regions. This sort is stable; if the operations are already topologically sorted, nothing changes.

Operations that form cycles are moved to the end of the block in order. If the sort is left with only operations that form a cycle, it breaks the cycle by marking the first encountered operation as ready and moving on.

The function optionally accepts a callback that can be provided by users to virtually break cycles early. It is called on top-level operations in the block with value uses at or below those operations. The function should return true to mark that value as ready to be scheduled.

For example, if isOperandReady is set to always mark edges from foo.A to foo.B as ready, these operations:

%0 = foo.B(%1)
%1 = foo.C(%2)
%2 = foo.A(%0)

Are sorted as:

%0 = foo.A(%2)
%1 = foo.C(%0)
%2 = foo.B(%1)

Definition at line 56 of file TopologicalSortUtils.cpp.

References isOpReady(), and mlir::Operation::moveBefore().

Referenced by sortTopologically().

◆ splitAndProcessBuffer() [1/2]

LogicalResult mlir::splitAndProcessBuffer ( std::unique_ptr< llvm::MemoryBuffer > originalBuffer,
ChunkBufferHandler processChunkBuffer,
raw_ostream & os,
llvm::StringRef inputSplitMarker = kDefaultSplitMarker,
llvm::StringRef outputSplitMarker = "" )

Splits the specified buffer on a marker (// ----- by default), processes each chunk independently according to the normal processChunkBuffer logic, and writes all results to os.

This is used to allow a large number of small independent tests to be put into a single file. The input split marker is configurable. If it is empty, merging is disabled, which allows for merging split and non-split code paths. Output split markers (//----- by default) followed by a new line character, respectively, are placed between each of the processed output chunks. (The new line character is inserted even if the split marker is empty.)

References kDefaultSplitMarker.

Referenced by MlirOptMain().

◆ splitAndProcessBuffer() [2/2]

LogicalResult mlir::splitAndProcessBuffer ( std::unique_ptr< llvm::MemoryBuffer > originalBuffer,
NoSourceChunkBufferHandler processChunkBuffer,
raw_ostream & os,
llvm::StringRef inputSplitMarker = kDefaultSplitMarker,
llvm::StringRef outputSplitMarker = "" )

Same as above, but for case where the original buffer is not used while processing the chunk.

References kDefaultSplitMarker.

◆ storageClassToAddressSpace()

unsigned mlir::storageClassToAddressSpace ( spirv::ClientAPI clientAPI,
spirv::StorageClass storageClass )

Definition at line 51 of file AttrToLLVMConverter.cpp.

Referenced by convertPointerType().

◆ structFuncArgTypeConverter()

LogicalResult mlir::structFuncArgTypeConverter ( const LLVMTypeConverter & converter,
Type type,
SmallVectorImpl< Type > & result )

Callback to convert function argument types.

Give structFuncArgTypeConverter access to memref-specific functions.

It converts a MemRef function argument to a list of non-aggregate types containing descriptor information, and an UnrankedmemRef function argument to a list containing the rank and a pointer to a descriptor struct.

Definition at line 801 of file TypeConverter.cpp.

References mlir::LLVMTypeConverter::getMemRefDescriptorFields(), mlir::LLVMTypeConverter::getUnrankedMemRefDescriptorFields(), result, and success().

◆ TableGenLspServerMain()

LogicalResult mlir::TableGenLspServerMain ( int argc,
char ** argv )

Implementation for tools like tblgen-lsp-server.

Definition at line 24 of file TableGenLspServerMain.cpp.

References options, and mlir::lsp::runTableGenLSPServer().

◆ thread_safe_nulls()

llvm::raw_ostream & mlir::thread_safe_nulls ( )

Returns a raw output stream that simply discards the output, but in a thread-safe manner.

Similar to llvm::nulls.

Definition at line 12 of file RawOstreamExtras.cpp.

Referenced by mlir::linalg::isaElemwiseSingleBinaryOpInterface().

◆ tile() [1/2]

SmallVector< Loops, 8 > mlir::tile ( ArrayRef< scf::ForOp > forOps,
ArrayRef< Value > sizes,
ArrayRef< scf::ForOp > targets )

Performs tiling fo imperfectly nested loops (with interchange) by strip-mining the forOps by sizes and sinking them, in their order of occurrence in forOps, under each of the targets.

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

Definition at line 1293 of file Utils.cpp.

References stripmineSink().

Referenced by mlir::linalg::areTilesAndTiledDimsAllConstant(), convertOmpLoopNest(), extractFixedOuterLoops(), mlir::linalg::getNewMixedTileSizes(), mlir::linalg::pack(), and tile().

◆ tile() [2/2]

Loops mlir::tile ( ArrayRef< scf::ForOp > forOps,
ArrayRef< Value > sizes,
scf::ForOp target )

Performs tiling (with interchange) by strip-mining the forOps by sizes and sinking them, in their order of occurrence in forOps, under target.

Returns the new AffineForOps, one per forOps, nested immediately under target.

Definition at line 1306 of file Utils.cpp.

References target, and tile().

◆ tilePerfectlyNested()

Loops mlir::tilePerfectlyNested ( scf::ForOp rootForOp,
ArrayRef< Value > sizes )

Tile a nest of scf::ForOp loops rooted at rootForOp with the given (parametric) sizes.

Sizes are expected to be strictly positive values at runtime. If more sizes than loops are provided, discard the trailing values in sizes. Assumes the loop nest is permutable. Returns the newly created intra-tile loops.

Definition at line 1314 of file Utils.cpp.

References getPerfectlyNestedLoopsImpl().

◆ topologicalSort()

SetVector< Operation * > mlir::topologicalSort ( const SetVector< Operation * > & toSort)

Sorts all operations in toSort topologically while also considering region semantics.

Does not support multi-sets.

Definition at line 275 of file TopologicalSortUtils.cpp.

Referenced by destructureSlot(), getConsumerFromLoopUses(), getOpToConvert(), getSlice(), moveValueDefinitions(), and promoteSingleIterReductionLoop().

◆ toString()

StringRef mlir::toString ( AsmResourceEntryKind kind)

◆ transformCFGToSCF()

FailureOr< bool > mlir::transformCFGToSCF ( Region & region,
CFGToSCFInterface & interface,
DominanceInfo & dominanceInfo )

Transformation lifting any dialect implementing control flow graph operations to a dialect implementing structured control flow operations.

region is the region that should be transformed. The implementation of interface is responsible for the conversion of the control flow operations to the structured control flow operations.

If the region contains only a single kind of return-like operation, all control flow graph operations will be converted successfully. Otherwise a single control flow graph operation branching to one block per return-like operation kind remains.

The transformation currently requires that all control flow graph operations have no side effects, implement the BranchOpInterface and does not have any operation produced successor operands. Returns failure if any of the preconditions are violated or if any of the methods of interface failed. The IR is left in an unspecified state.

Otherwise, returns true or false if any changes to the IR have been made.

Definition at line 1273 of file CFGToSCF.cpp.

References mlir::OpBuilder::atBlockBegin(), checkTransformationPreconditions(), createSingleExitBlocksForReturnLike(), mlir::Region::empty(), mlir::Region::front(), mlir::CFGToSCFInterface::getCFGSwitchValue(), mlir::Region::getLoc(), mlir::Block::getParent(), mlir::CFGToSCFInterface::getUndefValue(), mlir::Region::hasOneBlock(), inserted(), mlir::detail::DominanceInfoBase< IsPostDom >::invalidate(), transformCyclesToSCFLoops(), and transformToStructuredCFBranches().

◆ translateDataLayout()

DataLayoutSpecInterface mlir::translateDataLayout ( const llvm::DataLayout & dataLayout,
MLIRContext * context )

Translate the given LLVM data layout into an MLIR equivalent using the DLTI dialect.

Definition at line 404 of file DataLayoutImporter.cpp.

References mlir::LLVM::detail::DataLayoutImporter::getDataLayoutSpec().

Referenced by prepareLLVMModule().

◆ translateLLVMIRToModule()

OwningOpRef< ModuleOp > mlir::translateLLVMIRToModule ( std::unique_ptr< llvm::Module > llvmModule,
MLIRContext * context,
bool emitExpensiveWarnings = true,
bool dropDICompositeTypeElements = false,
bool loadAllDialects = true,
bool preferUnregisteredIntrinsics = false,
bool importStructsAsLiterals = false )

Translates the LLVM module into an MLIR module living in the given context.

The translation supports operations from any dialect that has a registered implementation of the LLVMImportDialectInterface. It returns nullptr if the translation fails and reports errors using the error handler registered with the MLIR context. The emitExpensiveWarnings option controls if expensive but uncritical diagnostics should be emitted. The dropDICompositeTypeElements option controls if DICompositeTypes should be imported without elements. If set, the option avoids the recursive traversal of composite type debug information, which can be expensive for adversarial inputs. The loadAllDialects flag (default on) will load all dialects in the context. The preferUnregisteredIntrinsics flag (default off) controls whether to import all intrinsics using llvm.intrinsic_call even if a dialect registered an explicit intrinsic operation. Warning: passes that rely on matching explicit intrinsic operations may not work properly if this flag is enabled. The importStructsAsLiterals flag (default off) ensures that all structs are imported as literal structs, even when they are named in the LLVM module.

Definition at line 3360 of file ModuleImport.cpp.

References mlir::LLVM::ModuleImport::convertAliases(), mlir::LLVM::ModuleImport::convertComdats(), mlir::LLVM::ModuleImport::convertDataLayout(), mlir::LLVM::ModuleImport::convertFunctions(), mlir::LLVM::ModuleImport::convertGlobals(), mlir::LLVM::ModuleImport::convertIFuncs(), mlir::LLVM::ModuleImport::convertMetadata(), mlir::LLVM::ModuleImport::convertModuleLevelAsm(), mlir::LLVM::ModuleImport::convertTargetTriple(), mlir::FileLineColLoc::get(), mlir::OwningOpRef< OpTy >::get(), mlir::MLIRContext::getAvailableDialects(), mlir::LLVM::ModuleImport::initializeImportInterface(), and mlir::MLIRContext::loadAllAvailableDialects().

Referenced by registerFromLLVMIRTranslation().

◆ translateModuleToLLVMIR()

std::unique_ptr< llvm::Module > mlir::translateModuleToLLVMIR ( Operation * module,
llvm::LLVMContext & llvmContext,
llvm::StringRef name = "LLVMDialectModule",
bool disableVerification = false )

Translates a given LLVM dialect module into an LLVM IR module living in the given context.

Operates on any operation from dialects that provide a registered implementation of the LLVMTranslationDialectInterface. Returns nullptr when the translation fails. Verifies the produced LLVM module, except when disableVerification is set.

Referenced by mlir::ExecutionEngine::create(), mlirTranslateModuleToLLVMIR(), registerToLLVMIRTranslation(), and mlir::LLVM::ModuleToObject::translateToLLVMIR().

◆ tryToDestructureMemorySlots()

LogicalResult mlir::tryToDestructureMemorySlots ( ArrayRef< DestructurableAllocationOpInterface > allocators,
OpBuilder & builder,
const DataLayout & dataLayout,
SROAStatistics statistics = {} )

Attempts to destructure the slots of destructurable allocators.

Iteratively retries the destructuring of all slots as destructuring one slot might enable subsequent destructuring. Returns failure if no slot was destructured.

Definition at line 196 of file SROA.cpp.

References computeDestructuringInfo(), destructureSlot(), and success().

◆ tryToPromoteMemorySlots()

LogicalResult mlir::tryToPromoteMemorySlots ( ArrayRef< PromotableAllocationOpInterface > allocators,
OpBuilder & builder,
const DataLayout & dataLayout,
DominanceInfo & dominance,
Mem2RegStatistics statistics = {} )

Attempts to promote the memory slots of the provided allocators.

Iteratively retries the promotion of all slots as promoting one slot might enable subsequent promotions. Succeeds if at least one memory slot was promoted.

Definition at line 644 of file Mem2Reg.cpp.

References mlir::MemorySlot::ptr, success(), and mlir::Value::use_empty().

◆ verify()

LogicalResult mlir::verify ( Operation * op,
bool verifyRecursively = true )

Perform (potentially expensive) checks of invariants, used to detect compiler bugs, on this operation and any nested operations.

On error, this reports the error through the MLIRContext and returns failure. If verifyRecursively is false, this assumes that nested operations have already been properly verified, and does not recursively invoke the verifier on nested operations.

Definition at line 423 of file Verifier.cpp.

Referenced by applyOpPatternsGreedily(), applyPatternsGreedily(), mlir::pdll::codegenPDLLToMLIR(), mlir::Tester::isInteresting(), mlir::transform::detail::mergeSymbolsInto(), mlirOperationVerify(), mlir::transform::detail::parseTransformModuleFromFile(), registerTranslateToMLIRFunction(), mlir::query::MatchQuery::run(), ShardingPropagation::runOnOperation(), mlir::DynamicOpDefinition::setVerifyFn(), mlir::DynamicOpDefinition::setVerifyRegionFn(), mlir::MlirOptMainConfig::verifyDiagnostics(), mlir::MlirOptMainConfig::verifyOnParsing(), mlir::MlirOptMainConfig::verifyPasses(), mlir::MlirOptMainConfig::verifyRoundtrip(), and walkAndApplyPatterns().

◆ verifyCompatibleDims()

LogicalResult mlir::verifyCompatibleDims ( ArrayRef< int64_t > dims)

Dimensions are compatible if all non-dynamic dims are equal.

Definition at line 104 of file TypeUtilities.cpp.

References success().

Referenced by verifyCompatibleShapes().

◆ verifyCompatibleShape() [1/2]

LogicalResult mlir::verifyCompatibleShape ( ArrayRef< int64_t > shape1,
ArrayRef< int64_t > shape2 )

Returns success if the given two shapes are compatible.

That is, they have the same size and each pair of the elements are equal or one of them is dynamic.

Definition at line 58 of file TypeUtilities.cpp.

References success().

Referenced by errorIfTypeOrShapeMismatch(), verifyCompatibleShape(), verifyCompatibleShapes(), and mlir::OpTrait::impl::verifySameOperandsAndResultType().

◆ verifyCompatibleShape() [2/2]

LogicalResult mlir::verifyCompatibleShape ( Type type1,
Type type2 )

Returns success if the given two types have compatible shape.

That is, they are both scalars (not shaped), or they are both shaped types and at least one is unranked or they have compatible dimensions. Dimensions are compatible if at least one is dynamic or both are equal. The element type does not matter.

Definition at line 77 of file TypeUtilities.cpp.

References success(), and verifyCompatibleShape().

◆ verifyCompatibleShapes() [1/2]

LogicalResult mlir::verifyCompatibleShapes ( TypeRange types)

Returns success if all given types have compatible shapes.

That is, they are all scalars (not shaped), or they are all shaped types and any ranked shapes have compatible dimensions. The element type does not matter.

That is, they are all scalars (not shaped), or they are all shaped types and any ranked shapes have compatible dimensions. Dimensions are compatible if all non-dynamic dims are equal. The element type does not matter.

Definition at line 120 of file TypeUtilities.cpp.

References success(), and verifyCompatibleDims().

◆ verifyCompatibleShapes() [2/2]

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

Definition at line 95 of file TypeUtilities.cpp.

References success(), and verifyCompatibleShape().

Referenced by areValidCastInputsAndOutputs(), mayRequireBroadcast(), mlir::OpTrait::impl::verifyElementwise(), mlir::OpTrait::impl::verifySameOperandsAndResultShape(), and mlir::OpTrait::impl::verifySameOperandsShape().

◆ verifyInBoundsSlice() [1/2]

SliceBoundsVerificationResult mlir::verifyInBoundsSlice ( ArrayRef< int64_t > shape,
ArrayRef< int64_t > staticOffsets,
ArrayRef< int64_t > staticSizes,
ArrayRef< int64_t > staticStrides,
bool generateErrorMessage = false )

Verify that the offsets/sizes/strides-style access into the given shape is in-bounds.

Only static values are verified. If generateErrorMessage is set to "true", an error message is produced that can be printed by the op verifier.

Definition at line 37 of file ViewLikeInterface.cpp.

References result.

Referenced by mlir::OpWithOffsetSizesAndStridesConstantArgumentFolder< OpType, ResultTypeFn, CastOpFunc >::matchAndRewrite(), and verifyInBoundsSlice().

◆ verifyInBoundsSlice() [2/2]

SliceBoundsVerificationResult mlir::verifyInBoundsSlice ( ArrayRef< int64_t > shape,
ArrayRef< OpFoldResult > mixedOffsets,
ArrayRef< OpFoldResult > mixedSizes,
ArrayRef< OpFoldResult > mixedStrides,
bool generateErrorMessage = false )

Definition at line 75 of file ViewLikeInterface.cpp.

References verifyInBoundsSlice().

◆ verifyListOfOperandsOrIntegers()

LogicalResult mlir::verifyListOfOperandsOrIntegers ( Operation * op,
StringRef name,
unsigned expectedNumElements,
ArrayRef< int64_t > attr,
ValueRange values )

Verify that a the values has as many elements as the number of entries in attr for which isDynamic evaluates to true.

Include the definitions of the loop-like interfaces.

Definition at line 20 of file ViewLikeInterface.cpp.

References mlir::Operation::emitError(), and success().

Referenced by mlir::detail::verifyOffsetSizeAndStrideOp().

◆ visitUsedValuesDefinedAbove() [1/2]

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

Definition at line 64 of file RegionUtils.cpp.

References visitUsedValuesDefinedAbove().

◆ visitUsedValuesDefinedAbove() [2/2]

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

Definition at line 43 of file RegionUtils.cpp.

References mlir::Operation::getOpOperands(), mlir::Region::getParentRegion(), mlir::Region::isAncestor(), and mlir::Region::walk().

Referenced by getUsedValuesDefinedAbove(), isOpSibling(), and visitUsedValuesDefinedAbove().

◆ walkAndApplyPatterns()

void mlir::walkAndApplyPatterns ( Operation * op,
const FrozenRewritePatternSet & patterns,
RewriterBase::Listener * listener = nullptr )

A fast walk-based pattern rewrite driver.

Rewrites ops nested under the given operation by walking it and applying the highest benefit patterns. This rewriter does not wait until a fixpoint is reached and does not visit modified or newly replaced ops. Also does not perform folding or dead-code elimination.

This is intended as the simplest and most lightweight pattern rewriter in cases when a simple walk gets the job done.

The driver will skip unreachable blocks.

Note: Does not apply patterns to the given operation itself.

Definition at line 93 of file WalkPatternRewriteDriver.cpp.

References mlir::PatternApplicator::applyDefaultCostModel(), mlir::Region::begin(), mlir::Region::end(), mlir::MLIRContext::executeAction(), findReachableBlocks(), mlir::Operation::getContext(), mlir::Operation::getRegions(), mlir::PatternApplicator::matchAndRewrite(), patterns, mlir::OpBuilder::setListener(), and verify().

Referenced by mlir::amdgpu::AmdgpuFoldMemRefOpsPass::runOnOperation().

◆ walkSlice()

WalkContinuation mlir::walkSlice ( mlir::ValueRange rootValues,
WalkCallback walkCallback )

Walks the slice starting from the rootValues using a depth-first traversal.

The walk calls the provided walkCallback for each value encountered in the slice and uses the returned walk continuation to determine how to proceed.

Definition at line 6 of file SliceWalk.cpp.

References mlir::WalkContinuation::getNextValues(), mlir::WalkContinuation::skip(), mlir::WalkContinuation::wasAdvancedTo(), mlir::WalkContinuation::wasInterrupted(), and mlir::WalkContinuation::wasSkipped().

Referenced by getUnderlyingObjectSet().

◆ wouldOpBeTriviallyDead()

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

This is equivalent to checking isOpTriviallyDead if op was unused.

Note: Terminators and symbols are never considered to be trivially dead.

Definition at line 312 of file SideEffectInterfaces.cpp.

References mlir::Operation::mightHaveTrait(), and wouldOpBeTriviallyDeadImpl().

Referenced by isOpTriviallyDead(), propagateLiveness(), and rewrite().

◆ writeBytecodeToFile()

LogicalResult mlir::writeBytecodeToFile ( Operation * op,
raw_ostream & os,
const BytecodeWriterConfig & config = {} )

Write the bytecode for the given operation to the provided output stream.

For streams where it matters, the given stream should be in "binary" mode. It only ever fails if setDesiredByteCodeVersion can't be honored.

Definition at line 1353 of file BytecodeWriter.cpp.

References config.

Referenced by doVerifyRoundTrip(), mlirOperationWriteBytecode(), mlirOperationWriteBytecodeWithConfig(), and performActions().

Variable Documentation

◆ changed

◆ config

Definition at line 284 of file GreedyPatternRewriteDriver.h.

Referenced by applyConversion(), applyOpPatternsGreedily(), applyPatternsAndFoldGreedily(), applyPatternsAndFoldGreedily(), applyPatternsGreedily(), applyPatternsGreedily(), mlir::transform::TransformState::applyTransform(), mlir::PassReproducerOptions::attachResourceParser(), mlir::BytecodeReader::BytecodeReader(), mlir::BytecodeWriterConfig::BytecodeWriterConfig(), compileAndExecute(), compileAndExecuteSingleReturnFunction(), compileAndExecuteVoidFunction(), mlir::OperationConverter::convert(), createCanonicalizerPass(), doVerifyRoundTrip(), doVerifyRoundTrip(), mlir::bufferization::eliminateEmptyTensors(), mlir::PassManager::enableIRPrinting(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), hasEquivalentValueInReverseUseDefChain(), mlir::tracing::InstallDebugHandler::Impl::Impl(), mlir::tracing::InstallDebugHandler::InstallDebugHandler(), JitRunnerMain(), mlir::linalg::linalgOpAnchoredEmptyTensorEliminationStep(), mlirBytecodeWriterConfigDestroy(), mlirOperationWriteBytecodeWithConfig(), MlirOptMain(), MlirOptMain(), mlir::OperationConverter::OperationConverter(), parseAffineMapOrIntegerSet(), parseAsmSourceFile(), mlir::detail::Parser::Parser(), mlir::detail::parseSourceFile(), parseSourceFile(), parseSourceFile(), parseSourceFile(), parseSourceFile(), parseSourceFile(), parseSourceFileForTool(), parseSourceString(), parseSymbol(), performActions(), processBuffer(), processParallelLoop(), readBytecodeFile(), readBytecodeFile(), readBytecodeFileImpl(), mlir::MlirOptMainConfig::setDebugConfig(), mlir::python::PyOperationBase::writeBytecode(), and writeBytecodeToFile().

◆ has_sub_attr_or_type_v

template<typename... Ts>
bool mlir::has_sub_attr_or_type_v
inlineconstexpr
Initial value:
=
(!llvm::is_detected<detail::has_default_sub_element_handler_t, Ts>::value ||
...)

Definition at line 417 of file AttrTypeSubElements.h.

Referenced by mlir::detail::replaceImmediateSubElementsImpl(), and mlir::detail::walkImmediateSubElementsImpl().

◆ kDefaultSplitMarker

const char* const mlir::kDefaultSplitMarker = "// -----"
externinline

◆ kDeriveIndexBitwidthFromDataLayout

unsigned mlir::kDeriveIndexBitwidthFromDataLayout = 0
staticconstexpr

Value to pass as bitwidth for the index type when the converter is expected to derive the bitwidth from the LLVM data layout.

Definition at line 26 of file LoweringOptions.h.

Referenced by mlir::LowerToLLVMOptions::overrideIndexBitwidth().

◆ patterns

const FrozenRewritePatternSet& mlir::patterns

Definition at line 283 of file GreedyPatternRewriteDriver.h.

Referenced by addOpenMPOpConversions(), mlir::affine::affineForOpBodySkew(), applyConversion(), applyOpPatternsGreedily(), applyPatterns(), applyPatternsAndFoldGreedily(), applyPatternsAndFoldGreedily(), applyPatternsGreedily(), applyPatternsGreedily(), mlir::amdgpu::impl::AmdgpuMaskedloadToLoadPassBase< DerivedT >::classof(), mlir::impl::LowerSparseIterationToSCFBase< DerivedT >::classof(), mlir::impl::LowerSparseOpsToForeachBase< DerivedT >::classof(), mlir::impl::SparseAssemblerBase< DerivedT >::classof(), mlir::impl::SparseBufferRewriteBase< DerivedT >::classof(), mlir::math::impl::MathExtendToSupportedTypesBase< DerivedT >::classof(), mlir::impl::SparseBufferRewriteBase< DerivedT >::clonePass(), convertAffineLoopNestToGPULaunch(), mlir::impl::ConvertAsyncToLLVMPassBase< DerivedT >::ConvertAsyncToLLVMPassBase(), mlir::arith::createArithEmulateUnsupportedFloats(), mlir::impl::ConvertLinalgToParallelLoopsPassBase< DerivedT >::createConvertLinalgToParallelLoopsPass, mlir::memref::createExpandOpsPass(), mlir::quant::createNormalizeQuantTypes(), createSparseAssembler(), mlir::xegpu::doSCFStructuralTypeConversionWithTensorType(), findOptimal(), mlir::memref::impl::FlattenMemrefsPassBase< DerivedT >::FlattenMemrefsPassBase(), mlir::FrozenRewritePatternSet::FrozenRewritePatternSet(), mlir::FrozenRewritePatternSet::FrozenRewritePatternSet(), mlir::FrozenRewritePatternSet::FrozenRewritePatternSet(), mlir::impl::BubbleDownMemorySpaceCastsBase< DerivedT >::getArgument(), mlir::impl::ConvertArmSMEToLLVMBase< DerivedT >::getArgument(), mlir::impl::LowerSparseIterationToSCFBase< DerivedT >::getArgument(), mlir::impl::LowerSparseOpsToForeachBase< DerivedT >::getArgument(), mlir::impl::PreSparsificationRewriteBase< DerivedT >::getArgument(), mlir::impl::BubbleDownMemorySpaceCastsBase< DerivedT >::getArgumentName(), mlir::impl::ConvertAsyncToLLVMPassBase< DerivedT >::getArgumentName(), mlir::impl::LowerSparseIterationToSCFBase< DerivedT >::getArgumentName(), mlir::impl::PreSparsificationRewriteBase< DerivedT >::getArgumentName(), mlir::impl::ReductionTreePassBase< DerivedT >::getArgumentName(), mlir::memref::impl::FlattenMemrefsPassBase< DerivedT >::getArgumentName(), mlir::spirv::impl::SPIRVCompositeTypeLayoutPassBase< DerivedT >::getArgumentName(), mlir::tosa::impl::TosaConvertIntegerTypeToSignlessBase< DerivedT >::getArgumentName(), mlir::amdgpu::impl::AmdgpuMaskedloadToLoadPassBase< DerivedT >::getDependentDialects(), mlir::memref::impl::ExpandReallocPassBase< DerivedT >::getDependentDialects(), mlir::impl::ConvertArmSMEToLLVMBase< DerivedT >::getDescription(), mlir::impl::LowerSparseOpsToForeachBase< DerivedT >::getDescription(), mlir::linalg::getLinalgTilingCanonicalizationPatterns(), mlir::emitc::impl::FormExpressionsPassBase< DerivedT >::getName(), mlir::impl::BubbleDownMemorySpaceCastsBase< DerivedT >::getName(), mlir::impl::ConvertAsyncToLLVMPassBase< DerivedT >::getName(), mlir::impl::LowerForeachToSCFBase< DerivedT >::getName(), mlir::impl::LowerSparseIterationToSCFBase< DerivedT >::getName(), mlir::impl::ReductionTreePassBase< DerivedT >::getName(), mlir::impl::SparseAssemblerBase< DerivedT >::getName(), mlir::impl::SparseBufferRewriteBase< DerivedT >::getName(), mlir::emitc::impl::FormExpressionsPassBase< DerivedT >::getPassName(), mlir::impl::ConvertAsyncToLLVMPassBase< DerivedT >::getPassName(), mlirApplyPatternsAndFoldGreedily(), mlirApplyPatternsAndFoldGreedilyWithOp(), mlir::OperationConverter::OperationConverter(), mlir::emitc::impl::WrapFuncInClassPassBase< DerivedT >::operator=(), mlir::FrozenRewritePatternSet::operator=(), mlir::FrozenRewritePatternSet::operator=(), mlir::impl::ConvertAsyncToLLVMPassBase< DerivedT >::operator=(), mlir::impl::PreSparsificationRewriteBase< DerivedT >::operator=(), mlir::impl::SparseAssemblerBase< DerivedT >::operator=(), mlir::memref::impl::FlattenMemrefsPassBase< DerivedT >::operator=(), mlir::tosa::impl::TosaConvertIntegerTypeToSignlessBase< DerivedT >::operator=(), mlir::affine::populateAffineExpandIndexOpsAsAffinePatterns(), mlir::affine::populateAffineExpandIndexOpsPatterns(), populateAffineToStdConversionPatterns(), populateAffineToVectorConversionPatterns(), mlir::shard::populateAllOpLoweringPatterns(), mlir::shard::populateAllReduceEndomorphismSimplificationPatterns(), mlir::shard::populateAllSliceOpLoweringPatterns(), mlir::amdgpu::populateAmdgpuEmulateAtomicsPatterns(), mlir::amdgpu::populateAmdgpuFoldMemRefOpsPatterns(), mlir::amdgpu::populateAmdgpuResolveStridedMetadataPatterns(), populateAMDGPUToROCDLConversionPatterns(), populateAMXLegalizeForLLVMExportPatterns(), mlir::arith::populateArithExpandOpsPatterns(), mlir::arith::populateArithNarrowTypeEmulationPatterns(), mlir::arith::populateArithToAMDGPUConversionPatterns(), mlir::arith::populateArithToArmSMEConversionPatterns(), populateArithToEmitCPatterns(), mlir::arith::populateArithToLLVMConversionPatterns(), mlir::arith::populateArithToSPIRVPatterns(), mlir::arith::populateArithWideIntEmulationPatterns(), populateArmSMEToLLVMConversionPatterns(), populateArmSMEToSCFConversionPatterns(), populateArmSVELegalizeForLLVMExportPatterns(), mlir::cf::populateAssertToLLVMConversionPattern(), populateAsyncFuncToAsyncRuntimeConversionPatterns(), mlir::async::populateAsyncParallelForPatterns(), populateAsyncStructuralTypeConversionsAndLegality(), mlir::linalg::populateBlockPackMatmulPatterns(), populateBranchOpInterfaceTypeConversionPattern(), populateBubbleDownMemorySpaceCastPatterns(), mlir::tensor::populateBubbleUpExpandShapePatterns(), mlir::linalg::populateBubbleUpExtractSliceOpPatterns(), mlir::tensor::populateBubbleUpExtractSliceOpPatterns(), mlir::bufferization::populateBufferizationDeallocLoweringPattern(), populateBuiltinFuncToSPIRVPatterns(), populateCallOpTypeConversionPattern(), mlir::arith::populateCeilFloorDivExpandOpsPatterns(), mlir::cf::populateCFStructuralTypeConversions(), mlir::cf::populateCFStructuralTypeConversionsAndLegality(), mlir::linalg::populateCollapseDimensions(), populateCommutativityUtilsPatterns(), populateComplexToLibmConversionPatterns(), populateComplexToLLVMConversionPatterns(), populateComplexToROCDLLibraryCallsConversionPatterns(), populateComplexToSPIRVPatterns(), populateComplexToStandardConversionPatterns(), mlir::memref::populateComposeSubViewPatterns(), mlir::linalg::populateConstantFoldLinalgOperations(), mlir::linalg::populateContractionOpRankReducingPatterns(), mlir::cf::populateControlFlowToLLVMConversionPatterns(), mlir::cf::populateControlFlowToSPIRVPatterns(), populateConversionTargetFromOperation(), populateConversionTargetFromOperation(), populateConvertArmNeon2dToIntrPatterns(), mlir::linalg::populateConvertConv2DToImg2ColPatterns(), populateConvertMathToEmitCPatterns(), populateConvertShapeConstraintsConversionPatterns(), mlir::linalg::populateConvertToDestinationStylePatterns(), mlir::ConvertToEmitCPatternInterface::populateConvertToEmitCConversionPatterns(), mlir::ConvertToLLVMPatternInterface::populateConvertToLLVMConversionPatterns(), mlir::linalg::populateConvolutionVectorizationPatterns(), mlir::linalg::populateDataLayoutPropagationPatterns(), mlir::bufferization::populateDeallocOpCanonicalizationPatterns(), mlir::linalg::populateDecomposeConvolutionPatterns(), mlir::linalg::populateDecomposeLinalgOpsPattern(), mlir::linalg::populateDecomposePackUnpackPatterns(), mlir::linalg::populateDecomposePadPatterns(), mlir::linalg::populateDecomposeProjectedPermutationPatterns(), mlir::tensor::populateDecomposeTensorConcatPatterns(), mlir::linalg::populateDecomposeWinogradOpsPatterns(), mlir::vector::populateDropInnerMostUnitDimsXferOpPatterns(), mlir::tensor::populateDropRedundantInsertSliceRankExpansionPatterns(), mlir::linalg::populateElementwiseOpsFusionPatterns(), mlir::linalg::populateElementwiseToLinalgConversionPatterns(), mlir::vector::populateElementwiseToVectorOpsPatterns(), mlir::bufferization::populateEmptyTensorToAllocTensorPattern(), mlir::linalg::populateEraseUnnecessaryInputsPatterns(), mlir::linalg::populateEraseUnusedOperandsAndResultsPatterns(), mlir::arith::populateExpandBFloat16Patterns(), mlir::arith::populateExpandF4E2M1Patterns(), mlir::arith::populateExpandF8E8M0Patterns(), mlir::memref::populateExpandOpsPatterns(), mlir::arith::populateExpandScalingExtTruncPatterns(), mlir::memref::populateExpandStridedMetadataPatterns(), mlir::math::populateExpansionPatterns(), mlir::emitc::populateExpressionPatterns(), mlir::math::populateExtendToSupportedTypesPatterns(), mlir::memref::populateExtractAddressComputationsPatterns(), mlir::linalg::populateExtractSliceSinkingPatterns(), populateFinalizeMemRefToLLVMConversionPatterns(), mlir::memref::populateFlattenMemrefOpsPatterns(), mlir::memref::populateFlattenMemrefsPatterns(), mlir::memref::populateFlattenVectorOpsOnMemrefPatterns(), populateFloatIntOpPatterns(), mlir::linalg::populateFoldAddIntoDestPatterns(), mlir::vector::populateFoldArithExtensionPatterns(), mlir::tensor::populateFoldCollapseExtractPatterns(), mlir::tensor::populateFoldConstantExtractSlicePatterns(), mlir::shard::populateFoldingPatterns(), mlir::linalg::populateFoldIntoPackAndUnpackPatterns(), mlir::memref::populateFoldMemRefAliasOpPatterns(), mlir::linalg::populateFoldPackUnpackIntoTensorEmptyPatterns(), mlir::linalg::populateFoldReshapeOpsByCollapsingPatterns(), mlir::linalg::populateFoldReshapeOpsByExpansionPatterns(), mlir::tensor::populateFoldTensorEmptyPatterns(), mlir::tensor::populateFoldTensorSubsetIntoVectorTransferPatterns(), mlir::tensor::populateFoldTensorSubsetOpPatterns(), mlir::linalg::populateFoldUnitExtentDimsPatterns(), populateFoldUnitExtentDimsViaReshapesPatterns(), populateFoldUnitExtentDimsViaSlicesPatterns(), populateFuncOpVectorRewritePatterns(), populateFuncToEmitCPatterns(), populateFuncToLLVMConversionPatterns(), populateFuncToLLVMFuncOpConversionPattern(), populateFuncToSPIRVPatterns(), mlir::linalg::populateFuseTensorPadWithProducerLinalgOpPatterns(), populateGpuAllReducePatterns(), populateGpuBreakDownSubgroupReducePatterns(), populateGpuDecomposeMemrefsPatterns(), populateGpuEliminateBarriersPatterns(), populateGpuGlobalIdPatterns(), populateGpuLowerClusteredSubgroupReduceToDPPPatterns(), populateGpuLowerClusteredSubgroupReduceToShufflePatterns(), populateGpuLowerSubgroupReduceToDPPPatterns(), populateGpuLowerSubgroupReduceToShufflePatterns(), populateGpuPromoteShuffleToAMDGPUPatterns(), populateGpuRewritePatterns(), populateGpuShufflePatterns(), populateGpuSubgroupIdPatterns(), populateGpuSubgroupReduceOpLoweringPattern(), populateGpuToLLVMConversionPatterns(), populateGpuToLLVMSPVConversionPatterns(), populateGpuToNVVMConversionPatterns(), populateGpuToROCDLConversionPatterns(), populateGPUToSPIRVPatterns(), populateGpuWMMAToNVVMConversionPatterns(), populateGpuWMMAToSPIRVCoopMatrixKHRConversionPatterns(), mlir::index::populateIndexToLLVMConversionPatterns(), mlir::index::populateIndexToSPIRVPatterns(), mlir::linalg::populateInlineConstantOperandsPatterns(), populateIntOpPatterns(), mlir::arith::populateIntRangeNarrowingPatterns(), mlir::arith::populateIntRangeOptimizationsPatterns(), mlir::arm_sve::populateLegalizeVectorStoragePatterns(), populateLibDeviceConversionPatterns(), mlir::linalg::populateLinalgFoldIntoElementwisePatterns(), mlir::linalg::populateLinalgGenericOpsSpecializationPatterns(), mlir::linalg::populateLinalgNamedOpsGeneralizationPatterns(), mlir::linalg::populateLinalgNamedToElementwisePatterns(), mlir::linalg::populateLinalgTilingCanonicalizationPatterns(), mlir::linalg::populateLinalgToStandardConversionPatterns(), mlir::arm_neon::populateLowerContractionToNeonBFMMLAPatterns(), mlir::arm_neon::populateLowerContractionToNeonI8MMPatterns(), populateLowerContractionToSVEBFMMLAPatterns(), populateLowerContractionToSVEI8MMPatterns(), populateLowerForeachToSCFPatterns(), mlir::quant::populateLowerQuantOpsPatterns(), populateLowerSparseIterationToSCFPatterns(), populateLowerSparseOpsToForeachPatterns(), populateMathAlgebraicSimplificationPatterns(), populateMathF32ExpansionPattern(), populateMathF32ExpansionPatterns(), populateMathPolynomialApproximationPattern(), populateMathPolynomialApproximationPatterns(), populateMathPolynomialApproximationPatterns(), populateMathToLibmConversionPatterns(), populateMathToLLVMConversionPatterns(), populateMathToROCDLConversionPatterns(), populateMathToSPIRVPatterns(), populateMathToXeVMConversionPatterns(), mlir::memref::populateMemRefNarrowTypeEmulationPatterns(), populateMemRefToEmitCConversionPatterns(), populateMemRefToSPIRVPatterns(), mlir::memref::populateMemRefWideIntEmulationPatterns(), mlir::tensor::populateMergeConsecutiveInsertExtractSlicePatterns(), mlir::nvgpu::populateMmaSyncF32ToTF32Patterns(), mlir::linalg::populateMoveInitOperandsToInputPattern(), mlir::mpi::populateMPIToLLVMConversionPatterns(), populateNVGPUToNVVMConversionPatterns(), populateNVVMToLLVMConversionPatterns(), populateOpConvertToLLVMConversionPatterns(), populateOpenACCToSCFConversionPatterns(), populateOpenMPToLLVMConversionPatterns(), populateOpPatterns(), populateOpPatterns(), mlir::arm_sme::populateOuterProductFusionPatterns(), mlir::linalg::populatePadOpVectorizationPatterns(), populateParallelLoopToGPUPatterns(), populatePolynomialApproximateErfcPattern(), populatePolynomialApproximateErfPattern(), populatePolynomialApproximateTanhPattern(), populatePrepareVectorToMMAPatterns(), populatePreSparsificationRewriting(), mlir::shard::populateProcessMultiIndexOpLoweringPatterns(), mlir::ptr::populatePtrToLLVMConversionPatterns(), mlir::tensor::populateReassociativeReshapeFoldingPatterns(), mlir::DialectReductionPatternInterface::populateReductionPatterns(), mlir::DialectReductionPatternInterface::populateReductionPatternsWithTester(), populateRemoveShapeConstraintsPatterns(), mlir::memref::populateResolveExtractStridedMetadataPatterns(), mlir::memref::populateResolveRankedShapedTypeResultDimsPatterns(), mlir::memref::populateResolveShapedTypeResultDimsPatterns(), populateReturnOpTypeConversionPattern(), populateReturnOpVectorRewritePatterns(), mlir::tensor::populateRewriteAsConstantPatterns(), mlir::vector::populateScalarVectorTransferLoweringPatterns(), mlir::scf::populateSCFForLoopCanonicalizationPatterns(), mlir::scf::populateSCFLoopPipeliningPatterns(), mlir::scf::populateSCFRotateWhileLoopPatterns(), mlir::scf::populateSCFStructuralTypeConversions(), mlir::scf::populateSCFStructuralTypeConversionsAndLegality(), populateSCFToControlFlowConversionPatterns(), populateSCFToEmitCConversionPatterns(), populateSCFToSPIRVPatterns(), populateShapeRewritePatterns(), populateShapeToStandardConversionPatterns(), mlir::shard::populateSimplificationPatterns(), mlir::linalg::populateSimplifyDepthwiseConvPatterns(), mlir::linalg::populateSimplifyPackAndUnpackPatterns(), mlir::vector::populateSinkVectorOpsPatterns(), populateSparseAssembler(), populateSparseBufferRewriting(), populateSparseGPUCodegenPatterns(), populateSparseGPULibgenPatterns(), populateSparseReinterpretMap(), populateSparseTensorCodegenPatterns(), populateSparseTensorConversionPatterns(), mlir::linalg::populateSparseTensorRewriting(), populateSparseVectorizationPatterns(), populateSparsificationPatterns(), mlir::x86vector::avx2::populateSpecializedTransposeLoweringPatterns(), mlir::spirv::populateSPIRVExpandExtendedMultiplicationPatterns(), mlir::spirv::populateSPIRVExpandNonFiniteArithmeticPatterns(), populateSPIRVLayoutInfoPatterns(), populateSPIRVToLLVMConversionPatterns(), populateSPIRVToLLVMFunctionConversionPatterns(), populateSPIRVToLLVMModuleConversionPatterns(), mlir::linalg::populateSplitReductionPattern(), populateStageSparseOperationsPatterns(), populateStorageSpecifierToLLVMPatterns(), mlir::linalg::populateSwapExtractSliceWithFillPatterns(), populateTensorToLinalgPatterns(), populateTensorToSPIRVPatterns(), mlir::tosa::populateTosaConstantReduction(), mlir::tosa::populateTosaDecomposeDepthwise(), mlir::tosa::populateTosaDecomposeTransposeConv(), mlir::tosa::populateTosaFoldConstantReciprocalPatterns(), mlir::tosa::populateTosaFoldConstantTransposePatterns(), mlir::tosa::populateTosaRescaleToArithConversionPatterns(), mlir::tosa::populateTosaToArithConversionPatterns(), mlir::tosa::populateTosaToLinalgConversionPatterns(), mlir::tosa::populateTosaToLinalgNamedConversionPatterns(), mlir::tosa::populateTosaToMLProgramConversionPatterns(), mlir::tosa::populateTosaToSCFConversionPatterns(), mlir::tosa::populateTosaToTensorConversionPatterns(), mlir::linalg::populateTransposeConv2DPatterns(), mlir::linalg::populateTransposeMatmulPatterns(), mlir::ub::populateUBToLLVMConversionPatterns(), mlir::ub::populateUBToSPIRVConversionPatterns(), mlir::arith::populateUnsignedWhenEquivalentPatterns(), populateUpliftToFMAPatterns(), mlir::scf::populateUpliftWhileToForPatterns(), mlir::vector::populateVectorBitCastLoweringPatterns(), mlir::vector::populateVectorBroadcastLoweringPatterns(), mlir::vector::populateVectorContractCanonicalizeMatmulToMMT(), mlir::vector::populateVectorContractLoweringPatterns(), mlir::vector::populateVectorContractToMatrixMultiply(), mlir::vector::populateVectorGatherLoweringPatterns(), mlir::vector::populateVectorGatherToConditionalLoadPatterns(), mlir::vector::populateVectorInterleaveLoweringPatterns(), mlir::vector::populateVectorInterleaveToShufflePatterns(), mlir::vector::populateVectorMaskedLoadStoreEmulationPatterns(), mlir::vector::populateVectorMaskLoweringPatternsForSideEffectingOps(), mlir::vector::populateVectorMaskOpLoweringPatterns(), mlir::vector::populateVectorMultiReductionLoweringPatterns(), mlir::vector::populateVectorOuterProductLoweringPatterns(), mlir::vector::populateVectorRankReducingFMAPattern(), mlir::vector::populateVectorReductionToContractPatterns(), populateVectorReductionToSPIRVDotProductPatterns(), mlir::vector::populateVectorScanLoweringPatterns(), mlir::vector::populateVectorShapeCastLoweringPatterns(), mlir::vector::populateVectorShuffleLoweringPatterns(), mlir::vector::populateVectorStepLoweringPatterns(), populateVectorToAMXConversionPatterns(), populateVectorToArmSMEPatterns(), mlir::vector::populateVectorToFromElementsToShuffleTreePatterns(), populateVectorToLLVMConversionPatterns(), populateVectorToSCFConversionPatterns(), populateVectorToSPIRVPatterns(), mlir::vector::populateVectorToVectorCanonicalizationPatterns(), populateVectorToXeGPUConversionPatterns(), mlir::vector::populateVectorTransferFullPartialPatterns(), mlir::vector::populateVectorTransferLoweringPatterns(), mlir::vector::populateVectorTransferPermutationMapLoweringPatterns(), mlir::vector::populateVectorTransposeLoweringPatterns(), mlir::vector::populateVectorTransposeToFlatTranspose(), mlir::vector::populateWarpExecuteOnLane0OpToScfForPattern(), mlir::linalg::populateWinogradConv2DPatterns(), populateX86VectorLegalizeForLLVMExportPatterns(), mlir::xegpu::populateXeGPUFoldAliasOpsPatterns(), mlir::xegpu::populateXeGPUMoveFuncBodyToWarpOpPatterns(), mlir::xegpu::populateXeGPUOptimizeBlockLoadsPatterns(), mlir::xegpu::populateXeGPUSubgroupDistributePatterns(), populateXeGPUToXeVMConversionPatterns(), mlir::xegpu::populateXeGPUUnrollPatterns(), mlir::xegpu::populateXeGPUWgToSgDistributePatterns(), populateXeVMToLLVMConversionPatterns(), ConvertMathToROCDLPass::runOnOperation(), mlir::amdgpu::AmdgpuFoldMemRefOpsPass::runOnOperation(), SimplifyAffineMinMaxPass::runOnOperation(), mlir::affine::simplifyAffineMinMaxOps(), mlir::impl::SparseAssemblerBase< DerivedT >::SparseAssemblerBase(), mlir::impl::SparseAssemblerBase< DerivedT >::SparseAssemblerBase(), mlir::spirv::unrollVectorsInFuncBodies(), mlir::spirv::unrollVectorsInSignatures(), walkAndApplyPatterns(), mlir::emitc::impl::WrapFuncInClassPassBase< DerivedT >::WrapFuncInClassPassBase(), mlir::impl::ConvertAsyncToLLVMPassBase< DerivedT >::~ConvertAsyncToLLVMPassBase(), mlir::FrozenRewritePatternSet::~FrozenRewritePatternSet(), mlir::impl::PreSparsificationRewriteBase< DerivedT >::~PreSparsificationRewriteBase(), mlir::impl::SparseAssemblerBase< DerivedT >::~SparseAssemblerBase(), and mlir::tosa::impl::TosaConvertIntegerTypeToSignlessBase< DerivedT >::~TosaConvertIntegerTypeToSignlessBase().