19#ifndef BF_P4C_PHV_ANALYSIS_META_LIVE_RANGE_H_
20#define BF_P4C_PHV_ANALYSIS_META_LIVE_RANGE_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/mau_backtracker.h"
25#include "backends/tofino/bf-p4c/phv/phv_fields.h"
26#include "backends/tofino/bf-p4c/phv/phv_parde_mau_use.h"
27#include "backends/tofino/bf-p4c/phv/pragma/phv_pragmas.h"
30#include "lib/symbitmatrix.h"
45 static constexpr int DEP_DIST = 2;
56 static bool notOverlapping(
int minStage1,
int maxStage1,
int minStage2,
int maxStage2,
57 int depDist = DEP_DIST);
61 static bool notOverlapping(std::pair<int, int> &range1, std::pair<int, int> &range2,
62 int depDist = DEP_DIST);
101 profile_t init_apply(
const IR::Node *root)
override;
102 bool preorder(
const IR::MAU::Table *t)
override;
103 void end_apply()
override;
106 void printLiveRanges()
const;
113 void setPaddingFieldLiveMap(
const PHV::Field *f);
133 if (!minStages.count(stage))
134 BUG(
"Stage %1% not in the resource-insensitive tabel dependence graph", stage);
135 return minStages.at(stage);
141 return overlay(f1->
id, f2->
id);
149 noOverlay(pragmas.pa_no_overlay()),
151 noInitFields(pragmas.pa_no_init().getFields()),
152 notParsedFields(pragmas.pa_deparser_zero().getNotParsedFields()),
153 notDeparsedFields(pragmas.pa_deparser_zero().getNotDeparsedFields()),
154 overlay(phv.metadata_mutex()) {}
Definition mau_backtracker.h:29
Definition symbitmatrix.h:27
Definition ordered_map.h:32
Definition ordered_set.h:32
Definition phv_fields.h:154
int id
Unique field ID.
Definition phv_fields.h:164
Definition phv_pragmas.h:46
Definition phv_fields.h:1095
Definition phv_parde_mau_use.h:154
Definition pa_no_overlay.h:33
Definition field_defuse.h:77
Definition table_dependency_graph.h:52