MLIR  19.0.0git
Classes | Namespaces | Typedefs | Functions
TransformInterfaces.h File Reference
#include "mlir/Dialect/Transform/Utils/DiagnosedSilenceableFailure.h"
#include "mlir/Dialect/Transform/Utils/RaggedArray.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Dialect/Transform/Interfaces/TransformTypeInterfaces.h.inc"
#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h.inc"

Go to the source code of this file.

Classes

class  mlir::transform::TransformOptions
 Options controlling the application of transform operations by the TransformState. More...
 
class  mlir::transform::TransformState
 The state maintained across applications of various ops implementing the TransformOpInterface. More...
 
class  mlir::transform::TransformState::RegionScope
 A RAII object maintaining a "stack frame" for a transform IR region. More...
 
class  mlir::transform::TransformState::Extension
 Base class for TransformState extensions that allow TransformState to contain user-specified information in the state object. More...
 
class  mlir::transform::TransformResults
 Local mapping between values defined by a specific op implementing the TransformOpInterface and the payload IR ops they correspond to. More...
 
struct  mlir::transform::TrackingListenerConfig
 A configuration object for customizing a TrackingListener. More...
 
class  mlir::transform::TrackingListener
 A listener that updates a TransformState based on IR modifications. More...
 
class  mlir::transform::ErrorCheckingTrackingListener
 A specialized listener that keeps track of cases in which no replacement payload could be found. More...
 
class  mlir::transform::TransformRewriter
 This is a special rewriter to be used in transform op implementations, providing additional helper functions to update the transform state, etc. More...
 
class  mlir::transform::PossibleTopLevelTransformOpTrait< OpTy >
 This trait is supposed to be attached to Transform dialect operations that can be standalone top-level transforms. More...
 
class  mlir::transform::TransformEachOpTrait< OpTy >
 Trait implementing the TransformOpInterface for operations applying a transformation to a single operation handle and producing an arbitrary number of handles and parameter values. More...
 
struct  mlir::transform::TransformMappingResource
 Side effect resource corresponding to the mapping between Transform IR values and Payload IR operations. More...
 
struct  mlir::transform::PayloadIRResource
 Side effect resource corresponding to the Payload IR itself. More...
 
class  mlir::transform::FunctionalStyleTransformOpTrait< OpTy >
 Trait implementing the MemoryEffectOpInterface for operations that "consume" their operands and produce new results. More...
 
class  mlir::transform::NavigationTransformOpTrait< OpTy >
 Trait implementing the MemoryEffectOpInterface for operations that use their operands without consuming and without modifying the Payload IR to potentially produce new handles. More...
 
class  mlir::transform::ParamProducerTransformOpTrait< OpTy >
 Trait implementing the MemoryEffectsOpInterface for operations that produce transform dialect parameters. More...
 
class  mlir::transform::ReportTrackingListenerFailuresOpTrait< OpTy >
 TrackingListener failures are reported only for ops that have this trait. More...
 
class  mlir::transform::ApplyToEachResultList
 A list of results of applying a transform op with ApplyEachOpTrait to a single payload operation, co-indexed with the results of the transform op. More...
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::transform
 
 mlir::transform::detail
 

Typedefs

using mlir::transform::Param = Attribute
 
using mlir::transform::MappedValue = llvm::PointerUnion< Operation *, Param, Value >
 
using mlir::transform::ApplyToEachResult = MappedValue
 A single result of applying a transform op with ApplyEachOpTrait to a single payload operation. More...
 

Functions

LogicalResult mlir::transform::detail::mapPossibleTopLevelTransformOpBlockArguments (TransformState &state, Operation *op, Region &region)
 Maps the only block argument of the op with PossibleTopLevelTransformOpTrait to either the list of operations associated with its operand or the root of the payload IR, depending on what is available in the context. More...
 
LogicalResult mlir::transform::detail::verifyPossibleTopLevelTransformOpTrait (Operation *op)
 Verification hook for PossibleTopLevelTransformOpTrait. More...
 
void mlir::transform::detail::getPotentialTopLevelEffects (Operation *operation, Value root, Block &body, SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
 Populates effects with side effects implied by PossibleTopLevelTransformOpTrait for the given operation. More...
 
LogicalResult mlir::transform::detail::verifyTransformOpInterface (Operation *op)
 Verification hook for TransformOpInterface. More...
 
void mlir::transform::detail::prepareValueMappings (SmallVectorImpl< SmallVector< transform::MappedValue >> &mappings, ValueRange values, const transform::TransformState &state)
 Populates mappings with mapped values associated with the given transform IR values in the given state. More...
 
void mlir::transform::detail::forwardTerminatorOperands (Block *block, transform::TransformState &state, transform::TransformResults &results)
 Populates results with payload associations that match exactly those of the operands to block's terminator. More...
 
TransformState mlir::transform::detail::makeTransformStateForTesting (Region *region, Operation *payloadRoot)
 Make a dummy transform state for testing purposes. More...
 
SmallVector< OpOperand * > mlir::transform::detail::getConsumedHandleOpOperands (transform::TransformOpInterface transformOp)
 Returns all operands that are handles and being consumed by the given op. More...
 
LogicalResult mlir::transform::applyTransforms (Operation *payloadRoot, TransformOpInterface transform, const RaggedArray< MappedValue > &extraMapping={}, const TransformOptions &options=TransformOptions(), bool enforceToplevelTransformOp=true)
 Entry point to the Transform dialect infrastructure. More...
 
void mlir::transform::consumesHandle (ValueRange handles, SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
 Populates effects with the memory effects indicating the operation on the given handle value: More...
 
void mlir::transform::producesHandle (ValueRange handles, SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
 
void mlir::transform::onlyReadsHandle (ValueRange handles, SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
 
bool mlir::transform::isHandleConsumed (Value handle, transform::TransformOpInterface transform)
 Checks whether the transform op consumes the given handle. More...
 
void mlir::transform::modifiesPayload (SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
 Populates effects with the memory effects indicating the access to payload IR resource. More...
 
void mlir::transform::onlyReadsPayload (SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
 
bool mlir::transform::doesModifyPayload (transform::TransformOpInterface transform)
 Checks whether the transform op modifies the payload. More...
 
bool mlir::transform::doesReadPayload (transform::TransformOpInterface transform)
 Checks whether the transform op reads the payload. More...
 
void mlir::transform::getConsumedBlockArguments (Block &block, llvm::SmallDenseSet< unsigned > &consumedArguments)
 Populates consumedArguments with positions of block arguments that are consumed by the operations in the block. More...
 
void mlir::transform::detail::getParamProducerTransformOpTraitEffects (Operation *op, SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
 Non-template implementation of ParamProducerTransformOpTrait::getEffects(). More...
 
LogicalResult mlir::transform::detail::verifyParamProducerTransformOpTrait (Operation *op)
 Non-template implementation of ParamProducerTransformOpTrait::verify(). More...
 
LogicalResult mlir::transform::detail::checkApplyToOne (Operation *transformOp, Location payloadOpLoc, const ApplyToEachResultList &partialResult)
 Check that the contents of partialResult matches the number, kind (payload op or parameter) and nullity (either all or none) requirements of transformOp. More...
 
void mlir::transform::detail::setApplyToOneResults (Operation *transformOp, TransformResults &transformResults, ArrayRef< ApplyToEachResultList > results)
 "Transpose" the results produced by individual applications, arranging them per result value of the transform op, and populate transformResults with that. More...
 
template<typename TransformOpTy , typename Range >
DiagnosedSilenceableFailure mlir::transform::detail::applyTransformToEach (TransformOpTy transformOp, TransformRewriter &rewriter, Range &&targets, SmallVectorImpl< ApplyToEachResultList > &results, TransformState &state)
 Applies a one-to-one or a one-to-many transform to each of the given targets. More...
 
LogicalResult mlir::transform::detail::checkNestedConsumption (Location loc, ArrayRef< Operation * > targets)
 Reports an error and returns failure if targets contains an ancestor operation before its descendant (or a copy of itself). More...