CIRCT  19.0.0git
ReductionUtils.h
Go to the documentation of this file.
1 //===- ReductionUtils.h - Reduction pattern utilities -----------*- 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 CIRCT_REDUCE_REDUCTIONUTILS_H
10 #define CIRCT_REDUCE_REDUCTIONUTILS_H
11 
12 #include "circt/Support/LLVM.h"
13 
14 namespace circt {
15 // Forward declarations.
16 struct Reduction;
17 
18 namespace reduce {
19 
20 /// Starting at the given `op`, traverse through it and its operands and erase
21 /// operations that have no more uses.
22 void pruneUnusedOps(Operation *initialOp, Reduction &reduction);
23 
24 } // namespace reduce
25 } // namespace circt
26 
27 #endif // CIRCT_REDUCE_REDUCTIONUTILS_H
void pruneUnusedOps(Operation *initialOp, Reduction &reduction)
Starting at the given op, traverse through it and its operands and erase operations that have no more...
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
Definition: DebugAnalysis.h:21
An abstract reduction pattern.
Definition: Reduction.h:24