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

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

Initial attempt to improve debugging capabilities with compilation stack traces on error.

File size: 828 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 * triviallyFold(Statement * const stmt, PabloBlock * const block);
23    static void redundancyElimination(PabloBlock * const block, ExpressionTable * et = nullptr, VariableTable * const vt = nullptr);
24    static void deadCodeElimination(PabloKernel * const kernel);
25    static void deadCodeElimination(PabloBlock * const block);
26    static void strengthReduction(PabloBlock * const block);
27};
28
29}
30#endif // PABLO_SIMPLIFIER_HPP
Note: See TracBrowser for help on using the repository browser.