P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::DPDK::BranchingInstructionGeneration Class Reference

Public Member Functions

 BranchingInstructionGeneration (P4::ReferenceMap *refMap, P4::TypeMap *typeMap)
 
bool generate (const IR::Expression *, cstring, cstring, bool)
 

Public Attributes

IR::IndexedVector< IR::DpdkAsmStatement > instructions
 

Member Function Documentation

◆ generate()

bool P4::DPDK::BranchingInstructionGeneration::generate ( const IR::Expression * expr,
cstring true_label,
cstring false_label,
bool is_and )

This recursion requires the pass of ConvertLogicalExpression. This pass will transform the logical experssion to a form that this function use as presumption. The presumption of this function is that the left side of the logical expression can be a simple expression(expression that is not LAnd or LOr) or a nested expression(LAnd or LOr). The right side can be a nested expression or {simple one if left side is simple as well}.