P4C
The P4 Compiler
|
#include <deparse_graph.h>
Classes | |
struct | NodeInfo |
Public Types | |
using | Node = typename Graph::vertex_descriptor |
Public Member Functions | |
Node | addConst (const IR::Constant *c) |
bool | addEdge (Node src, Node dst) |
Adds an edge from src to dst. | |
Node | addField (const PHV::Field *f) |
bool | canReach (const PHV::Field *f1, const PHV::Field *f2) const |
Determines whether f1 might be deparsed before f2 . | |
void | clear () |
const std::vector< NodeInfo > | nodesBetween (const PHV::Field *f1, const PHV::Field *f2) const |
Encodes adjacency information for the deparser. Nodes represent fields or constants that get deparsed. A forward edge from n1 to n2 (and a back edge from n2 to n1) exists if n1 is deparsed right before n2 is deparsed.
DeparseGraph::Node DeparseGraph::addConst | ( | const IR::Constant * | c | ) |
bool DeparseGraph::addEdge | ( | Node | src, |
Node | dst ) |
Adds an edge from src to dst.
DeparseGraph::Node DeparseGraph::addField | ( | const PHV::Field * | f | ) |
Copyright (C) 2024 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
const std::vector< DeparseGraph::NodeInfo > DeparseGraph::nodesBetween | ( | const PHV::Field * | f1, |
const PHV::Field * | f2 ) const |
f1
and f2
.