P4C
The P4 Compiler
Loading...
Searching...
No Matches
validate_actions.h
1
19#ifndef BF_P4C_MAU_VALIDATE_ACTIONS_H_
20#define BF_P4C_MAU_VALIDATE_ACTIONS_H_
21
22#include "backends/tofino/bf-p4c/mau/mau_visitor.h"
23#include "backends/tofino/bf-p4c/phv/phv_fields.h"
24#include "ir/visitor.h"
25
26class PhvInfo;
27class ReductionOrInfo;
28
29class ValidateActions final : public MauInspector {
30 private:
31 const PhvInfo &phv;
32 const ReductionOrInfo &red_info;
33 bool stop_compiler;
34 bool phv_alloc;
35 bool ad_alloc;
36 bool warning_found = false;
37
38 // true if action analysis finds a PHV allocation that violates MAU constraints.
39 bool error_found = false;
40
41 profile_t init_apply(const IR::Node *root) override;
42 bool preorder(const IR::MAU::Action *act) override;
43 void end_apply() override;
44
45 public:
46 explicit ValidateActions(const PhvInfo &p, const ReductionOrInfo &ri, bool sc, bool pa, bool ad)
47 : phv(p), red_info(ri), stop_compiler(sc), phv_alloc(pa), ad_alloc(ad) {}
48};
49
50#endif /* BF_P4C_MAU_VALIDATE_ACTIONS_H_ */
Definition mau_visitor.h:29
Definition node.h:94
Definition visitor.h:78
Definition phv_fields.h:1095
Definition validate_actions.h:29
Definition reduction_or.h:47