38 class ActionProfileImposedConstraints :
public MauInspector {
40 bool preorder(
const IR::MAU::ActionData *)
override;
41 bool preorder(
const IR::MAU::Table *)
override {
47 ActionProfileImposedConstraints() { visitDagOnce =
false; }
55 static constexpr unsigned INIT_ACTION_HANDLE = (0x20 << 24) + 1;
56 unsigned handle_position = 0;
61 bool preorder(
const IR::MAU::Action *)
override;
63 unsigned next_handle() {
64 unsigned rv = INIT_ACTION_HANDLE + handle_position;
75 bool preorder(IR::MAU::Action *)
override;
83 std::map<unsigned, const IR::MAU::Action *> unique_handle;
85 bool preorder(
const IR::MAU::Action *)
override;
88 GuaranteeUniqueHandle() {}
100 ValidateSelectors &self;
102 bool preorder(
const IR::MAU::Selector *sel)
override;
103 bool preorder(
const IR::MAU::Table *)
override {
109 explicit ValidateKey(ValidateSelectors &s) : self(s) { visitDagOnce =
false; }
112 class SetSymmetricSelectorKeys :
public MauModifier {
113 ValidateSelectors &self;
114 bool preorder(IR::MAU::Table *tbl)
override;
117 explicit SetSymmetricSelectorKeys(ValidateSelectors &s) : self(s) {}
121 explicit ValidateSelectors(
const PhvInfo &phv) : phv(phv) {
122 addPasses({
new ValidateKey(*
this),
new SetSymmetricSelectorKeys(*
this)});
128 addPasses({
new ValidateSelectors(phv),
new ActionProfileImposedConstraints,
129 new DetermineHandle(*
this),
new AssignHandle(*
this),
new GuaranteeUniqueHandle});
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24