29 virtual bool uses_next_table(
const IR::MAU::Table *tbl)
const = 0;
30 virtual void dbprint(std::ostream &)
const = 0;
31 virtual const std::unordered_map<int, std::set<UniqueId>> &long_branches(
UniqueId)
const {
32 static std::unordered_map<int, std::set<UniqueId>> empty;
35 virtual std::pair<ssize_t, ssize_t> get_live_range_for_lb_with_dest(
UniqueId)
const {
39 for (
auto &lb : long_branches(from))
40 if (lb.second.count(to))
return lb.first;
50 return pass->next_for(tbl, what);
52 bool uses_next_table(
const IR::MAU::Table *tbl)
const override {
53 return pass->uses_next_table(tbl);
55 void dbprint(std::ostream &out)
const override { pass->dbprint(out); }
56 const std::unordered_map<int, std::set<UniqueId>> &long_branches(
UniqueId id)
const override {
57 return pass->long_branches(
id);
59 std::pair<ssize_t, ssize_t> get_live_range_for_lb_with_dest(
UniqueId id)
const override {
60 return pass->get_live_range_for_lb_with_dest(
id);
62 void setVisitor(
NextTable *v) { DynamicVisitor::setVisitor((pass = v)); }
63 DynamicNextTable *clone()
const override { BUG(
"DynamicNextTable not cloneable"); }
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24