P4C
The P4 Compiler
Loading...
Searching...
No Matches
split_gateways.h
1
19
#ifndef BF_P4C_MAU_SPLIT_GATEWAYS_H_
20
#define BF_P4C_MAU_SPLIT_GATEWAYS_H_
21
22
#include "field_use.h"
23
#include "gateway.h"
24
#include "mau_visitor.h"
25
26
using namespace
P4
;
27
28
class
SpreadGatewayAcrossSeq
:
public
MauTransform
,
public
Backtrack
{
29
FieldUse
uses;
30
bool
do_splitting =
false
;
31
struct
enable :
public
Backtrack::trigger
{
32
DECLARE_TYPEINFO(enable);
33
};
34
bool
backtrack(
trigger
&trig)
override
{
35
if
(!do_splitting && trig.
is
<enable>()) {
36
do_splitting =
true
;
37
return
true
;
38
}
39
return
false
;
40
}
41
Visitor::profile_t
init_apply(
const
IR::Node
*)
override
;
42
const
IR::Node
*postorder(IR::MAU::Table *)
override
;
43
44
public
:
45
explicit
SpreadGatewayAcrossSeq
(
const
PhvInfo
&p) : uses(p) {}
46
};
47
48
class
SplitComplexGateways
:
public
Transform
{
49
const
PhvInfo
&phv;
50
const
IR::MAU::Table *preorder(IR::MAU::Table *tbl)
override
;
51
52
public
:
53
explicit
SplitComplexGateways
(
const
PhvInfo
&phv) : phv(phv) {}
54
};
55
56
#endif
/* BF_P4C_MAU_SPLIT_GATEWAYS_H_ */
FieldUse
Definition
field_use.h:32
MauTransform
Definition
mau_visitor.h:55
P4::Backtrack
Definition
visitor.h:766
P4::IR::Node
Definition
node.h:94
P4::Transform
Definition
visitor.h:424
P4::Visitor::profile_t
Definition
visitor.h:78
PhvInfo
Definition
phv_fields.h:1095
SplitComplexGateways
Definition
split_gateways.h:48
SpreadGatewayAcrossSeq
Definition
split_gateways.h:28
P4
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition
applyOptionsPragmas.cpp:24
P4::Backtrack::trigger
Definition
visitor.h:768
P4::RTTI::Base::is
bool is() const noexcept
Definition
rtti.h:216
backends
tofino
bf-p4c
mau
split_gateways.h
Generated by
1.12.0