P4C
The P4 Compiler
Loading...
Searching...
No Matches
entryPriorities.h
1
/*
2
Copyright 2023 Mihai Budiu
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16
17
#ifndef FRONTENDS_P4_ENTRYPRIORITIES_H_
18
#define FRONTENDS_P4_ENTRYPRIORITIES_H_
19
20
#include "coreLibrary.h"
21
#include "frontends/common/resolveReferences/resolveReferences.h"
22
#include "ir/ir.h"
23
#include "ir/pass_manager.h"
24
25
namespace
P4
{
26
28
class
EntryPriorities
:
public
Transform
,
public
ResolutionContext
{
29
P4::P4CoreLibrary
&corelib;
30
31
bool
requiresPriority(
const
IR::KeyElement *ke)
const
;
32
33
public
:
34
EntryPriorities
() : corelib(P4::P4CoreLibrary::instance()) { setName(
"EntryPriorities"
); }
35
const
IR::Node
*preorder(IR::EntriesList *entries)
override
;
36
};
37
38
}
// namespace P4
39
40
#endif
/* FRONTENDS_P4_ENTRYPRIORITIES_H_ */
IR::Node
Definition
node.h:93
P4::EntryPriorities
Assigns priorities to table entries if they are not 'const'.
Definition
entryPriorities.h:28
P4::P4CoreLibrary
Definition
coreLibrary.h:98
P4::ResolutionContext
Visitor mixin for looking up names in enclosing scopes from the Visitor::Context.
Definition
resolveReferences.h:32
Transform
Definition
visitor.h:420
P4
Definition
applyOptionsPragmas.cpp:24
frontends
p4
entryPriorities.h
Generated by
1.11.0