P4C
The P4 Compiler
Loading...
Searching...
No Matches
convert_hs_index.h
1/*
2 * SPDX-FileCopyrightText: 2022 The P4 Language Consortium
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef BACKENDS_P4TOOLS_COMMON_COMPILER_CONVERT_HS_INDEX_H_
8#define BACKENDS_P4TOOLS_COMMON_COMPILER_CONVERT_HS_INDEX_H_
9
10#include <cstddef>
11
12#include "ir/ir.h"
13#include "ir/node.h"
14#include "ir/visitor.h"
15
16namespace P4::P4Tools {
17
19class HSIndexToMember : public Transform {
20 public:
21 const IR::Node *postorder(IR::ArrayIndex *curArrayIndex) override;
22
25 static const IR::ArrayIndex *produceStackIndex(const IR::Type *type,
26 const IR::Expression *expression,
27 size_t arrayIndex);
28};
29
30} // namespace P4::P4Tools
31
32#endif /* BACKENDS_P4TOOLS_COMMON_COMPILER_CONVERT_HS_INDEX_H_ */
Definition node.h:53
The main class for finding non-concrete header stack indices.
Definition convert_hs_index.h:19
static const IR::ArrayIndex * produceStackIndex(const IR::Type *type, const IR::Expression *expression, size_t arrayIndex)
Definition convert_hs_index.cpp:22
Definition common/compiler/compiler_result.cpp:7