MLIR
20.0.0git
|
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/Transforms/Transforms.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "decompose-affine-ops" |
#define | DBGS() (llvm::dbgs() << "[" DEBUG_TYPE "]: ") |
#define | DBGSNL() (llvm::dbgs() << "\n") |
Functions | |
static int64_t | numEnclosingInvariantLoops (OpOperand &operand) |
Count the number of loops surrounding operand such that operand could be hoisted above. More... | |
static AffineApplyOp | createSubApply (RewriterBase &rewriter, AffineApplyOp originalOp, AffineExpr expr) |
Build an affine.apply that is a subexpression expr of originalOp s affine map and with the same operands. More... | |
#define DBGS | ( | ) | (llvm::dbgs() << "[" DEBUG_TYPE "]: ") |
Definition at line 24 of file DecomposeAffineOps.cpp.
#define DBGSNL | ( | ) | (llvm::dbgs() << "\n") |
Definition at line 25 of file DecomposeAffineOps.cpp.
#define DEBUG_TYPE "decompose-affine-ops" |
Definition at line 23 of file DecomposeAffineOps.cpp.
|
static |
Build an affine.apply that is a subexpression expr
of originalOp
s affine map and with the same operands.
Canonicalize the map and operands to deduplicate and drop dead operands before returning but do not perform maximal composition of AffineApplyOp which would defeat the purpose.
Definition at line 85 of file DecomposeAffineOps.cpp.
|
static |
Count the number of loops surrounding operand
such that operand could be hoisted above.
Stop counting at the first loop over which the operand cannot be hoisted.
Definition at line 30 of file DecomposeAffineOps.cpp.
References mlir::IROperand< DerivedT, IRValueT >::get(), mlir::detail::IROperandBase::getOwner(), and mlir::Operation::getParentOfType().