|
MLIR 23.0.0git
|
#include "mlir/Dialect/Affine/Transforms/Passes.h"#include "mlir/Dialect/Affine/IR/AffineOps.h"#include "mlir/Dialect/Affine/Transforms/Transforms.h"#include "mlir/Dialect/Arith/IR/Arith.h"#include "mlir/Dialect/Utils/StaticValueUtils.h"#include "mlir/IR/PatternMatch.h"#include "mlir/Interfaces/ValueBoundsOpInterface.h"#include "mlir/Transforms/GreedyPatternRewriteDriver.h"#include "mlir/Dialect/Affine/Transforms/Passes.h.inc"Go to the source code of this file.
Classes | |
| class | mlir::affine::impl::SimplifyAffineWithBoundsBase< DerivedT > |
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
| namespace | mlir::affine |
| namespace | mlir::affine::impl |
Macros | |
| #define | DEBUG_TYPE "affine-simplify-with-bounds" |
| #define | GEN_PASS_DEF_SIMPLIFYAFFINEWITHBOUNDS |
Functions | |
| static void | buildProductExpr (OpFoldResult basis, AffineExpr &productExpr, SmallVectorImpl< Value > &operands, MLIRContext *ctx) |
| Accumulate a single basis element into the running product expression. | |
| static std::optional< size_t > | tryMatchProduct (ArrayRef< OpFoldResult > lhs, size_t lhsTailConsumed, ArrayRef< OpFoldResult > rhs, size_t rhsTailConsumed, MLIRContext *ctx) |
| Try to find k consecutive elements from lhs (starting from tail offset) whose product equals the single next element from rhs. | |
| std::unique_ptr<::mlir::Pass > | mlir::affine::impl::createSimplifyAffineWithBounds () |
| std::unique_ptr<::mlir::Pass > | mlir::affine::createSimplifyAffineWithBounds () |
| #define DEBUG_TYPE "affine-simplify-with-bounds" |
Definition at line 24 of file SimplifyAffineWithBounds.cpp.
| #define GEN_PASS_DEF_SIMPLIFYAFFINEWITHBOUNDS |
Definition at line 234 of file SimplifyAffineWithBounds.cpp.
|
static |
Accumulate a single basis element into the running product expression.
Static values become affine constants, and dynamic values become symbols.
Definition at line 31 of file SimplifyAffineWithBounds.cpp.
References mlir::getAffineConstantExpr(), mlir::getAffineSymbolExpr(), and mlir::getConstantIntValue().
Referenced by tryMatchProduct().
|
static |
Try to find k consecutive elements from lhs (starting from tail offset) whose product equals the single next element from rhs.
The product is accumulated incrementally to avoid redundant computation. Returns the number of matched elements k, or std::nullopt if no match.
Definition at line 46 of file SimplifyAffineWithBounds.cpp.
References mlir::ValueBoundsConstraintSet::areEqual(), buildProductExpr(), mlir::AffineMap::get(), mlir::getAffineConstantExpr(), lhs, result, and rhs.