MLIR 22.0.0git
CSE.h
Go to the documentation of this file.
1//===- CSE.h - Common Subexpression Elimination -----------------*- 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// This file declares methods for eliminating common subexpressions.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_TRANSFORMS_CSE_H_
14#define MLIR_TRANSFORMS_CSE_H_
15
16namespace mlir {
17
18class DominanceInfo;
19class Operation;
20class RewriterBase;
21
22/// Eliminate common subexpressions within the given operation. This transform
23/// looks for and deduplicates equivalent operations.
24///
25/// `changed` indicates whether the IR was modified or not.
27 DominanceInfo &domInfo, Operation *op,
28 bool *changed = nullptr);
29
30} // namespace mlir
31
32#endif // MLIR_TRANSFORMS_CSE_H_
A class for computing basic dominance information.
Definition Dominance.h:140
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to tr...
Include the generated interface declarations.
const FrozenRewritePatternSet GreedyRewriteConfig bool * changed
void eliminateCommonSubExpressions(RewriterBase &rewriter, DominanceInfo &domInfo, Operation *op, bool *changed=nullptr)
Eliminate common subexpressions within the given operation.
Definition CSE.cpp:378