45#ifndef BF_P4C_MIDEND_ELIM_CAST_H_
46#define BF_P4C_MIDEND_ELIM_CAST_H_
48#include "bf-p4c/midend/type_checker.h"
49#include "frontends/p4/simplify.h"
50#include "frontends/p4/strengthReduction.h"
51#include "frontends/p4/typeMap.h"
65 const IR::Node *preorder(IR::KeyElement *n)
final {
76 static constexpr int MAX_CONTAINER_SIZE = 32;
79 const IR::Node *preorder(IR::Cast *cast)
override;
85 const IR::Node* preorder(IR::Function* func)
override {
95 const IR::Node *preorder(IR::SelectExpression *expr)
override {
119 const IR::Node *preorder(IR::Cast *expression)
override;
138 const IR::Node *preorder(IR::Cast *expression)
override;
159 const IR::Node *preorder(IR::Cast *expression)
override;
176 const IR::Node *preorder(IR::Cast *expression)
override;
187 const IR::Node *preorder(IR::Function *func)
override {
193 const IR::Node *preorder(IR::BFN::TnaDeparser *dprsr)
override {
198 const IR::BlockStatement *preorder(IR::BlockStatement *blk)
override {
199 if (blk->getAnnotation(
"in_hash"_cs)) prune();
202 const IR::Node *preorder(IR::AssignmentStatement *stmt)
override;
203 const IR::Node *postorder(IR::AssignmentStatement *stmt)
override;
204 const IR::Node *preorder(IR::IfStatement *stmt)
override;
205 const IR::Node *preorder(IR::Equ *eq)
override;
206 const IR::Node *preorder(IR::Neq *ne)
override;
Definition typeChecker.h:32
Definition strengthReduction.h:47
Definition ir/pass_manager.h:40
Definition ir/pass_manager.h:145
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
Definition strengthReduction.h:119
Definition typeChecker.h:55
Top level PassManager that simplifies complex expression with multiple casts into simpler expression ...
Definition elim_cast.h:225
Definition elim_cast.h:74
Pass that converts some of the IR::Casts to ReinterpretCasts.
Definition elim_cast.h:114
Pass that replaces concat ++ operations with multiple operations on slices in the contexts.
Definition elim_cast.h:184
Pass that removes nested casts when applicable.
Definition elim_cast.h:156
Pass that moves the cast on binary operation to each operand.
Definition elim_cast.h:173
Pass that removes some of the redundant casts.
Definition elim_cast.h:135
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21