![]() |
P4C
The P4 Compiler
|
Public Member Functions | |
| StrengthReductionPolicy (bool enableSubConstToAddTransform, bool enableNarrowingCastToSliceTransform) | |
Public Attributes | |
| bool | enableNarrowingCastToSliceTransform = false |
| bool | enableSubConstToAddTransform = true |
| bool P4::StrengthReductionPolicy::enableNarrowingCastToSliceTransform = false |
Replace narrowing casts with slices. i.e. replaces (bit<n>)(expr) with expr[n-1:0] when n is smaller than the width of expr.
| bool P4::StrengthReductionPolicy::enableSubConstToAddTransform = true |
Enable the subtract constant to add negative constant transform. Replaces a - constant with a + (-constant).