P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::P4Tools::P4Smith::ExpressionGenerator Class Reference
Inheritance diagram for P4::P4Tools::P4Smith::ExpressionGenerator:
[legend]

Public Member Functions

 ExpressionGenerator (const SmithTarget &target)
 
virtual std::vector< int > availableBitWidths () const
 
virtual bool checkInputArg (const IR::Parameter *param)
 
virtual IR::Expression * constructBitExpr (const IR::Type_Bits *tb)
 
virtual IR::Expression * constructBooleanExpr ()
 
IR::Expression * constructIntExpr ()
 
virtual IR::Expression * constructStructExpr (const IR::Type_Name *tn)
 
const IR::Type_Bits * genBitType (bool isSigned) const
 
virtual IR::Expression * genExpression (const IR::Type *tp)
 
virtual IR::ListExpression * genExpressionList (IR::Vector< IR::Type > types, bool only_lval)
 
virtual IR::MethodCallExpression * genFunctionCall (cstring method_name, IR::ParameterList params)
 
virtual IR::Expression * genInputArg (const IR::Parameter *param)
 
virtual IR::Expression * pickBitVar (const IR::Type_Bits *tb)
 
virtual IR::MethodCallExpression * pickFunction (IR::IndexedVector< IR::Declaration > viable_functions, const IR::Type **ret_type)
 
virtual IR::Expression * pickLvalOrSlice (const IR::Type *tp)
 
const IR::Type * pickRndBaseType (const std::vector< int64_t > &type_probs) const
 
virtual const IR::Type * pickRndType (TyperefProbs type_probs)
 
- Public Member Functions inherited from P4::P4Tools::P4Smith::Generator
 Generator (const SmithTarget &target)
 
const SmithTargettarget ()
 

Static Public Member Functions

static IR::Constant * genBitLiteral (const IR::Type *tb)
 
static IR::BoolLiteral * genBoolLiteral ()
 
static const IR::Type_Boolean * genBoolType ()
 
static IR::Constant * genIntLiteral (size_t bit_width=INTEGER_WIDTH)
 
static const IR::Type_InfInt * genIntType ()
 

Static Public Attributes

static constexpr size_t MAX_DEPTH = 3