P4C
The P4 Compiler
Loading...
Searching...
No Matches
tableApply.h
1
/*
2
* SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc.
3
* Copyright 2013-present Barefoot Networks, Inc.
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#ifndef FRONTENDS_P4_TABLEAPPLY_H_
9
#define FRONTENDS_P4_TABLEAPPLY_H_
10
11
#include "frontends/common/resolveReferences/referenceMap.h"
12
#include "frontends/p4/typeMap.h"
13
#include "ir/ir.h"
14
15
// helps resolve complex expressions involving a table apply
16
// such as table.apply().action_run
17
// and table.apply().hit
18
19
namespace
P4
{
20
21
// These are used to figure out whether an expression has the form:
22
// table.apply().hit,
23
// table.apply().miss,
24
// or
25
// table.apply().action_run
26
class
TableApplySolver
{
27
public
:
28
static
const
IR::P4Table *isHit(
const
IR::Expression *expression,
DeclarationLookup
*refMap,
29
TypeMap
*typeMap);
30
static
const
IR::P4Table *isMiss(
const
IR::Expression *expression,
DeclarationLookup
*refMap,
31
TypeMap
*typeMap);
32
static
const
IR::P4Table *isActionRun(
const
IR::Expression *expression,
33
DeclarationLookup
*refMap,
TypeMap
*typeMap);
34
};
35
36
}
// namespace P4
37
38
#endif
/* FRONTENDS_P4_TABLEAPPLY_H_ */
P4::DeclarationLookup
Definition
referenceMap.h:48
P4::TableApplySolver
Definition
tableApply.h:26
P4::TypeMap
Definition
typeMap.h:32
P4
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition
applyOptionsPragmas.cpp:13
frontends
p4
tableApply.h
Generated by
1.13.2