P4C
The P4 Compiler
Loading...
Searching...
No Matches
backends/tofino/bf-p4c/arch/v1model.h
1
24#ifndef BF_P4C_ARCH_V1MODEL_H_
25#define BF_P4C_ARCH_V1MODEL_H_
26
27#include <boost/algorithm/string.hpp>
28
29#include "bf-p4c/arch/arch.h"
30#include "bf-p4c/arch/fromv1.0/v1_converters.h"
31#include "bf-p4c/arch/fromv1.0/v1_program_structure.h"
32#include "bf-p4c/bf-p4c-options.h"
33#include "bf-p4c/common/pragma/all_pragmas.h"
34#include "bf-p4c/common/pragma/collect_global_pragma.h"
35#include "bf-p4c/ir/gress.h"
36#include "frontends/common/options.h"
37#include "frontends/p4/cloner.h"
38#include "frontends/p4/coreLibrary.h"
39#include "frontends/p4/methodInstance.h"
40#include "frontends/p4/sideEffects.h"
41#include "frontends/p4/typeChecking/typeChecker.h"
42#include "frontends/p4/uniqueNames.h"
43#include "ir/ir.h"
44#include "ir/namemap.h"
45
46namespace BFN {
47
50 V1::ProgramStructure *structure;
51 P4::ReferenceMap *refMap;
52 P4::TypeMap *typeMap;
53 bool preorder(IR::Declaration_Instance *decl) override;
54
55 public:
57 P4::TypeMap *typeMap)
58 : structure(structure), refMap(refMap), typeMap(typeMap) {}
59};
60
66 public:
67 V1::ProgramStructure structure;
68 const IR::ToplevelBlock *toplevel = nullptr;
69
71
72 const IR::ToplevelBlock *getToplevelBlock() {
73 CHECK_NULL(toplevel);
74 return toplevel;
75 }
76};
77
78} // namespace BFN
79
80#endif /* BF_P4C_ARCH_V1MODEL_H_ */
Definition bf-p4c-options.h:28
Definition visitor.h:372
Definition ir/pass_manager.h:40
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
Definition typeMap.h:41
SimpleSwitchTranslation(P4::ReferenceMap *refMap, P4::TypeMap *typeMap, BFN_Options &options)
Definition backends/tofino/bf-p4c/arch/v1model.cpp:2495
Definition backends/tofino/bf-p4c/arch/v1model.h:49
PassManager that governs normalization of v1model architecture.
Definition backends/tofino/bf-p4c/arch/v1model.h:65
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21
Definition v1_program_structure.h:36