MLIR  15.0.0git
Namespaces | Classes | Typedefs | Functions
mlir::OpTrait Namespace Reference

Namespaces

 detail
 
 impl
 
 spirv
 
 util
 

Classes

class  AffineScope
 A trait of region holding operations that defines a new scope for polyhedral optimization purposes. More...
 
class  AtLeastNOperands
 This class provides the API for ops that are known to have a at least a specified number of operands. More...
 
class  AtLeastNRegions
 This class provides APIs for ops that are known to have at least a specified number of regions. More...
 
class  AtLeastNResults
 This class provides the API for ops that are known to have at least a specified number of results. More...
 
class  AtLeastNSuccessors
 This class provides APIs for ops that are known to have at least a specified number of successors. More...
 
class  AttrSizedOperandSegments
 A trait for operations that have an attribute specifying operand segments. More...
 
class  AttrSizedResultSegments
 Similar to AttrSizedOperandSegments but used for results. More...
 
class  AutomaticAllocationScope
 A trait of region holding operations that define a new scope for automatic allocations, i.e., allocations that are freed when control is transferred back from the operation's region. More...
 
class  ConstantLike
 This class provides the API for a sub-set of ops that are known to be constant-like. More...
 
struct  Elementwise
 This trait tags element-wise ops on vectors or tensors. More...
 
class  HasOnlyGraphRegion
 A trait that specifies that an operation only defines graph regions. More...
 
struct  HasParent
 This class provides a verifier for ops that are expecting their parent to be one of the given parent ops. More...
 
class  HasRecursiveSideEffects
 This trait indicates that the side effects of an operation includes the effects of operations nested within its regions. More...
 
struct  hasSingleBlockImplicitTerminator
 Support to check if an operation has the SingleBlockImplicitTerminator trait. More...
 
struct  hasSingleBlockImplicitTerminator< Op, false >
 
class  InferTensorType
 Tensor type inference trait that constructs a tensor from the inferred shape and elemental types. More...
 
class  IsCommutative
 This class adds property that the operation is commutative. More...
 
class  IsIdempotent
 This class adds property that the operation is idempotent. More...
 
class  IsInvolution
 This class adds property that the operation is an involution. More...
 
class  IsIsolatedFromAbove
 This class provides the API for ops that are known to be isolated from above. More...
 
class  IsTerminator
 This class provides the API for ops that are known to be terminators. More...
 
struct  MemRefsNormalizable
 
class  NOperands
 This class provides the API for ops that are known to have a specified number of operands. More...
 
struct  NoRegionArguments
 This trait provides a verifier for ops that are expecting their regions to not have any arguments. More...
 
class  NoTerminator
 This class indicates that the regions associated with this op don't have terminators. More...
 
class  NRegions
 This class provides the API for ops that are known to have a specified number of regions. More...
 
class  NResults
 This class provides the API for ops that are known to have a specified number of results. More...
 
class  NSuccessors
 This class provides the API for ops that are known to have a specified number of successors. More...
 
class  OneOperand
 This class provides the API for ops that are known to have exactly one SSA operand. More...
 
class  OneRegion
 This class provides APIs for ops that are known to have a single region. More...
 
class  OneResult
 This class provides return value APIs for ops that are known to have a single result. More...
 
class  OneSuccessor
 This class provides APIs for ops that are known to have a single successor. More...
 
class  OneTypedResult
 This trait is used for return value APIs for ops that are known to have a specific type other than Type. More...
 
class  OperandsAreFloatLike
 This class verifies that all operands of the specified op have a float type, a vector thereof, or a tensor thereof. More...
 
class  OperandsAreSignlessIntegerLike
 This class verifies that all operands of the specified op have a signless integer or index type, a vector thereof, or a tensor thereof. More...
 
class  OpInvariants
 verifyInvariantsImpl verifies the invariants like the types, attrs, .etc. More...
 
class  ResultsAreBoolLike
 This class verifies that any results of the specified op have a boolean type, a vector thereof, or a tensor thereof. More...
 
class  ResultsAreFloatLike
 This class verifies that any results of the specified op have a floating point type, a vector thereof, or a tensor thereof. More...
 
class  ResultsAreSignlessIntegerLike
 This class verifies that any results of the specified op have a signless integer or index type, a vector thereof, or a tensor thereof. More...
 
class  ResultsBroadcastableShape
 Trait for ops that are known to have broadcast compatible operands and result types. More...
 
struct  ReturnLike
 This trait indicates that a terminator operation is "return-like". More...
 
class  SameOperandsAndResultElementType
 This class provides verification for ops that are known to have the same operand and result element type (or the type itself if it is scalar). More...
 
class  SameOperandsAndResultShape
 This class provides verification for ops that are known to have the same operand and result shape: both are scalars, vectors/tensors of the same shape. More...
 
class  SameOperandsAndResultType
 This class provides verification for ops that are known to have the same operand and result type. More...
 
class  SameOperandsElementType
 This class provides verification for ops that are known to have the same operand element type (or the type itself if it is scalar). More...
 
class  SameOperandsShape
 This class provides verification for ops that are known to have the same operand shape: all operands are scalars, vectors/tensors of the same shape. More...
 
class  SameTypeOperands
 This class verifies that all operands of the specified op have the same type. More...
 
struct  Scalarizable
 This trait tags Elementwise operatons that can be systematically scalarized. More...
 
struct  SingleBlock
 This class provides APIs and verifiers for ops with regions having a single block. More...
 
struct  SingleBlockImplicitTerminator
 This class provides APIs and verifiers for ops with regions having a single block that must terminate with TerminatorOpType. More...
 
class  SymbolTable
 A trait used to provide symbol table functionalities to a region operation. More...
 
struct  Tensorizable
 This trait tags Elementwise operatons that can be systematically tensorized. More...
 
class  TraitBase
 Helper class for implementing traits. More...
 
class  VariadicOperands
 This class provides the API for ops which have an unknown number of SSA operands. More...
 
class  VariadicRegions
 This class provides the API for ops which have an unknown number of regions. More...
 
class  VariadicResults
 This class provides the API for ops which have an unknown number of results. More...
 
class  VariadicSuccessors
 This class provides the API for ops which have an unknown number of successors. More...
 
struct  Vectorizable
 This trait tags Elementwise operatons that can be systematically vectorized. More...
 
class  ZeroOperands
 This class provides the API for ops that are known to have no SSA operand. More...
 
class  ZeroRegions
 This class provides verification for ops that are known to have zero regions. More...
 
class  ZeroResults
 This class provides return value APIs for ops that are known to have zero results. More...
 
class  ZeroSuccessors
 This class provides verification for ops that are known to have zero successors. More...
 

Typedefs

template<class T >
using has_implicit_terminator_t = typename T::ImplicitTerminatorOpT
 Check is an op defines the ImplicitTerminatorOpT member. More...
 

Functions

bool hasElementwiseMappableTraits (Operation *op)
 Together, Elementwise, Scalarizable, Vectorizable, and Tensorizable provide an easy way for scalar operations to conveniently generalize their behavior to vectors/tensors, and systematize conversion between these forms. More...
 

Typedef Documentation

◆ has_implicit_terminator_t

template<class T >
using mlir::OpTrait::has_implicit_terminator_t = typedef typename T::ImplicitTerminatorOpT

Check is an op defines the ImplicitTerminatorOpT member.

This is intended to be used with llvm::is_detected.

Definition at line 979 of file OpDefinition.h.

Function Documentation

◆ hasElementwiseMappableTraits()

bool mlir::OpTrait::hasElementwiseMappableTraits ( Operation op)

Together, Elementwise, Scalarizable, Vectorizable, and Tensorizable provide an easy way for scalar operations to conveniently generalize their behavior to vectors/tensors, and systematize conversion between these forms.

Definition at line 1139 of file Operation.cpp.

References mlir::Operation::hasTrait().

Referenced by calculateImplicitMap(), mlir::linalg::hasOnlyScalarElementwiseOp(), isElementwiseMappableOpOnRankedTensors(), splatZero(), vectorizeOneOp(), and mlir::OpTrait::Tensorizable< ConcreteType >::verifyTrait().