MLIR
22.0.0git
|
#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/CastInterfaces.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/iterator.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/DebugLog.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/InterleavedRange.h"
#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.cpp.inc"
#include "mlir/Dialect/Transform/Interfaces/TransformTypeInterfaces.cpp.inc"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "transform-dialect" |
#define | DEBUG_PRINT_AFTER_ALL "transform-dialect-print-top-level-after-all" |
#define | FULL_LDBG() LDBG(4) |
Functions | |
static bool | happensBefore (Operation *a, Operation *b) |
Return true if a happens before b , i.e., a or one of its ancestors properly dominates b and b is not inside a . More... | |
static DiagnosedSilenceableFailure | dispatchMappedValues (Value handle, ArrayRef< transform::MappedValue > values, function_ref< LogicalResult(ArrayRef< Operation * >)> operationsFn, function_ref< LogicalResult(ArrayRef< transform::Param >)> paramsFn, function_ref< LogicalResult(ValueRange)> valuesFn) |
Given a list of MappedValues, cast them to the value kind implied by the interface of the handle type, and dispatch to one of the callbacks. More... | |
template<typename Mapping , typename Key , typename Mapped > | |
static void | dropMappingEntry (Mapping &mapping, Key key, Mapped mapped) |
template<typename T > | |
static DiagnosedSilenceableFailure | checkRepeatedConsumptionInOperand (ArrayRef< T > payload, transform::TransformOpInterface transform, unsigned operandNumber) |
template<typename T > | |
static SmallVector< T > | castVector (ArrayRef< transform::MappedValue > range) |
static void | remapEffects (MemoryEffectOpInterface iface, BlockArgument source, OpOperand *target, SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
Appends to effects the memory effect instances on target with the same resource and effect as the ones the operation iface having on source . More... | |
static void | remapArgumentEffects (Block &block, MutableArrayRef< OpOperand > operands, SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
Appends to effects the same effects as the operations of block have on block arguments but associated with operands. More... | |
template<typename EffectTy , typename ResourceTy , typename Range > | |
static bool | hasEffect (Range &&effects) |
Returns true if the given list of effects instances contains an instance with the effect type specified as template parameter. More... | |
#define DEBUG_PRINT_AFTER_ALL "transform-dialect-print-top-level-after-all" |
Definition at line 24 of file TransformInterfaces.cpp.
#define DEBUG_TYPE "transform-dialect" |
Definition at line 23 of file TransformInterfaces.cpp.
#define FULL_LDBG | ( | ) | LDBG(4) |
Definition at line 25 of file TransformInterfaces.cpp.
|
static |
Definition at line 1499 of file TransformInterfaces.cpp.
|
static |
Definition at line 775 of file TransformInterfaces.cpp.
References diag(), and mlir::DiagnosedSilenceableFailure::success().
|
static |
Given a list of MappedValues, cast them to the value kind implied by the interface of the handle type, and dispatch to one of the callbacks.
Definition at line 135 of file TransformInterfaces.cpp.
References mlir::DiagnosedSilenceableFailure::definiteFailure(), mlir::emitSilenceableFailure(), mlir::remark::failed(), mlir::Value::getLoc(), mlir::Value::getType(), and mlir::DiagnosedSilenceableFailure::success().
Referenced by mlir::transform::TransformState::mapBlockArgument(), and mlir::transform::TransformResults::setMappedValues().
|
static |
Definition at line 315 of file TransformInterfaces.cpp.
Return true if a
happens before b
, i.e., a
or one of its ancestors properly dominates b
and b
is not inside a
.
Definition at line 35 of file TransformInterfaces.cpp.
References mlir::Block::findAncestorOpInBlock(), mlir::Operation::getBlock(), mlir::Operation::getParentOp(), mlir::Operation::isBeforeInBlock(), and mlir::Operation::isProperAncestor().
|
static |
Returns true
if the given list of effects instances contains an instance with the effect type specified as template parameter.
Definition at line 1808 of file TransformInterfaces.cpp.
References mlir::SideEffects::EffectInstance< EffectT >::getEffect(), and mlir::SideEffects::EffectInstance< EffectT >::getResource().
|
static |
Appends to effects
the same effects as the operations of block
have on block arguments but associated with operands.
Definition at line 1614 of file TransformInterfaces.cpp.
References mlir::SideEffects::Resource::Base< PayloadIRResource >::get(), mlir::Block::getArguments(), and remapEffects().
Referenced by mlir::transform::detail::getPotentialTopLevelEffects().
|
static |
Appends to effects
the memory effect instances on target
with the same resource and effect as the ones the operation iface
having on source
.
Definition at line 1602 of file TransformInterfaces.cpp.
Referenced by remapArgumentEffects().