P4C
The P4 Compiler
Loading...
Searching...
No Matches
typecheck.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_14_TYPECHECK_H_
9#define FRONTENDS_P4_14_TYPECHECK_H_
10
11#include "ir/ir.h"
12#include "ir/pass_manager.h"
13
14namespace P4 {
15
16/* This is the P4 v1.0/v1.1 typechecker/type inference algorithm */
17class TypeCheck : public PassManager {
18 std::map<const IR::Node *, const IR::Type *> actionArgUseTypes;
19 int iterCounter = 0;
27
28 public:
29 TypeCheck();
30 const IR::Node *apply_visitor(const IR::Node *, const char *) override;
31};
32
33} // namespace P4
34
35#endif /* FRONTENDS_P4_14_TYPECHECK_H_ */
Definition node.h:53
Definition typecheck.cpp:519
Definition typecheck.cpp:23
Definition typecheck.cpp:440
Definition typecheck.cpp:477
Bottom up type inferencing – set the types of expression nodes based on operands.
Definition typecheck.cpp:304
Top down type inferencing – set the type of expression nodes based on their uses.
Definition typecheck.cpp:416
Definition typecheck.cpp:560
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13