P4C
The P4 Compiler
Loading...
Searching...
No Matches
memoize_min_stage.h
1
19#ifndef BACKENDS_TOFINO_BF_P4C_PHV_ANALYSIS_MEMOIZE_MIN_STAGE_H_
20#define BACKENDS_TOFINO_BF_P4C_PHV_ANALYSIS_MEMOIZE_MIN_STAGE_H_
21
22#include "bf-p4c/mau/table_dependency_graph.h"
23#include "bf-p4c/mau/table_summary.h"
24#include "bf-p4c/phv/mau_backtracker.h"
25#include "bf-p4c/phv/phv_fields.h"
26
27// MemoizeStage save table stage mapping to static vairables of PhvInfo object,
28// both physical stage and min stage.
29class MemoizeStage : public Inspector {
30 private:
31 const DependencyGraph &dg; // for min stages
32 const MauBacktracker &backtracker; // for physical stages
33
34 profile_t init_apply(const IR::Node *root) override;
35 bool preorder(const IR::MAU::Table *tbl) override;
36
37 public:
38 explicit MemoizeStage(const DependencyGraph &d, const MauBacktracker &backtracker)
39 : dg(d), backtracker(backtracker) {}
40};
41
42#endif /* BACKENDS_TOFINO_BF_P4C_PHV_ANALYSIS_MEMOIZE_MIN_STAGE_H_ */
Definition mau_backtracker.h:29
Definition memoize_min_stage.h:29
Definition node.h:95
Definition visitor.h:400
Definition visitor.h:78
Definition table_dependency_graph.h:52