|
MLIR 24.0.0git
|
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"#include "mlir/Config/mlir-config.h"#include "mlir/IR/Action.h"#include "mlir/IR/Dominance.h"#include "mlir/IR/Matchers.h"#include "mlir/IR/Operation.h"#include "mlir/IR/OperationSupport.h"#include "mlir/IR/Verifier.h"#include "mlir/Interfaces/SideEffectInterfaces.h"#include "mlir/Rewrite/PatternApplicator.h"#include "mlir/Transforms/CSE.h"#include "mlir/Transforms/FoldUtils.h"#include "mlir/Transforms/RegionUtils.h"#include "llvm/ADT/BitVector.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/ScopeExit.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/Support/DebugLog.h"#include "llvm/Support/ScopedPrinter.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "greedy-rewriter" |
Functions | |
| static bool | mayDefineSuccessors (Operation *op) |
| Return whether op may define successors of its block. | |
| static SmallPtrSet< Block *, 2 > | getRegionSuccessors (Block *block) |
| Collect the distinct successors of block that are in the same region. | |
| static Region * | findCommonAncestor (ArrayRef< Operation * > ops) |
| Find the region that is the closest common ancestor of all given ops. | |
| #define DEBUG_TYPE "greedy-rewriter" |
Definition at line 42 of file GreedyPatternRewriteDriver.cpp.
Find the region that is the closest common ancestor of all given ops.
Note: This function returns nullptr if there is a top-level op among the given list of ops.
Definition at line 1376 of file GreedyPatternRewriteDriver.cpp.
References mlir::Region::findAncestorOpInRegion(), and mlir::Region::getParentRegion().
Referenced by mlir::applyOpPatternsGreedily().
|
static |
Collect the distinct successors of block that are in the same region.
A successor in another region is invalid IR that cannot make a block of this region reachable.
Definition at line 534 of file GreedyPatternRewriteDriver.cpp.
References mlir::Block::getParent(), and mlir::Block::getSuccessors().
Return whether op may define successors of its block.
Definition at line 526 of file GreedyPatternRewriteDriver.cpp.
References mlir::Operation::getNumSuccessors(), and mlir::Operation::mightHaveTrait().