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 "bf-p4c/mau/mau_visitor.h"
23
#include "bf-p4c/phv/phv_fields.h"
24
#include "ir/visitor.h"
25
26
class
PhvInfo
;
27
class
ReductionOrInfo
;
28
29
class
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_ */
MauInspector
Definition
mau_visitor.h:29
P4::IR::Node
Definition
node.h:95
P4::Visitor::profile_t
Definition
visitor.h:78
PhvInfo
Definition
phv_fields.h:1095
ValidateActions
Definition
validate_actions.h:29
ReductionOrInfo
Definition
reduction_or.h:47
backends
tofino
bf-p4c
mau
validate_actions.h
Generated by
1.12.0