P4C
The P4 Compiler
Loading...
Searching...
No Matches
table_control_deps.h
1
19#ifndef BF_P4C_MAU_TABLE_CONTROL_DEPS_H_
20#define BF_P4C_MAU_TABLE_CONTROL_DEPS_H_
21
22#include "bf-p4c/mau/mau_visitor.h"
23#include "lib/ordered_map.h"
24
25using namespace P4;
26
34 struct info_t { // info per table
36 int dependent_paths = 0;
37 };
39
40 profile_t init_apply(const IR::Node *root) override {
41 info.clear();
42 return MauTableInspector::init_apply(root);
43 }
45 void postorder(const IR::MAU::Table *tbl) override;
46 void revisit(const IR::MAU::Table *tbl) override;
47 void postorder(const IR::MAU::TableSeq *) override { visitAgain(); }
48
49 public:
50 bool operator()(const IR::MAU::Table *a, const IR::MAU::Table *b) const;
51 int paths(const IR::MAU::Table *) const;
52};
53
54#endif /* BF_P4C_MAU_TABLE_CONTROL_DEPS_H_ */
Definition mau_visitor.h:39
Definition node.h:95
Definition visitor.h:78
Definition ordered_map.h:32
Definition ordered_set.h:32
Definition table_control_deps.h:33
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
void info(const int kind, const char *format, const T *node, Args &&...args)
Report info messages of type kind. Requires that the node argument have source info.
Definition lib/error.h:148