P4C
The P4 Compiler
Loading...
Searching...
No Matches
type_categories.h
1
19#ifndef BF_P4C_MIDEND_TYPE_CATEGORIES_H_
20#define BF_P4C_MIDEND_TYPE_CATEGORIES_H_
21
22#include "ir/ir.h"
23
24namespace P4 {
25class ReferenceMap;
26class TypeMap;
27} // namespace P4
28
29namespace BFN {
30
31struct LinearPath;
32
38bool isIntrinsicMetadataType(const IR::Type *type);
39
44bool isCompilerGeneratedType(const IR::Type *type);
45
54bool isMetadataType(const IR::Type *type);
55
60bool isHeaderType(const IR::Type *type);
61
69bool isPrimitiveType(const IR::Type *type);
70
78bool isMetadataReference(const LinearPath &path, P4::TypeMap *typeMap);
79
87bool isHeaderReference(const LinearPath &path, P4::TypeMap *typeMap);
88
95bool isPrimitiveReference(const LinearPath &path, P4::TypeMap *typeMap);
96
101bool isPrimitiveFieldReference(const LinearPath &path, P4::TypeMap *typeMap);
102
109bool isSubobjectOfParameter(const LinearPath &path, P4::ReferenceMap *refMap);
110
115const IR::Parameter *getContainingParameter(const LinearPath &path, P4::ReferenceMap *refMap);
116
117} // namespace BFN
118
119#endif /* BF_P4C_MIDEND_TYPE_CATEGORIES_H_ */
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
Definition typeMap.h:41
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21
bool isPrimitiveType(const IR::Type *type)
Definition midend/type_categories.cpp:63
bool isPrimitiveFieldReference(const LinearPath &path, P4::TypeMap *typeMap)
Definition midend/type_categories.cpp:116
const IR::Parameter * getContainingParameter(const LinearPath &path, P4::ReferenceMap *refMap)
Definition midend/type_categories.cpp:131
bool isHeaderReference(const LinearPath &path, P4::TypeMap *typeMap)
Definition midend/type_categories.cpp:92
bool isMetadataReference(const LinearPath &path, P4::TypeMap *typeMap)
Definition midend/type_categories.cpp:70
bool isMetadataType(const IR::Type *type)
Definition midend/type_categories.cpp:49
bool isSubobjectOfParameter(const LinearPath &path, P4::ReferenceMap *refMap)
Definition midend/type_categories.cpp:127
bool isPrimitiveReference(const LinearPath &path, P4::TypeMap *typeMap)
Definition midend/type_categories.cpp:109
bool isIntrinsicMetadataType(const IR::Type *type)
Definition midend/type_categories.cpp:29
bool isHeaderType(const IR::Type *type)
Definition midend/type_categories.cpp:56
bool isCompilerGeneratedType(const IR::Type *type)
Definition midend/type_categories.cpp:39
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24