32#ifndef BACKENDS_TOFINO_BF_P4C_MIDEND_DROP_PACKET_WITH_MIRROR_ENGINE_H_
33#define BACKENDS_TOFINO_BF_P4C_MIDEND_DROP_PACKET_WITH_MIRROR_ENGINE_H_
35#include "bf-p4c/common/pragma/all_pragmas.h"
36#include "bf-p4c/common/pragma/collect_global_pragma.h"
37#include "bf-p4c/common/pragma/pragma.h"
38#include "bf-p4c/device.h"
39#include "frontends/common/resolveReferences/resolveReferences.h"
41#include "type_checker.h"
62 std::set<cstring> unique_names;
66 const IR::Node *preorder(IR::P4Program *p)
override {
68 if (BackendOptions().arch ==
"v1model" || BackendOptions().arch ==
"psa") prune();
71 p->apply(collect_pragma);
73 if (collect_pragma.
exists(PragmaDisableI2EReservedDropImplementation::name)) prune();
77 const IR::Node *preorder(IR::Declaration_Instance *)
override;
78 const IR::Node *postorder(IR::BFN::TnaDeparser *)
override;
79 const IR::Node *preorder(IR::BFN::TnaParser *parser)
override {
84 profile_t init_apply(
const IR::Node *root)
override {
return Transform::init_apply(root); }
93 return Device::currentDevice() == Device::TOFINO ||
94 Device::currentDevice() == Device::JBAY;
100 setName(
"DropPacketWithMirrorEngine");
Definition drop_packet_with_mirror_engine.h:60
Definition drop_packet_with_mirror_engine.h:87
Definition collect_global_pragma.h:28
const IR::Annotation * exists(const char *pragma_name) const
Check if pragma exists.
Definition collect_global_pragma.cpp:121
Definition typeChecker.h:620
Definition typeChecker.h:32
Definition ir/pass_manager.h:172
Definition ir/pass_manager.h:40
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
Definition resolveReferences.h:123
Definition typeChecker.h:483
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21