#include "mlir/IR/PatternMatch.h"
#include "mlir/Config/mlir-config.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/IR/Iterators.h"
#include "mlir/IR/RegionKindInterface.h"
#include "llvm/ADT/SmallPtrSet.h"
usingnamespacemlir;
PatternBenefit::PatternBenefit(unsigned benefit) : … { … }
unsigned short PatternBenefit::getBenefit() const { … }
Pattern::Pattern(StringRef rootName, PatternBenefit benefit,
MLIRContext *context, ArrayRef<StringRef> generatedNames)
: … { … }
Pattern::Pattern(MatchAnyOpTypeTag tag, PatternBenefit benefit,
MLIRContext *context, ArrayRef<StringRef> generatedNames)
: … { … }
Pattern::Pattern(MatchInterfaceOpTypeTag tag, TypeID interfaceID,
PatternBenefit benefit, MLIRContext *context,
ArrayRef<StringRef> generatedNames)
: … { … }
Pattern::Pattern(MatchTraitOpTypeTag tag, TypeID traitID,
PatternBenefit benefit, MLIRContext *context,
ArrayRef<StringRef> generatedNames)
: … { … }
Pattern::Pattern(const void *rootValue, RootKind rootKind,
ArrayRef<StringRef> generatedNames, PatternBenefit benefit,
MLIRContext *context)
: … { … }
void RewritePattern::rewrite(Operation *op, PatternRewriter &rewriter) const { … }
LogicalResult RewritePattern::match(Operation *op) const { … }
void RewritePattern::anchor() { … }
bool RewriterBase::Listener::classof(const OpBuilder::Listener *base) { … }
RewriterBase::~RewriterBase() { … }
void RewriterBase::replaceAllOpUsesWith(Operation *from, ValueRange to) { … }
void RewriterBase::replaceAllOpUsesWith(Operation *from, Operation *to) { … }
void RewriterBase::replaceOp(Operation *op, ValueRange newValues) { … }
void RewriterBase::replaceOp(Operation *op, Operation *newOp) { … }
void RewriterBase::eraseOp(Operation *op) { … }
void RewriterBase::eraseBlock(Block *block) { … }
void RewriterBase::finalizeOpModification(Operation *op) { … }
void RewriterBase::replaceAllUsesExcept(
Value from, Value to, const SmallPtrSetImpl<Operation *> &preservedUsers) { … }
void RewriterBase::replaceUsesWithIf(Value from, Value to,
function_ref<bool(OpOperand &)> functor,
bool *allUsesReplaced) { … }
void RewriterBase::replaceUsesWithIf(ValueRange from, ValueRange to,
function_ref<bool(OpOperand &)> functor,
bool *allUsesReplaced) { … }
void RewriterBase::inlineBlockBefore(Block *source, Block *dest,
Block::iterator before,
ValueRange argValues) { … }
void RewriterBase::inlineBlockBefore(Block *source, Operation *op,
ValueRange argValues) { … }
void RewriterBase::mergeBlocks(Block *source, Block *dest,
ValueRange argValues) { … }
Block *RewriterBase::splitBlock(Block *block, Block::iterator before) { … }
void RewriterBase::inlineRegionBefore(Region ®ion, Region &parent,
Region::iterator before) { … }
void RewriterBase::inlineRegionBefore(Region ®ion, Block *before) { … }
void RewriterBase::moveBlockBefore(Block *block, Block *anotherBlock) { … }
void RewriterBase::moveBlockBefore(Block *block, Region *region,
Region::iterator iterator) { … }
void RewriterBase::moveOpBefore(Operation *op, Operation *existingOp) { … }
void RewriterBase::moveOpBefore(Operation *op, Block *block,
Block::iterator iterator) { … }
void RewriterBase::moveOpAfter(Operation *op, Operation *existingOp) { … }
void RewriterBase::moveOpAfter(Operation *op, Block *block,
Block::iterator iterator) { … }