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

Last change on this file since 4896 was 4886, checked in by nmedfort, 4 years ago

Bug fixes

File size: 766 bytes
Line 
1#ifndef PABLO_SIMPLIFIER_HPP
2#define PABLO_SIMPLIFIER_HPP
3
4#include <pablo/codegenstate.h>
5
6namespace pablo {
7
8struct ExpressionTable;
9class PabloFunction;
10
11class Simplifier {
12public:
13    static bool optimize(PabloFunction & function);
14protected:
15    Simplifier() = default;
16private:
17    static void eliminateRedundantCode(PabloBlock * const block, ExpressionTable * predecessor = nullptr);
18    static PabloAST * fold(Variadic * const var, PabloBlock * const block);
19    static PabloAST * fold(Statement * const stmt, PabloBlock * const block);
20    static void deadCodeElimination(PabloBlock * const block);
21    static void strengthReduction(PabloBlock * const block);
22    static bool isSuperfluous(const Assign * const assign);
23};
24
25}
26#endif // PABLO_SIMPLIFIER_HPP
Note: See TracBrowser for help on using the repository browser.