31 std::map<const IR::MAU::Action *, int> action_ids;
33 std::map<const IR::MAU::Table *, bitvec> action_succ;
36 bool preorder(
const IR::MAU::Table *t)
override {
37 for (
const auto *act : Values(t->actions)) {
38 if (!action_ids.count(act)) action_ids.emplace(act, action_ids.size());
39 name_actions[t->externalName() +
"." + act->name] = act;
43 void postorder(
const IR::MAU::Table *tbl)
override;
44 void postorder(
const IR::MAU::TableSeq *seq)
override;
47 profile_t rv = MauInspector::init_apply(root);
55 bool operator()(
const IR::MAU::Action *a,
const IR::MAU::Action *b)
const {
56 return !not_mutex(action_ids.at(a), action_ids.at(b));
60 const std::map<const IR::MAU::Action *, int> &actions()
const {
return action_ids; }
62 std::map<cstring, const IR::MAU::Action *> name_actions;
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24