P4C
The P4 Compiler
Toggle main menu visibility
Main Page
P4C Repository Organization
Getting Started
P4C Intermediate Representation (IR)
Frontend
Midend
Backends
Behavioral Model Backend
DPDK Backend
eBPF Backend
TC Backend
uBPF Backend
P4test Backend
Graphs Backend
p4fmt (P4 Formatter)
P4Tools
P4Smith
P4Testgen
Contribute to the P4 Compiler Project
Releases
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
w
x
z
Functions
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
w
x
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Typedefs
Enumerations
Enumerator
Related Symbols
•
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
Loading...
Searching...
No Matches
control_flow_visitor.h
1
19
#ifndef BACKENDS_TOFINO_BF_P4C_IR_CONTROL_FLOW_VISITOR_H_
20
#define BACKENDS_TOFINO_BF_P4C_IR_CONTROL_FLOW_VISITOR_H_
21
22
#include "frontends/common/resolveReferences/resolveReferences.h"
23
#include "ir/ir.h"
24
25
namespace
BFN
{
26
27
class
ControlFlowVisitor
:
public
::ControlFlowVisitor,
virtual
public
P4::ResolutionContext
{
28
protected
:
48
bool
filter_join_point
(
const
IR::Node
*n)
override
{
49
// FIXME -- we generally should NOT be filtering out Tables or TableSeqs, BUT currently
50
// the joinFlows stuff doesn't work properly, as Table::visit_children does not use
51
// a SplitFlowVisit to visit next fields, so it has trouble when a TableSeq is used in
52
// more than one place. It also depends on the visitor as to whether it makes more
53
// sense to always revisit tables/seqs that are referenced more than once, as that
54
// cam give a more accurate flow analysis (though it is more expensive)
55
return
!n->
is
<IR::BFN::ParserState>() &&
56
// !n->is<IR::MAU::Table>() &&
57
!n->
is
<IR::MAU::TableSeq>();
58
}
48
bool
filter_join_point
(
const
IR::Node
*n)
override
{
…
}
59
60
// Helpers for visiting midend IR in control-flow order. These functions take a call
61
// or reference to a ParserState, an Action, or a Table and visit that object.
62
void
visit_def(
const
IR::PathExpression *);
63
void
visit_def(
const
IR::MethodCallExpression *);
64
};
27
class
ControlFlowVisitor
:
public
::ControlFlowVisitor,
virtual
public
P4::ResolutionContext
{
…
};
65
66
}
// end namespace BFN
67
68
#endif
/* BACKENDS_TOFINO_BF_P4C_IR_CONTROL_FLOW_VISITOR_H_ */
BFN::ControlFlowVisitor::filter_join_point
bool filter_join_point(const IR::Node *n) override
Definition
control_flow_visitor.h:48
P4::ControlFlowVisitor
Definition
visitor.h:463
P4::IR::Node
Definition
node.h:95
P4::ResolutionContext
Visitor mixin for looking up names in enclosing scopes from the Visitor::Context.
Definition
resolveReferences.h:35
BFN
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition
add_t2na_meta.cpp:21
P4::RTTI::Base::is
bool is() const noexcept
Definition
rtti.h:216
backends
tofino
bf-p4c
ir
control_flow_visitor.h
Generated by
1.12.0