MLIR 22.0.0git
AffineToStandard.h
Go to the documentation of this file.
1//===- AffineToStandard.h - Convert Affine to Standard dialect --*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef MLIR_CONVERSION_AFFINETOSTANDARD_AFFINETOSTANDARD_H
10#define MLIR_CONVERSION_AFFINETOSTANDARD_AFFINETOSTANDARD_H
11
12#include "mlir/Support/LLVM.h"
13
14namespace mlir {
15class Location;
16class OpBuilder;
17class Pass;
18class RewritePattern;
20class Value;
21class ValueRange;
22
23namespace affine {
24class AffineForOp;
25} // namespace affine
26
27#define GEN_PASS_DECL_LOWERAFFINEPASS
28#include "mlir/Conversion/Passes.h.inc"
29
30/// Collect a set of patterns to convert from the Affine dialect to the Standard
31/// dialect, in particular convert structured affine control flow into CFG
32/// branch-based control flow.
33void populateAffineToStdConversionPatterns(RewritePatternSet &patterns);
34
35/// Collect a set of patterns to convert vector-related Affine ops to the Vector
36/// dialect.
38
39/// Emit code that computes the lower bound of the given affine loop using
40/// standard arithmetic operations.
41Value lowerAffineLowerBound(affine::AffineForOp op, OpBuilder &builder);
42
43/// Emit code that computes the upper bound of the given affine loop using
44/// standard arithmetic operations.
45Value lowerAffineUpperBound(affine::AffineForOp op, OpBuilder &builder);
46
47} // namespace mlir
48
49#endif // MLIR_CONVERSION_AFFINETOSTANDARD_AFFINETOSTANDARD_H
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
Definition Location.h:76
This class helps build Operations.
Definition Builders.h:207
The abstract base pass class.
Definition Pass.h:51
RewritePattern is the common base class for all DAG to DAG replacements.
This class provides an abstraction over the different types of ranges over Values.
Definition ValueRange.h:387
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition Value.h:96
Include the generated interface declarations.
Value lowerAffineUpperBound(affine::AffineForOp op, OpBuilder &builder)
Emit code that computes the upper bound of the given affine loop using standard arithmetic operations...
const FrozenRewritePatternSet & patterns
void populateAffineToVectorConversionPatterns(RewritePatternSet &patterns)
Collect a set of patterns to convert vector-related Affine ops to the Vector dialect.
void populateAffineToStdConversionPatterns(RewritePatternSet &patterns)
Collect a set of patterns to convert from the Affine dialect to the Standard dialect,...
Value lowerAffineLowerBound(affine::AffineForOp op, OpBuilder &builder)
Emit code that computes the lower bound of the given affine loop using standard arithmetic operations...