source: icGREP/icgrep-devel/icgrep/pablo/optimizers/pablo_simplifier.hpp @ 5217

Last change on this file since 5217 was 5217, checked in by nmedfort, 2 years ago

Merged PabloFunction? and PabloKernel? classes. Updated projects where necessary.

File size: 889 bytes
Line 
1#ifndef PABLO_SIMPLIFIER_HPP
2#define PABLO_SIMPLIFIER_HPP
3
4namespace pablo {
5
6class PabloKernel;
7class PabloAST;
8class Variadic;
9class Statement;
10class PabloBlock;
11
12struct ExpressionTable;
13
14class Simplifier {
15    friend class BooleanReassociationPass;
16    struct VariableTable;
17public:
18    static bool optimize(PabloKernel * kernel);
19protected:
20    Simplifier() = default;
21private:
22    static PabloAST * fold(Variadic * var, PabloBlock * const block);
23    static PabloAST * fold(Statement * const stmt, PabloBlock * const block);
24    static void redundancyElimination(PabloBlock * const block, ExpressionTable * et = nullptr, VariableTable * const vt = nullptr);
25    static void deadCodeElimination(PabloKernel * const kernel);
26    static void deadCodeElimination(PabloBlock * const block);
27    static void strengthReduction(PabloBlock * const block);
28};
29
30}
31#endif // PABLO_SIMPLIFIER_HPP
Note: See TracBrowser for help on using the repository browser.