
Public Member Functions | |
| ArithmeticFixup (P4::TypeMap *typeMap) | |
| const IR::Expression * | fix (const IR::Expression *expr, const IR::Type_Bits *type) |
| const IR::Node * | postorder (IR::Cast *expression) override |
| const IR::Node * | postorder (IR::Cmpl *expression) override |
| const IR::Node * | postorder (IR::Expression *expression) override |
| const IR::Node * | postorder (IR::Neg *expression) override |
| const IR::Node * | postorder (IR::Operation_Binary *expression) override |
| const IR::Node * | updateType (const IR::Expression *expression) |
Inserts casts and narrowing operations to implement correctly the semantics of P4-16 arithmetic on top of unbounded precision arithmetic. For example, in P4-16 adding two 32-bit values should produce a 32-bit value, but using unbounded arithmetic, as in BMv2, it could produce a 33-bit value.