MLIR  20.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 
16 namespace mlir {
17 
18 class DominanceInfo;
19 class Operation;
20 class 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.
26 void eliminateCommonSubExpressions(RewriterBase &rewriter,
27  DominanceInfo &domInfo, Operation *op,
28  bool *changed = nullptr);
29 
30 } // namespace mlir
31 
32 #endif // MLIR_TRANSFORMS_CSE_H_
Include the generated interface declarations.
void eliminateCommonSubExpressions(RewriterBase &rewriter, DominanceInfo &domInfo, Operation *op, bool *changed=nullptr)
Eliminate common subexpressions within the given operation.
Definition: CSE.cpp:382