P4C
The P4 Compiler
Loading...
Searching...
No Matches
collect_global_pragma.h
1
19#ifndef BACKENDS_TOFINO_BF_P4C_COMMON_PRAGMA_COLLECT_GLOBAL_PRAGMA_H_
20#define BACKENDS_TOFINO_BF_P4C_COMMON_PRAGMA_COLLECT_GLOBAL_PRAGMA_H_
21
22#include <vector>
23
24#include "ir/ir.h"
25
26using namespace P4;
30 std::vector<const IR::Annotation *> global_pragmas_;
31
34 cstring getStructFieldName(const IR::StructField *) const;
35
38 bool preorder(const IR::Annotation *) override;
39
47 bool preorder(const IR::StructField *) override;
48
49 public:
50 const std::vector<const IR::Annotation *> &global_pragmas() const { return global_pragmas_; }
51
53 static const std::vector<std::string> *g_global_pragma_names;
54
56 const IR::Annotation *exists(const char *pragma_name) const;
57};
58
59#endif /* BACKENDS_TOFINO_BF_P4C_COMMON_PRAGMA_COLLECT_GLOBAL_PRAGMA_H_ */
Definition collect_global_pragma.h:28
const IR::Annotation * exists(const char *pragma_name) const
Check if pragma exists.
Definition collect_global_pragma.cpp:120
static const std::vector< std::string > * g_global_pragma_names
Vector of all PHV pragmas recognized by the backend.
Definition collect_global_pragma.h:27
Definition visitor.h:400
Definition cstring.h:85
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24