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

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

More work on n-ary operations.

File size: 732 bytes
Line 
1#ifndef FLATTENASSOCIATIVEDFG_H
2#define FLATTENASSOCIATIVEDFG_H
3
4namespace pablo {
5
6class PabloFunction;
7class PabloBlock;
8class Variadic;
9class Not;
10class Assign;
11
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 extract(PabloBlock * const block);
23    static void extractNegationsOutwards(Variadic * const var, PabloBlock * const block);
24    static void removeCommonCalculation(Assign * const def);
25
26    FlattenAssociativeDFG() = default;
27};
28
29}
30
31#endif // FLATTENASSOCIATIVEDFG_H
Note: See TracBrowser for help on using the repository browser.