source: icGREP/icgrep-devel/icgrep/pablo/passes/flattenassociativedfg.h @ 4880

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

More work on n-ary operations.

File size: 883 bytes
Line 
1#ifndef FLATTENASSOCIATIVEDFG_H
2#define FLATTENASSOCIATIVEDFG_H
3
4namespace pablo {
5
6class PabloFunction;
7class PabloBlock;
8class Statement;
9class Variadic;
10class Not;
11class Assign;
12
13class FlattenAssociativeDFG {
14public:
15    static void transform(PabloFunction & function);
16protected:
17
18    static void flatten(PabloBlock * const block);
19    static void flatten(Variadic * const var);
20    static void applyNegationInwards(Not * const var, PabloBlock * const block);
21
22    static void removeCommonLiterals(PabloBlock * const block);
23    static void removeCommonLiterals(Assign * const def);
24    static void removeCommonLiterals(Statement * input, Variadic * var);
25
26    static void extract(PabloBlock * const block);
27    static void extractNegationsOutwards(Variadic * const var, PabloBlock * const block);
28
29    FlattenAssociativeDFG() = default;
30};
31
32}
33
34#endif // FLATTENASSOCIATIVEDFG_H
Note: See TracBrowser for help on using the repository browser.