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
midend/table_mutex.h
1
18
19
#ifndef BACKENDS_TOFINO_BF_P4C_MIDEND_TABLE_MUTEX_H_
20
#define BACKENDS_TOFINO_BF_P4C_MIDEND_TABLE_MUTEX_H_
21
22
#include "frontends/common/resolveReferences/resolveReferences.h"
23
#include "ir/ir.h"
24
25
// FIXME -- move this to open source P4.org code?
26
30
class
TableMutex :
public
Inspector,
public
ControlFlowVisitor,
public
P4::ResolutionContext
{
31
TableMutex *clone()
const override
{
return
new
TableMutex(*
this
); }
32
void
flow_merge(Visitor &)
override
;
33
void
flow_copy(ControlFlowVisitor &)
override
;
34
struct
Shared
;
35
Shared
*data;
// shared between clones
36
bitvec seen_tables;
37
38
bool
preorder(
const
IR::P4Control *)
override
;
39
bool
preorder(
const
IR::P4Parser *)
override
{
return
false
; }
// ignore parsers
40
bool
preorder(
const
IR::MethodCallExpression *)
override
;
41
void
end_apply()
override
;
42
friend
std::ostream &operator<<(std::ostream &,
const
TableMutex &);
43
44
public
:
45
TableMutex();
46
bool
operator()(
const
IR::P4Table *,
const
IR::P4Table *);
47
bool
operator()(
const
IR::P4Action *,
const
IR::P4Action *);
48
bool
operator()(
const
IR::Declaration *,
const
IR::Declaration *);
49
};
30
class
TableMutex :
public
Inspector,
public
ControlFlowVisitor,
public
P4::ResolutionContext
{
…
};
50
51
#endif
/* BACKENDS_TOFINO_BF_P4C_MIDEND_TABLE_MUTEX_H_ */
P4::ResolutionContext
Visitor mixin for looking up names in enclosing scopes from the Visitor::Context.
Definition
resolveReferences.h:35
TableMutex::Shared
Definition
midend/table_mutex.cpp:24
backends
tofino
bf-p4c
midend
table_mutex.h
Generated by
1.13.2