19#ifndef BACKENDS_TOFINO_BF_P4C_PHV_FINALIZE_STAGE_ALLOCATION_H_
20#define BACKENDS_TOFINO_BF_P4C_PHV_FINALIZE_STAGE_ALLOCATION_H_
22#include "backends/tofino/bf-p4c/common/field_defuse.h"
23#include "backends/tofino/bf-p4c/mau/table_dependency_graph.h"
24#include "backends/tofino/bf-p4c/phv/phv_fields.h"
31 int deparser_stage[3] = {0, 0, 0};
32 int dep_stage_overall = -1;
33 bool preorder(
const IR::MAU::Table *tbl)
override;
34 void end_apply()
override;
37 int getDeparserStage(gress_t gress)
const {
return deparser_stage[gress]; }
39 int getDeparserStage()
const {
return dep_stage_overall; }
66 PHV::StageAndAccess parserMin;
67 PHV::StageAndAccess deparserMax;
70 bool preorder(
const IR::MAU::Table *tbl)
override;
71 void end_apply()
override;
78 : phv(p), defuse(u), dg(d), depStages(s) {}
94 bool &usedInDeparser,
bool usePhysicalStages =
true);
Definition finalize_stage_allocation.h:28
Definition finalize_stage_allocation.h:81
Definition ir/pass_manager.h:40
Definition ordered_map.h:32
Definition phv_fields.h:154
Definition phv_fields.h:1095
Definition finalize_stage_allocation.h:50
Definition field_defuse.h:77
Definition table_dependency_graph.h:52