P4C
The P4 Compiler
Loading...
Searching...
No Matches
remove_select_booleans.h
1
54#ifndef BF_P4C_MIDEND_REMOVE_SELECT_BOOLEANS_H_
55#define BF_P4C_MIDEND_REMOVE_SELECT_BOOLEANS_H_
56
57#include "bf-p4c/midend/elim_cast.h"
58#include "frontends/p4/typeMap.h"
59#include "ir/ir.h"
60#include "midend/removeSelectBooleans.h"
61
62namespace BFN {
63
65 public:
67 addPasses({
68 new P4::ClearTypeMap(typeMap),
69 new BFN::TypeChecking(refMap, typeMap, true),
70 new P4::RemoveSelectBooleans(typeMap),
71 new BFN::TypeChecking(refMap, typeMap, true),
73 // RewriteCastToReinterpretCast might change some of the Type_Bits
74 // to different objects representing the same type =>
75 // rerun typechecking with empty typemap to properly
76 // unify those new types
77 new P4::ClearTypeMap(typeMap),
78 new BFN::TypeChecking(refMap, typeMap, true),
79 });
80 }
81};
82
83} // namespace BFN
84
85#endif /* BF_P4C_MIDEND_REMOVE_SELECT_BOOLEANS_H_ */
Definition typeChecker.h:32
Definition ir/pass_manager.h:40
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
Definition removeSelectBooleans.h:48
Definition typeChecker.h:55
Definition typeMap.h:41
Pass that converts some of the IR::Casts to ReinterpretCasts.
Definition elim_cast.h:114
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21