PandA-2024.02
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes
tree_helper Class Reference

This class collects some utility functions used to extract information from tree-based data structures. More...

#include <tree_helper.hpp>

Public Member Functions

 tree_helper ()
 Constructor. More...
 
 ~tree_helper ()
 Destructor. More...
 

Static Public Member Functions

static unsigned long long Size (const tree_nodeConstRef &tn)
 Return the size of a tree object. More...
 
static std::string GetTemplateTypeName (const tree_nodeConstRef &type)
 Return the name of template without parameters. More...
 
static std::string GetRecordTypeName (const tree_nodeConstRef &type)
 Return the name of the class. More...
 
static std::string name_function (const tree_managerConstRef &tm, const unsigned int index)
 Return the name of the function. More...
 
static std::string GetFunctionName (const tree_managerConstRef &TM, const tree_nodeConstRef &decl)
 Return the name of the function. More...
 
static std::tuple< std::string, unsigned int, unsigned int > GetSourcePath (const tree_nodeConstRef &node, bool &is_system)
 Return where a function or a type is defined. More...
 
static bool has_function_return (const tree_managerConstRef &tm, const unsigned int index)
 Return true if the function index returns a not void type, false otherwise. More...
 
static bool HasReturnType (const tree_managerConstRef &tm, const unsigned int index)
 Return true if the function index returns a not void type, false otherwise. More...
 
static std::string getFunctionTypeString (const tree_nodeRef &FT)
 Return a string describing the functino type. More...
 
static void get_used_variables (bool first_level_only, const tree_nodeConstRef &t, CustomUnorderedSet< unsigned int > &list_of_variable)
 Return the list of tree nodes associated with the variable used by the node t. More...
 
static bool look_for_binfo_inheritance (const binfo *b, const std::string &bcs)
 Look for inheritance of a class. More...
 
static tree_nodeRef find_obj_type_ref_function (const tree_nodeConstRef &tn)
 Given the tree_node of an obj_type_ref return the tree_node of the called function. More...
 
static std::set< tree_nodeConstRef, TreeNodeConstSorterGetTypesToBeDeclaredBefore (const tree_nodeConstRef &tn, const bool without_transformation)
 Return the types to be declared before declaring index type. More...
 
static std::set< tree_nodeConstRef, TreeNodeConstSorterGetTypesToBeDeclaredAfter (const tree_nodeConstRef &tn, const bool without_transformation)
 Return the types to be declared after declaring index type. More...
 
static unsigned int get_type_index (const tree_managerConstRef &TM, const unsigned int index, long long int &vec_size, bool &is_a_pointer, bool &is_a_function)
 Return the treenode index of the type of index. More...
 
static unsigned int get_type_index (const tree_managerConstRef &TM, const unsigned int index)
 Same as previous but with two parameters. More...
 
static tree_nodeConstRef GetFunctionReturnType (const tree_nodeConstRef &function, bool void_as_null=true)
 Return the return type of a function. More...
 
static unsigned int get_pointed_type (const tree_managerConstRef &TM, const unsigned int index)
 Return the tree_node index of the pointed type of a pointer object;. More...
 
static tree_nodeConstRef CGetPointedType (const tree_nodeConstRef &pointer)
 Return the pointed type of a pointer object. More...
 
static unsigned int GetElements (const tree_managerConstRef &TM, const unsigned int index)
 Given an array or a vector return the element type. More...
 
static tree_nodeConstRef CGetElements (const tree_nodeConstRef &type)
 Given an array or a vector return the element type. More...
 
static bool IsSameType (const tree_nodeConstRef &tn0, const tree_nodeConstRef &tn1)
 Given two nodes tells if they have same base type (const is not considered: const double == double) More...
 
static std::string get_type_name (const tree_managerConstRef &TM, const unsigned int index)
 Return name of the type. More...
 
static std::string GetTypeName (const tree_nodeConstRef &type)
 Return name of the type. More...
 
static void get_parameter_types (const tree_managerConstRef &TM, const unsigned int index, std::list< unsigned int > &params)
 Return the tree node of parameter types. More...
 
static std::vector< tree_nodeConstRefGetParameterTypes (const tree_nodeConstRef &ftype)
 Return the tree node of parameter types. More...
 
static std::vector< tree_nodeConstRefCGetFieldTypes (const tree_nodeConstRef &type)
 Return the fields type of a variable of type struct. More...
 
static unsigned int get_field_idx (const tree_managerConstRef &TM, const unsigned int index, unsigned int idx)
 Return the idx element of the fields declared in an union or a record type. More...
 
static tree_nodeRef GetFieldIdx (const tree_nodeConstRef &type, unsigned int idx)
 Return the element of the fields declared in an union or a record type. More...
 
static tree_nodeConstRef CGetType (const tree_nodeConstRef &node)
 Return the treenode of the type of node. More...
 
static bool is_system (const tree_managerConstRef &TM, const unsigned int index)
 Return true if variable or type is a system one. More...
 
static bool IsSystemType (const tree_nodeConstRef &type)
 Return true if variable or type is a system one. More...
 
static bool IsInLibbambu (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the decl node or type is in libbambu. More...
 
static bool IsInLibbambu (const tree_nodeConstRef &type)
 Return true if the decl node or type is in libbambu. More...
 
static bool is_an_enum (const tree_managerConstRef &TM, const unsigned int index)
 Return if treenode index is an enumeral type. More...
 
static bool IsEnumType (const tree_nodeConstRef &type)
 Return if treenode index is an enumeral type. More...
 
static bool is_a_struct (const tree_managerConstRef &TM, const unsigned int index)
 Return if treenode index is a record. More...
 
static bool IsStructType (const tree_nodeConstRef &type)
 Return true if treenode is a record. More...
 
static bool is_an_union (const tree_managerConstRef &TM, const unsigned int index)
 Return if treenode index is an union. More...
 
static bool IsUnionType (const tree_nodeConstRef &type)
 Return if treenode is an union. More...
 
static bool is_a_complex (const tree_managerConstRef &TM, const unsigned int index)
 Return if treenode index is a complex. More...
 
static bool IsComplexType (const tree_nodeConstRef &type)
 Return if treenode is a complex. More...
 
static bool is_an_array (const tree_managerConstRef &TM, const unsigned int index)
 Return if treenode index is an array or it is equivalent to an array (record recursively having a single field ending into a single arrays) More...
 
static bool IsArrayEquivType (const tree_nodeConstRef &type)
 Return true if treenode is an array or it is equivalent to an array (record recursively having a single field ending into a single arrays) More...
 
static bool IsArrayType (const tree_nodeConstRef &type)
 Return true if treenode is an array. More...
 
static tree_nodeConstRef CGetArrayBaseType (const tree_nodeConstRef &type)
 
static bool is_a_pointer (const tree_managerConstRef &TM, const unsigned int index)
 Return if treenode index is a pointer. More...
 
static bool IsPointerType (const tree_nodeConstRef &type)
 Return true if treenode index is a pointer. More...
 
static bool is_a_function (const tree_managerConstRef &TM, const unsigned int index)
 Return if treenode index is a function_decl. More...
 
static bool IsFunctionDeclaration (const tree_nodeConstRef &type)
 Return true if treenode is a function_decl. More...
 
static bool is_a_vector (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode index is a vector. More...
 
static bool IsVectorType (const tree_nodeConstRef &type)
 Return true if the treenode is a vector. More...
 
static bool is_a_misaligned_vector (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode index is a a misaligned access to a vector data object. More...
 
static bool is_an_addr_expr (const tree_managerConstRef &TM, const unsigned int index)
 Return if treenode index is an address expression. More...
 
static bool HasToBeDeclared (const tree_managerConstRef &TM, const tree_nodeConstRef &type)
 Return true if the type has to be declared. More...
 
static bool is_const_type (const tree_managerConstRef &TM, const unsigned int index)
 Return if the treenode is of const type. More...
 
static bool IsConstType (const tree_nodeConstRef &type)
 Return true if the treenode is of const type. More...
 
static bool is_bool (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode is of bool type. More...
 
static bool IsBooleanType (const tree_nodeConstRef &type)
 Return true if the treenode is of bool type. More...
 
static bool is_a_void (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode is of void type. More...
 
static bool IsVoidType (const tree_nodeConstRef &type)
 Return true if the treenode is of void type. More...
 
static bool is_natural (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode is a ssa_name greater or equal to zero. More...
 
static bool IsPositiveIntegerValue (const tree_nodeConstRef &type)
 Return true if the treenode is a ssa_name greater or equal to zero. More...
 
static bool is_int (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode is of integer type. More...
 
static bool IsSignedIntegerType (const tree_nodeConstRef &type)
 Return true if the treenode is of integer type. More...
 
static bool is_real (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode is of real type. More...
 
static bool IsRealType (const tree_nodeConstRef &type)
 Return true if the treenode is of real type. More...
 
static bool is_unsigned (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode is of unsigned integer type. More...
 
static bool IsUnsignedIntegerType (const tree_nodeConstRef &type)
 Return true if the treenode is of unsigned integer type. More...
 
static bool is_scalar (const tree_managerConstRef &TM, const unsigned int var)
 Return true if the treenode is an int, an unsigned, a real or a Boolean data type. More...
 
static bool IsScalarType (const tree_nodeConstRef &type)
 Return true if the treenode is an int, an unsigned, a real or a Boolean data type. More...
 
static bool is_a_variable (const tree_managerConstRef &TM, const unsigned int index)
 FIXME: to be remove after substitution with IsVariableType. More...
 
static bool IsVariableType (const tree_nodeConstRef &node)
 Return true if the treenode is a valid variable. More...
 
static bool is_static (const tree_managerConstRef &TM, const unsigned int index)
 FIXME: to be remove after substitution with IsStaticDeclaration. More...
 
static bool IsStaticDeclaration (const tree_nodeConstRef &decl)
 
static bool is_extern (const tree_managerConstRef &TM, const unsigned int index)
 FIXME: to be remove after substitution with IsExternDeclaration. More...
 
static bool IsExternDeclaration (const tree_nodeConstRef &decl)
 
static bool is_function_type (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode is of type function type. More...
 
static bool IsFunctionType (const tree_nodeConstRef &type)
 Return true if the treenode is of type function type. More...
 
static bool is_function_pointer_type (const tree_managerConstRef &TM, const unsigned int index)
 Return true if the treenode is of type function pointer type. More...
 
static bool IsFunctionPointerType (const tree_nodeConstRef &type)
 Return true if the treenode is of type function pointer type. More...
 
static unsigned int get_base_index (const tree_managerConstRef &TM, const unsigned int index)
 Retrun the base address of a memory access. More...
 
static tree_nodeConstRef GetBaseVariable (const tree_nodeConstRef &mem)
 Retrun the base variable of a memory access. More...
 
static bool is_fully_resolved (const tree_managerConstRef &TM, const unsigned int index, CustomOrderedSet< unsigned int > &res_set)
 FIXME: to be remove after substitution with IsPointerResolved. More...
 
static bool IsPointerResolved (const tree_nodeConstRef &ptr, CustomOrderedSet< unsigned int > &res_set)
 
static std::string return_qualifier_prefix (const TreeVocabularyTokenTypes_TokenEnum quals)
 return the prefix given a qualifier More...
 
static std::string return_C_qualifiers (const TreeVocabularyTokenTypes_TokenEnum quals, bool real_const)
 return the qualifiers in C format More...
 
static bool is_ssa_name (const tree_managerConstRef &TM, const unsigned int index)
 Return true in case index is a ssa_name. More...
 
static bool is_volatile (const tree_managerConstRef &TM, const unsigned int index)
 return true in case the index corresponds to a volatile variable More...
 
static bool IsVolatile (const tree_nodeConstRef &tn)
 return true in case the tree node corresponds to a volatile variable More...
 
static bool is_parameter (const tree_managerConstRef &TM, const unsigned int index)
 return true in case the index corresponds to a parameter in ssa form or not More...
 
static bool is_virtual (const tree_managerConstRef &TM, const unsigned int index)
 return true in case the ssa_name is virtual More...
 
static integer_cst_t get_integer_cst_value (const integer_cst *ic)
 Convert a integer_cst in a long long value. More...
 
static integer_cst_t GetConstValue (const tree_nodeConstRef &tn, bool is_signed=true)
 Get value from integer constant. More...
 
static unsigned int get_array_var (const tree_managerConstRef &TM, const unsigned int index, bool is_written, bool &two_dim_p)
 Return the tree node index of the array variable written or read. More...
 
static unsigned long long get_array_data_bitsize (const tree_managerConstRef &TM, const unsigned int index)
 Return the size (in bits) of the base element of the array. More...
 
static unsigned long long GetArrayElementSize (const tree_nodeConstRef &node)
 Return the size (in bits) of the base element of the array. More...
 
static void get_array_dimensions (const tree_managerConstRef &TM, const unsigned int index, std::vector< unsigned long long > &dims)
 Return the dimension of the array. More...
 
static std::vector< unsigned long long > GetArrayDimensions (const tree_nodeConstRef &node)
 Return the dimension of the array. More...
 
static void get_array_dim_and_bitsize (const tree_managerConstRef &TM, const unsigned int index, std::vector< unsigned long long > &dims, unsigned long long &elts_bitsize)
 Return the dimension of the array. More...
 
static unsigned long long get_array_num_elements (const tree_managerConstRef &TM, const unsigned int index)
 Return the total number of elements of the the base type in the array. More...
 
static unsigned long long GetArrayTotalSize (const tree_nodeConstRef &node)
 Return the total number of elements of the the base type in the array. More...
 
static void extract_array_indexes (const tree_managerConstRef &TM, const unsigned int index, std::vector< unsigned long long > &indexes, std::vector< unsigned long long > &size_indexes, unsigned int &base_object)
 Return the indexes of the array_ref. More...
 
static bool is_concat_bit_ior_expr (const tree_managerConstRef &TM, const unsigned int index)
 check if a given tree node is a concatenation operation More...
 
static bool is_simple_pointer_plus_test (const tree_managerConstRef &TM, const unsigned int index)
 check if a given tree node is a simple pointer plus expression More...
 
static bool is_constant (const tree_managerConstRef &TM, const unsigned int index)
 Return if a tree node is a constant object. More...
 
static bool IsConstant (const tree_nodeConstRef &node)
 Return if a tree node is a constant object. More...
 
static std::string op_symbol (const tree_nodeConstRef &op)
 Function return the symbol related with the operator op passed as parameter. More...
 
static std::string op_symbol (const tree_node *op)
 Function return the symbol related with the operator op passed as parameter. More...
 
static unsigned int GetUnqualified (const tree_managerConstRef &TM, unsigned int type)
 Return the unqualified version of a type. More...
 
static tree_nodeConstRef GetUnqualifiedType (const tree_nodeConstRef &type)
 Return the unqualified version of a type. More...
 
static unsigned int GetRealType (const tree_managerConstRef &TM, unsigned int index)
 Return the real type. More...
 
static tree_nodeConstRef GetRealType (const tree_nodeConstRef &type)
 Return the real type (same as GetUnqualifiedType, but return type instead of nullptr) More...
 
static bool IsAligned (const tree_managerConstRef &TM, unsigned int type)
 Return true if type has not default alignment. More...
 
static bool IsAligned (const tree_nodeConstRef &tn)
 
static unsigned int get_var_alignment (const tree_managerConstRef &TM, unsigned int var)
 Return the var alignment. More...
 
static std::string NormalizeTypename (const std::string &id)
 Return normalized name of types and variables. More...
 
static std::string GetMangledFunctionName (const function_decl *fd)
 Return the mangled function name. More...
 
static std::string print_function_name (const tree_managerConstRef &TM, const function_decl *fd)
 Return the name of the function in a string. More...
 
static std::string print_type (const tree_managerConstRef &TM, unsigned int type, bool global=false, bool print_qualifiers=false, bool print_storage=false, unsigned int var=0, const var_pp_functorConstRef &vppf=var_pp_functorConstRef(), const std::string &prefix="", const std::string &tail="")
 Print a type and its variable in case var is not zero. More...
 
static std::string PrintType (const tree_managerConstRef &TM, const tree_nodeConstRef &type, bool global=false, bool print_qualifiers=false, bool print_storage=false, const tree_nodeConstRef &var=nullptr, const var_pp_functorConstRef &vppf=var_pp_functorConstRef(), const std::string &prefix="", const std::string &tail="")
 Print a type and its variable in case var is not zero. More...
 
static unsigned int get_formal_ith (const tree_managerConstRef &TM, unsigned int index_obj, unsigned int parm_index)
 return the type of the ith formal parameter in case index_obj is a call_expr More...
 
static tree_nodeConstRef GetFormalIth (const tree_nodeConstRef &obj, unsigned int parm_index)
 Return the type of the ith formal parameter in case index_obj is a call_expr. More...
 
static bool is_packed (const tree_managerConstRef &TreeM, unsigned int node_index)
 FIXME: to be remove after substitution with IsPackedType. More...
 
static bool IsPackedType (const tree_nodeConstRef &type)
 
static bool is_packed_access (const tree_managerConstRef &TreeM, unsigned int node_index)
 Check if the access is on a packed data structure or not. More...
 
static unsigned long long AccessedMaximumBitsize (const tree_nodeConstRef &type_node, unsigned long long bitsize)
 return the maximum bitsize associated with the elements accessible through type_node More...
 
static unsigned long long AccessedMinimunBitsize (const tree_nodeConstRef &type_node, unsigned long long bitsize)
 return the minimum bitsize associated with the elements accessible through type_node More...
 
static size_t AllocatedMemorySize (const tree_nodeConstRef &parameter)
 Compute the memory (in bytes) to be allocated to store a parameter or a variable. More...
 
static size_t CountPointers (const tree_nodeConstRef &)
 Computes how many pointers are included in a tree node. More...
 
static unsigned int get_multi_way_if_pos (const tree_managerConstRef &TM, unsigned int node_id, unsigned int cond)
 return the position of con in the gimple_multi_way_if conditions More...
 
static void compute_ssa_uses_rec_ptr (const tree_nodeConstRef &tn, CustomOrderedSet< const ssa_name *> &ssa_uses)
 recursively compute the pointers to the ssa_name variables used in a statement More...
 
static TreeNodeMap< size_tComputeSsaUses (const tree_nodeRef &tn)
 recursively compute the references to the ssa_name variables used in a statement More...
 
static bool is_a_nop_function_decl (const function_decl *fd)
 
static void get_required_values (std::vector< std::tuple< unsigned int, unsigned int >> &required, const tree_nodeRef &tn)
 
static bool LastStatement (const tree_nodeConstRef &statement)
 Return true if statement must be the last of a basic block. More...
 
static size_t GetFunctionSize (const tree_managerConstRef &TM, const unsigned int function_index)
 Return the number of statement + the number of phi in the function. More...
 
static std::string get_asm_string (const tree_managerConstRef &TM, const unsigned int node_index)
 return the string associated with the gimple_asm More...
 
static bool IsStore (const tree_nodeConstRef &tn, const CustomOrderedSet< unsigned int > &fun_mem_data)
 Return true if the tree node is a gimple_assign writing something which will be allocated in memory. More...
 
static bool IsLoad (const tree_nodeConstRef &tn, const CustomOrderedSet< unsigned int > &fun_mem_data)
 Return true if the tree node is a gimple_assign reading something which will be allocated in memory. More...
 
static bool IsLut (const tree_nodeConstRef &tn)
 Return true in case the right operation is a lut_expr. More...
 
static bool has_omp_simd (const statement_list *sl)
 Check if omp simd pragmas are present in given statement list. More...
 
SystemC related functions
static bool is_module (const tree_managerConstRef &TM, unsigned int index)
 This function test if a given index is a SystemC module. More...
 
static bool is_channel (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index is a SystemC channel. More...
 
static bool is_builtin_channel (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index is a SystemC builtin channel. More...
 
static bool is_signal (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index is a SystemC sc_signal. More...
 
static bool is_port (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index is a SystemC port. More...
 
static bool is_in_port (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index is a SystemC input port. More...
 
static bool is_out_port (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index is a SystemC output port. More...
 
static bool is_inout_port (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index is a SystemC in-output port. More...
 
static bool is_event (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index is a SystemC event. More...
 
static bool is_clock (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index as parm is a SystemC sc_clock. More...
 
static bool is_SC_BIND_PROXY_NIL (const tree_managerConstRef &TM, const unsigned int index)
 This function test if a given index as parm is a SC_BIND_PROXY_NIL. More...
 

Static Public Attributes

static int debug_level = 0
 debug level (set by Parameter) More...
 

Static Private Member Functions

static void RecursiveGetTypesToBeDeclared (std::set< tree_nodeConstRef, TreeNodeConstSorter > &returned_types, const tree_nodeConstRef &type, const bool recursion, const bool without_transformation, const bool before)
 Return the types to be declared before/after declaring type. More...
 
static void ComputeSsaUses (const tree_nodeRef &, TreeNodeMap< size_t > &uses)
 recursively compute the references to the ssa_name variables used in a statement More...
 

Static Private Attributes

static const std::set< std::string > SC_tmpl_class
 store the set of SystemC class for which the type correspond to the template parameter More...
 
static const std::set< std::string > SC_builtin_scalar_type
 store the set of SystemC class for which the template parameter correspond to the bit size of the type More...
 
static const std::set< std::string > TLM_SC_builtin_scalar_type
 store the set of TLM SystemC class for which the size corresponds to the sum of the size of template parameters More...
 

Detailed Description

This class collects some utility functions used to extract information from tree-based data structures.

Definition at line 78 of file tree_helper.hpp.

Constructor & Destructor Documentation

◆ tree_helper()

tree_helper::tree_helper ( )
default

Constructor.

◆ ~tree_helper()

tree_helper::~tree_helper ( )
default

Destructor.

Member Function Documentation

◆ AccessedMaximumBitsize()

unsigned long long tree_helper::AccessedMaximumBitsize ( const tree_nodeConstRef type_node,
unsigned long long  bitsize 
)
static

◆ AccessedMinimunBitsize()

unsigned long long tree_helper::AccessedMinimunBitsize ( const tree_nodeConstRef type_node,
unsigned long long  bitsize 
)
static

return the minimum bitsize associated with the elements accessible through type_node

it is composed by two identical parts

Definition at line 6799 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_CST_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_UNARY_EXPRESSION, CGetType(), GET_CONST_NODE, tree_node::get_kind(), tree_node::get_kind_text(), min, Size(), THROW_ERROR, test_panda::type, and type_node.

Referenced by mem_dominator_allocation::InternalExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AllocatedMemorySize()

size_t tree_helper::AllocatedMemorySize ( const tree_nodeConstRef parameter)
static

Compute the memory (in bytes) to be allocated to store a parameter or a variable.

Parameters
parameteris the actual parameter

Note that this part can not be transfromed in recursion because size of array ref corresponds to the size of the element itself

This call check if we can perform deep copy of the single element

Round to upper multiple word size

This calls check if we can perform deep copy of the single element

Round to upper multiple word size

Round to upper multiple word size

Definition at line 6927 of file tree_helper.cpp.

References CASE_CPP_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, CGetPointedType(), CGetType(), debug_level, DEBUG_LEVEL_PARANOIC, GET_CONST_NODE, tree_node::get_kind(), tree_node::get_kind_text(), GET_NODE, INDENT_DBG_MEX, IsPointerType(), Size(), STR, THROW_ERROR, THROW_UNREACHABLE, and tree_node::ToString().

Here is the call graph for this function:

◆ CGetArrayBaseType()

tree_nodeConstRef tree_helper::CGetArrayBaseType ( const tree_nodeConstRef type)
static
Parameters
typeis the treenode
Returns
the basetype of the array in case it is an array

Definition at line 2470 of file tree_helper.cpp.

References CGetType(), getBuiltinFieldTypes(), and THROW_ASSERT.

Referenced by InterfaceInfer::interface_info::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CGetElements()

tree_nodeConstRef tree_helper::CGetElements ( const tree_nodeConstRef type)
static

◆ CGetFieldTypes()

std::vector< tree_nodeConstRef > tree_helper::CGetFieldTypes ( const tree_nodeConstRef type)
static

Return the fields type of a variable of type struct.

Parameters
typeis the struct type

Definition at line 2106 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, THROW_UNREACHABLE, and test_panda::type.

Referenced by MemoryInitializationWriterBase::GoDown(), MemoryInitializationWriterBase::GoNext(), MemoryInitializationWriterBase::GoUp(), and RecursiveGetTypesToBeDeclared().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CGetPointedType()

tree_nodeConstRef tree_helper::CGetPointedType ( const tree_nodeConstRef pointer)
static

◆ CGetType()

tree_nodeConstRef tree_helper::CGetType ( const tree_nodeConstRef node)
static

Return the treenode of the type of node.

Parameters
nodeis the treenode

Definition at line 2167 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_DECL_NODES, CASE_FAKE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, GET_CONST_NODE, tree_node::get_kind(), NODE_NOT_YET_SUPPORTED_EC, THROW_ASSERT, and THROW_ERROR_CODE.

Referenced by AccessedMaximumBitsize(), AccessedMinimunBitsize(), fu_binding::add_to_SM(), memory_allocation::allocate_parameters(), AllocatedMemorySize(), determine_memory_accesses::analyze_node(), CBackend::AnalyzeInclude(), PhiOpt::ApplyIfMerge(), PhiOpt::ApplyIfRemove(), PhiOpt::ApplyMultiMerge(), PhiOpt::ApplyMultiRemove(), IR_lowering::array_ref_lowering(), Bit_Value::backward(), Bit_Value::backward_chain(), operations_cfg_computation::build_operation_recursive(), minimal_interface::build_wrapper(), HWCallInjection::buildBuiltinCall(), AllocationInformation::can_be_asynchronous_ram(), CGetArrayBaseType(), CGetFieldTypes(), InterfaceInfer::ChasePointerInterfaceRecurse(), lut_transformation::CHECK_BIN_EXPR_BOOL_SIZE(), lut_transformation::CHECK_BIN_EXPR_INT_SIZE(), lut_transformation::CHECK_COND_EXPR_SIZE(), lut_transformation::CHECK_NOT_EXPR_SIZE(), simple_code_motion::CheckMovable(), Vectorize::ClassifyTreeNode(), memory::compute_next_base_address(), CreateAddressTranslation::ComputeAddress(), CountPointers(), mux_connection_binding::create_connections(), tree_manipulation::create_gimple_call(), short_circuit_taf::create_gimple_cond(), tree_manipulation::create_gimple_cond(), tree_manipulation::create_gimple_modify_stmt(), tree_manipulation::create_phi_node(), tree_manipulation::create_ternary_operation(), tree_manipulation::CreateAddrExpr(), tree_manipulation::CreateCallExpr(), CWriter::DeclareVariable(), vcd_utility::detect_fixed_address_mismatch(), mux_connection_binding::determine_connection(), IR_lowering::division_by_a_constant(), BitValueIPA::Exec(), CreateAddressTranslation::Exec(), InterfaceInfer::Exec(), IR_lowering::expand_mult_const(), tree_manipulation::ExtractCondition(), fu_binding::fill_array_ref_memory(), memory_allocation::finalize_memory_allocation(), Vectorize::FixPhis(), Bit_Value::forward(), Bit_Value::forward_transfer(), TestbenchGeneration::generate_init_file(), soft_float_cg_ext::generate_interface(), get_array_dim_and_bitsize(), HLS_manager::get_constant_string(), AllocationInformation::get_correction_time(), get_type_index(), get_type_name(), GetArrayElementSize(), getBuiltinFieldTypes(), AllocationInformation::GetCondExprTimeLatency(), GetFormalIth(), AllocationInformation::GetNodeTypePrec(), GetParameterTypes(), ComputeReservedMemory::GetReservedBytes(), GimpleWriter::GimpleWriter(), CSE::has_memory_access(), CSE::hash_check(), PhiOpt::IdentifyPattern(), BitLatticeManipulator::inf(), Bit_Value::initialize(), parm_decl_taken_address_fix::InternalExec(), FixStructsPassedByValue::InternalExec(), BuiltinWaitCallModuleGenerator::InternalExec(), BuiltinWaitCallNModuleGenerator::InternalExec(), SerializeMutualExclusions::InternalExec(), SwitchFix::InternalExec(), extract_patterns::InternalExec(), BuildVirtualPhi::InternalExec(), mem_dominator_allocation::InternalExec(), rebuild_initialization::InternalExec(), fanout_opt::InternalExec(), compute_implicit_calls::InternalExec(), FunctionCallTypeCleanup::InternalExec(), CondExprRestructuring::InternalExec(), commutative_expr_restructuring::InternalExec(), dead_code_elimination::InternalExec(), CSE::InternalExec(), MultipleEntryIfReduction::InternalExec(), IR_lowering::InternalExec(), soft_float_cg_ext::InternalExec(), allocation::InternalExec(), is_a_misaligned_vector(), BehavioralHelper::is_named_pointer(), IsArrayEquivType(), IsArrayType(), IsBooleanType(), commutative_expr_restructuring::IsCommExprGimple(), IsComplexType(), IsConstType(), IsEnumType(), IsFunctionPointerType(), IsFunctionType(), BitLatticeManipulator::IsHandledByBitvalue(), IsLoad(), IsPointerType(), IsRealType(), IsSameType(), IsSignedIntegerType(), IsStore(), IsStructType(), IsUnionType(), IsUnsignedIntegerType(), IsVectorType(), IsVoidType(), IsVolatile(), dead_code_elimination::kill_uses(), rebuild_initialization2::look_for_ROMs(), MemoryInitializationWriterBase::MemoryInitializationWriterBase(), mux_connection_binding::object_bitsize(), type_casting::operator()(), Bit_Value_opt::optimize(), FunctionCallTypeCleanup::ParametersTypeCleanup(), vcd_utility::print_discrepancy(), BehavioralHelper::print_type_declaration(), TestbenchGeneration::print_var_init(), BehavioralHelper::PrintNode(), PrintType(), BehavioralHelper::PrintVarDeclaration(), lut_transformation::ProcessBasicBlock(), hls_div_cg_ext::recursive_examinate(), soft_float_cg_ext::RecursiveExaminate(), VarComputation::RecursivelyAnalyze(), compute_implicit_calls::replace_with_memcpy(), compute_implicit_calls::replace_with_memset(), InterfaceInfer::setReadInterface(), InterfaceInfer::setWriteInterface(), dead_code_eliminationIPA::signature_opt(), VcdSignalSelection::SingleStepPropagateAddrSsa(), Size(), fu_binding::specialise_fu(), BitLatticeManipulator::sup(), Vectorize::Transform(), InterfaceInfer::interface_info::update(), virtual_phi_nodes_split::virtual_split_phi(), fu_binding::write_init(), CWriter::WriteBuiltinWaitCall(), CBackend::writeIncludes(), HLSCWriter::WriteMainTestbench(), HLSCWriter::WriteParamDecl(), HLSCWriter::WriteParamInitialization(), and DiscrepancyAnalysisCWriter::writePostInstructionInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_ssa_uses_rec_ptr()

void tree_helper::compute_ssa_uses_rec_ptr ( const tree_nodeConstRef tn,
CustomOrderedSet< const ssa_name *> &  ssa_uses 
)
static

recursively compute the pointers to the ssa_name variables used in a statement

Parameters
tnis the statement
ssa_usesis the collection of ssa_name tn uses

var decl performs an assignment when init is not null

step and offset are constants

step and offset are constants

Definition at line 7519 of file tree_helper.cpp.

References test_panda::arg, CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, debug_level, DEBUG_LEVEL_PARANOIC, GET_CONST_NODE, tree_node::get_kind(), tree_node::get_kind_text(), GET_NODE, INDENT_DBG_MEX, THROW_UNREACHABLE, and tree_node::ToString().

Referenced by Schedule::CanBeMoved(), simple_code_motion::CheckMovable(), Schedule::ComputeCriticalPath(), simple_code_motion::InternalExec(), and Schedule::UpdateTime().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeSsaUses() [1/2]

void tree_helper::ComputeSsaUses ( const tree_nodeRef tn,
TreeNodeMap< size_t > &  uses 
)
staticprivate

◆ ComputeSsaUses() [2/2]

TreeNodeMap< size_t > tree_helper::ComputeSsaUses ( const tree_nodeRef tn)
static

recursively compute the references to the ssa_name variables used in a statement

Parameters
tnis the statement
Returns
the used ssa

Definition at line 7848 of file tree_helper.cpp.

References ComputeSsaUses().

Here is the call graph for this function:

◆ CountPointers()

size_t tree_helper::CountPointers ( const tree_nodeConstRef _tn)
static

Computes how many pointers are included in a tree node.

Parameters
tnis the tree ndoe to be considered
Returns
the number of pointers included in the tree node

Definition at line 7399 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_CST_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_UNARY_EXPRESSION, CGetType(), counter, GET_CONST_NODE, tree_node::get_kind(), GET_NODE, and THROW_UNREACHABLE.

Here is the call graph for this function:

◆ extract_array_indexes()

void tree_helper::extract_array_indexes ( const tree_managerConstRef TM,
const unsigned int  index,
std::vector< unsigned long long > &  indexes,
std::vector< unsigned long long > &  size_indexes,
unsigned int &  base_object 
)
static

Return the indexes of the array_ref.

Parameters
TMis the tree_manager
indexis the array_ref object
indexesreturn the index of the array_ref
size_indexesreturn the size of each index
base_objectis the base referenced object

Definition at line 5047 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, GET_INDEX_CONST_NODE, GetConstValue(), STR, and THROW_ASSERT.

Here is the call graph for this function:

◆ find_obj_type_ref_function()

tree_nodeRef tree_helper::find_obj_type_ref_function ( const tree_nodeConstRef tn)
static

Given the tree_node of an obj_type_ref return the tree_node of the called function.

Parameters
tnis the tree node of the obj_type_ref.
Returns
the tree_node of the called function

Definition at line 983 of file tree_helper.cpp.

References GET_CONST_NODE, GET_INDEX_CONST_NODE, GET_NODE, reference_type::refd, STR, THROW_ASSERT, THROW_ERROR, test_panda::type, and decl_node::type.

Referenced by operations_cfg_computation::build_operation_recursive(), CallGraphManager::call_graph_computation_recursive(), get_required_values(), dead_code_elimination::InternalExec(), and BehavioralHelper::PrintNode().

Here is the caller graph for this function:

◆ get_array_data_bitsize()

unsigned long long tree_helper::get_array_data_bitsize ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return the size (in bits) of the base element of the array.

Parameters
TMis the tree_manager
indexis the array objectFIXME: to be remove after substitution with GetArrayElementSize

Definition at line 4875 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and GetArrayElementSize().

Referenced by get_array_dim_and_bitsize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_array_dim_and_bitsize()

void tree_helper::get_array_dim_and_bitsize ( const tree_managerConstRef TM,
const unsigned int  index,
std::vector< unsigned long long > &  dims,
unsigned long long &  elts_bitsize 
)
static

Return the dimension of the array.

Parameters
TMis the tree_manager
indexis the array object
dimsreturn for each dimension the number of elements
elts_bitsizereturn the base type bitsizeFIXME: to be remove after substitution with GetArrayDimensions and GetArrayElementSize

Definition at line 4923 of file tree_helper.cpp.

References CGetType(), get_array_data_bitsize(), GET_CONST_NODE, GET_INDEX_CONST_NODE, tree_node::get_kind(), GET_NODE, tree_manager::get_tree_node_const(), GetConstValue(), max, Size(), STR, and THROW_ASSERT.

Referenced by AllocationInformation::can_be_asynchronous_ram(), BitLatticeManipulator::constructor_bitstring(), constructor_range(), fu_binding::fill_array_ref_memory(), rebuild_initialization2::look_for_ROMs(), and fu_binding::write_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_array_dimensions()

void tree_helper::get_array_dimensions ( const tree_managerConstRef TM,
const unsigned int  index,
std::vector< unsigned long long > &  dims 
)
static

Return the dimension of the array.

Parameters
TMis the tree_manager
indexis the array object
dimsreturn for each dimension the number of elementsFIXME: to be remove after substitution with GetArrayDimensions

Definition at line 4976 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and GetArrayDimensions().

Referenced by AllocationInformation::get_correction_time().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_array_num_elements()

unsigned long long tree_helper::get_array_num_elements ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return the total number of elements of the the base type in the array.

Parameters
TMis the tree_manager
indexis the array objectFIXME: to be remove after substitution with GetArrayTotalSize

Definition at line 5031 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and GetArrayTotalSize().

Here is the call graph for this function:

◆ get_array_var()

unsigned int tree_helper::get_array_var ( const tree_managerConstRef TM,
const unsigned int  index,
bool  is_written,
bool two_dim_p 
)
static

Return the tree node index of the array variable written or read.

Parameters
TMis the tree_manager
indexis the index of the gimple_assign
is_writtenis true when the array is written false otherwise
two_dim_pbecomes true when the array is two dimensional

Definition at line 4377 of file tree_helper.cpp.

References target_mem_ref::base, target_mem_ref461::base, GET_INDEX_CONST_NODE, GET_NODE, tree_manager::get_tree_node_const(), STR, target_mem_ref::symbol, THROW_ASSERT, and THROW_ERROR.

Here is the call graph for this function:

◆ get_asm_string()

std::string tree_helper::get_asm_string ( const tree_managerConstRef TM,
const unsigned int  node_index 
)
static

return the string associated with the gimple_asm

Parameters
TMis the tree manager
node_indexis the gimple_asm node id
Returns
the string associated with gimple_asm

Definition at line 8790 of file tree_helper.cpp.

References tree_manager::get_tree_node_const(), and THROW_ASSERT.

Referenced by BehavioralHelper::get_asm_string().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_base_index()

unsigned int tree_helper::get_base_index ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Retrun the base address of a memory access.

Parameters
TMis the tree manager
intis the index of the accessFIXME: to be remove after substitution with GetBaseVariable

Definition at line 3333 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), GET_INDEX_CONST_NODE, and GetBaseVariable().

Referenced by vcd_utility::detect_address_mismatch(), VcdSignalSelection::Exec(), Bit_Value::initialize(), IR_lowering::InternalExec(), LoadOpNode::opCtorGenerator(), and Bit_Value::pointer_resizing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_field_idx()

unsigned int tree_helper::get_field_idx ( const tree_managerConstRef TM,
const unsigned int  index,
unsigned int  idx 
)
static

Return the idx element of the fields declared in an union or a record type.

Parameters
TMis the tree_manager
indis the index of the record/union type
idxis the index of the field declFIXME: to be remove after substitution with GetFieldIdx

Definition at line 2141 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), GetFieldIdx(), and tree_node::index.

Here is the call graph for this function:

◆ get_formal_ith()

unsigned int tree_helper::get_formal_ith ( const tree_managerConstRef TM,
unsigned int  index_obj,
unsigned int  parm_index 
)
static

return the type of the ith formal parameter in case index_obj is a call_expr

FIXME: to be remove after substitution with GetFormalIth

Definition at line 6284 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), GetFormalIth(), and tree_node::index.

Here is the call graph for this function:

◆ get_integer_cst_value()

integer_cst_t tree_helper::get_integer_cst_value ( const integer_cst ic)
static

Convert a integer_cst in a long long value.

Parameters
icis the integer costant data.FIXME: to be remove after substitution with GetConstValue

Definition at line 4343 of file tree_helper.cpp.

References debug_level, DEBUG_LEVEL_PARANOIC, GET_CONST_NODE, GET_INDEX_CONST_NODE, INDENT_DBG_MEX, STR, THROW_ASSERT, test_panda::type, cst_node::type, and integer_cst::value.

Referenced by evaluateBranch(), IR_lowering::expand_MC(), GimpleWriter::GimpleWriter(), and fu_binding::specialise_fu().

Here is the caller graph for this function:

◆ get_multi_way_if_pos()

unsigned int tree_helper::get_multi_way_if_pos ( const tree_managerConstRef TM,
unsigned int  node_id,
unsigned int  cond 
)
static

return the position of con in the gimple_multi_way_if conditions

Parameters
TMis the tree manager
node_idis the node id of the gimple_multi_way_if node
condis the condition index
Returns
the position

Definition at line 7501 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), STR, and THROW_ERROR.

Referenced by fsm_controller::get_guard_value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_parameter_types()

void tree_helper::get_parameter_types ( const tree_managerConstRef TM,
const unsigned int  index,
std::list< unsigned int > &  params 
)
static

Return the tree node of parameter types.

Parameters
TMis the tree_manager
indis the index of the function type
paramsis where parameter types are storedFIXME: to be remove after substitution with GetParameterTypes

Definition at line 2057 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and GetParameterTypes().

Here is the call graph for this function:

◆ get_pointed_type()

unsigned int tree_helper::get_pointed_type ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return the tree_node index of the pointed type of a pointer object;.

Parameters
TMis the tree_manager
indexis the index of the pointer objectFIXME: to be remove after substitution with GetPointedType/CGetPointedType

Definition at line 1559 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_CST_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_UNARY_EXPRESSION, tree_manager::CGetTreeNode(), GET_INDEX_CONST_NODE, STR, and THROW_ASSERT.

Here is the call graph for this function:

◆ get_required_values()

void tree_helper::get_required_values ( std::vector< std::tuple< unsigned int, unsigned int >> &  required,
const tree_nodeRef tn 
)
static

◆ get_type_index() [1/2]

unsigned int tree_helper::get_type_index ( const tree_managerConstRef TM,
const unsigned int  index,
long long int &  vec_size,
bool is_a_pointer,
bool is_a_function 
)
static

Return the treenode index of the type of index.

Parameters
TMis the tree_manager
indexis the treenode index
vec_sizein case the treenode is a vector return its size
is_a_pointerin case the treenode is a pointer return true
is_a_functionin case the treenode is a function_decl return trueFIXME: to be remove after substitution with GetType/CGetType and others to get the out variable checks

Definition at line 1426 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), CGetType(), GET_CONST_NODE, STR, and THROW_ASSERT.

Referenced by CWriter::compute_phi_nodes(), VcdSignalSelection::DetectInvalidReturns(), VcdSignalSelection::Exec(), IR_lowering::expand_target_mem_ref(), AllocationInformation::get_correction_time(), BehavioralHelper::get_type(), get_type_index(), VcdSignalSelection::InitialSsaIsAddress(), IR_lowering::InternalExec(), VcdSignalSelection::SelectInitialAddrParam(), and VcdSignalSelection::SelectInitialSsa().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_type_index() [2/2]

unsigned int tree_helper::get_type_index ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Same as previous but with two parameters.

Parameters
TMis the tree_manager
indexis the treenodeFIXME: to be remove after substitution with GetType/CGetType

Definition at line 2098 of file tree_helper.cpp.

References get_type_index(), is_a_function(), and is_a_pointer().

Here is the call graph for this function:

◆ get_type_name()

std::string tree_helper::get_type_name ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return name of the type.

Parameters
TMis the tree manager
indexis the index of the type
Returns
the name of the typeFIXME: to be remove after substitution with GetTypeName

Definition at line 1750 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), CGetType(), GET_CONST_NODE, STR, THROW_ASSERT, and test_panda::type.

Referenced by tree_manager::check_for_decl(), and tree_manager::check_for_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_used_variables()

void tree_helper::get_used_variables ( bool  first_level_only,
const tree_nodeConstRef t,
CustomUnorderedSet< unsigned int > &  list_of_variable 
)
static

Return the list of tree nodes associated with the variable used by the node t.

Parameters
first_level_onlytells if we are performing inlining
tis a tree node (usually a function declaration).
list_of_variablelist of used variables.

Definition at line 620 of file tree_helper.cpp.

References test_panda::arg, CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_FAKE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, GET_CONST_NODE, GET_INDEX_CONST_NODE, tree_node::get_kind(), sl, THROW_ASSERT, and THROW_ERROR.

Referenced by BehavioralHelper::GetInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_var_alignment()

unsigned int tree_helper::get_var_alignment ( const tree_managerConstRef TM,
unsigned int  var 
)
static

Return the var alignment.

Parameters
TMis the tree manager
indexis the index of the variable
Returns
the variable alignment

Definition at line 5109 of file tree_helper.cpp.

References tree_manager::CGetTreeNode().

Referenced by memory::add_external_variable(), and memory::add_internal_variable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetArrayDimensions()

std::vector< unsigned long long > tree_helper::GetArrayDimensions ( const tree_nodeConstRef node)
static

Return the dimension of the array.

Parameters
nodeis the array object
Returns
for each dimension the number of elements

Definition at line 4983 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), GetArrayElementSize(), GetConstValue(), Size(), STR, and THROW_ASSERT.

Referenced by IR_lowering::array_ref_lowering(), get_array_dimensions(), AllocationInformation::get_correction_time(), GetArrayTotalSize(), and MemoryInitializationWriterBase::GoUp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetArrayElementSize()

unsigned long long tree_helper::GetArrayElementSize ( const tree_nodeConstRef node)
static

Return the size (in bits) of the base element of the array.

Parameters
nodeis the array object
Returns
the size (in bits) of the base element of the array

Definition at line 4881 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, tree_node::get_kind(), max, Size(), THROW_ASSERT, and test_panda::type.

Referenced by IR_lowering::array_ref_lowering(), get_array_data_bitsize(), GetArrayDimensions(), mem_dominator_allocation::InternalExec(), and TestbenchGeneration::print_var_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetArrayTotalSize()

unsigned long long tree_helper::GetArrayTotalSize ( const tree_nodeConstRef node)
static

Return the total number of elements of the the base type in the array.

Parameters
nodeis the array object
Returns
the total number of elements of the the base type in the array

Definition at line 5037 of file tree_helper.cpp.

References GetArrayDimensions().

Referenced by InterfaceInfer::Exec(), get_array_num_elements(), TestbenchGeneration::print_var_init(), and HLSCWriter::WriteMainTestbench().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBaseVariable()

tree_nodeConstRef tree_helper::GetBaseVariable ( const tree_nodeConstRef mem)
static

◆ GetConstValue()

integer_cst_t tree_helper::GetConstValue ( const tree_nodeConstRef tn,
bool  is_signed = true 
)
static

Get value from integer constant.

Parameters
tnInteger constant tree node
is_signedReturn signed value if true, unsigned equivalent if false
Returns
integer_cst_t Integer constant value

Definition at line 4358 of file tree_helper.cpp.

References debug_level, DEBUG_LEVEL_PARANOIC, GET_CONST_NODE, tree_node::get_kind(), INDENT_DBG_MEX, Size(), STR, and THROW_ASSERT.

Referenced by Bit_Value::backward_transfer(), lut_transformation::CHECK_BIN_EXPR_INT_SIZE(), simple_code_motion::CheckMovable(), Vectorize::ClassifyTreeNode(), CreateAddressTranslation::ComputeAddress(), BitLatticeManipulator::constructor_bitstring(), mux_connection_binding::create_connections(), tree_manipulation::CreateUnsigned(), Nuutila::delControlDependenceEdges(), mux_connection_binding::determine_connection(), IR_lowering::division_by_a_constant(), evaluateBranch(), BitValueIPA::Exec(), IR_lowering::expand_target_mem_ref(), extract_array_indexes(), rebuild_initialization2::extract_var_decl(), rebuild_initialization2::extract_var_decl_ppe(), tree_manipulation::ExtractCondition(), Bit_Value::forward_transfer(), get_array_dim_and_bitsize(), PragmaAnalysis::get_call_parameter(), HLS_manager::get_constant_string(), fsm_controller::get_guard_value(), get_required_values(), GetArrayDimensions(), GetBaseVariable(), GetTypeName(), GimpleWriter::GimpleWriter(), Bit_Value::initialize(), BuiltinWaitCallModuleGenerator::InternalExec(), BuiltinWaitCallNModuleGenerator::InternalExec(), SwitchFix::InternalExec(), LoopsAnalysisBambu::InternalExec(), mem_dominator_allocation::InternalExec(), rebuild_initialization::InternalExec(), simple_code_motion::InternalExec(), dead_code_elimination::InternalExec(), CSE::InternalExec(), IR_lowering::InternalExec(), IsPositiveIntegerValue(), rebuild_initialization2::look_for_ROMs(), field_decl::offset(), op_symbol(), Bit_Value_opt::optimize(), VarNode::print(), BehavioralHelper::print_type_declaration(), BehavioralHelper::PrintConstant(), PhiOpNode::printDot(), UnaryOpNode::printDot(), SigmaOpNode::printDot(), BinaryOpNode::printDot(), TernaryOpNode::printDot(), LoadOpNode::printDot(), BehavioralHelper::PrintNode(), PrintType(), BehavioralHelper::PrintVariable(), lut_transformation::ProcessBasicBlock(), hls_div_cg_ext::recursive_examinate(), compute_implicit_calls::replace_with_memcpy(), compute_implicit_calls::replace_with_memset(), Size(), BitLatticeManipulator::Size(), fu_binding::specialise_fu(), Vectorize::Transform(), and fu_binding::write_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElements()

unsigned int tree_helper::GetElements ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Given an array or a vector return the element type.

Parameters
TMis the tree_manager
indexis the type of the array
Returns
the type of the elementFIXME: to be remove after substitution with CGetElements

Definition at line 1728 of file tree_helper.cpp.

References CGetElements(), and tree_manager::CGetTreeReindex().

Referenced by VcdSignalSelection::IsAddressType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFieldIdx()

tree_nodeRef tree_helper::GetFieldIdx ( const tree_nodeConstRef type,
unsigned int  idx 
)
static

Return the element of the fields declared in an union or a record type.

Parameters
typeis the record/union type
idxis the index of the field decl
Returns
the field decl node

Definition at line 2147 of file tree_helper.cpp.

References THROW_ASSERT, THROW_ERROR, and test_panda::type.

Referenced by get_field_idx().

Here is the caller graph for this function:

◆ GetFormalIth()

tree_nodeConstRef tree_helper::GetFormalIth ( const tree_nodeConstRef obj,
unsigned int  parm_index 
)
static

Return the type of the ith formal parameter in case index_obj is a call_expr.

Parameters
objis the call_expr node
parm_indexis the index of the parameter
Returns
tree_nodeConstRef the type of the ith formal parameter in case index_obj is a call_expr (could be nullptr)

parameters are not available through function_type but only through function_decl

parameters are not available through function_type but only through function_decl

Definition at line 6157 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, tree_node::get_kind(), THROW_ASSERT, and THROW_ERROR.

Referenced by mux_connection_binding::create_connections(), get_formal_ith(), AllocationInformation::GetNodeTypePrec(), FixStructsPassedByValue::InternalExec(), FunctionCallTypeCleanup::ParametersTypeCleanup(), compute_implicit_calls::replace_with_memcpy(), and compute_implicit_calls::replace_with_memset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFunctionName()

std::string tree_helper::GetFunctionName ( const tree_managerConstRef TM,
const tree_nodeConstRef decl 
)
static

Return the name of the function.

Parameters
TMis the tree manager instance
declis the treenode of the class (of a function_decl)
Returns
the name of the functionFIXME: to be remove after substitution with PrintFunctionName

Definition at line 423 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), tree_node::get_kind_text(), print_function_name(), and THROW_ERROR.

Referenced by InterfaceInfer::Exec(), hls_div_cg_ext::InternalExec(), name_function(), and tree_manipulation::VersionFunctionCall().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFunctionReturnType()

tree_nodeConstRef tree_helper::GetFunctionReturnType ( const tree_nodeConstRef function,
bool  void_as_null = true 
)
static

◆ GetFunctionSize()

size_t tree_helper::GetFunctionSize ( const tree_managerConstRef TM,
const unsigned int  function_index 
)
static

Return the number of statement + the number of phi in the function.

Parameters
TMis the tree manager
function_indexis the index of the function to be analyzed
Returns
the size of a function

Definition at line 8774 of file tree_helper.cpp.

References GET_NODE, tree_manager::get_tree_node_const(), sl, and THROW_ASSERT.

Here is the call graph for this function:

◆ getFunctionTypeString()

static std::string tree_helper::getFunctionTypeString ( const tree_nodeRef FT)
static

Return a string describing the functino type.

Parameters
Treenode of the function type

◆ GetMangledFunctionName()

std::string tree_helper::GetMangledFunctionName ( const function_decl fd)
static

◆ GetParameterTypes()

std::vector< tree_nodeConstRef > tree_helper::GetParameterTypes ( const tree_nodeConstRef ftype)
static

Return the tree node of parameter types.

Parameters
ftypeis the function type
Returns
parameters type list

Definition at line 2065 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, lenet_tvm::params, STR, and THROW_ASSERT.

Referenced by get_parameter_types(), and RecursiveGetTypesToBeDeclared().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRealType() [1/2]

unsigned int tree_helper::GetRealType ( const tree_managerConstRef TM,
unsigned int  index 
)
static

Return the real type.

Parameters
TMis the tree manager
indexis the index of the type
Returns
the real typeFIXME: to be remove after substitution with GetRealType

Definition at line 1414 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and GET_INDEX_CONST_NODE.

Referenced by CWriter::DeclareType(), BehavioralHelper::print_type_declaration(), BehavioralHelper::PrintNode(), PrintType(), and HLSCWriter::WriteParamInitialization().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRealType() [2/2]

tree_nodeConstRef tree_helper::GetRealType ( const tree_nodeConstRef type)
static

Return the real type (same as GetUnqualifiedType, but return type instead of nullptr)

Parameters
typeis the type
Returns
the real type

Definition at line 1420 of file tree_helper.cpp.

References GetUnqualifiedType().

Here is the call graph for this function:

◆ GetRecordTypeName()

std::string tree_helper::GetRecordTypeName ( const tree_nodeConstRef type)
static

Return the name of the class.

Parameters
typeis the treenode of the class (of a record_type)
Returns
the name of the class

Definition at line 392 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), GET_NODE, rect(), and test_panda::type.

Referenced by is_builtin_channel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSourcePath()

std::tuple< std::string, unsigned int, unsigned int > tree_helper::GetSourcePath ( const tree_nodeConstRef node,
bool is_system 
)
static

Return where a function or a type is defined.

Parameters
nodetype or decl treenode
is_systemstores if function or type has been already recognized as a system one
Returns
include name, line number, and column number tuple

Definition at line 549 of file tree_helper.cpp.

References GET_CONST_NODE.

Referenced by CBackend::AnalyzeInclude(), CWriter::DeclareType(), and BehavioralHelper::get_definition().

Here is the caller graph for this function:

◆ GetTemplateTypeName()

std::string tree_helper::GetTemplateTypeName ( const tree_nodeConstRef type)
static

Return the name of template without parameters.

Ex: sc_signal<T> –> sc_signal

Parameters
typeis the treenode of the class template (of a record_type)
Returns
name of template without parameters

Definition at line 364 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), GET_NODE, rect(), and test_panda::type.

Here is the call graph for this function:

◆ GetTypeName()

std::string tree_helper::GetTypeName ( const tree_nodeConstRef type)
static

◆ GetTypesToBeDeclaredAfter()

std::set< tree_nodeConstRef, TreeNodeConstSorter > tree_helper::GetTypesToBeDeclaredAfter ( const tree_nodeConstRef tn,
const bool  without_transformation 
)
static

Return the types to be declared after declaring index type.

Parameters
tnis the starting type
without_transformationspecifies if we are not restructuring the code
Returns
the types to be declared

Definition at line 1101 of file tree_helper.cpp.

References RecursiveGetTypesToBeDeclared().

Referenced by CBackend::AnalyzeInclude(), and CWriter::DeclareType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTypesToBeDeclaredBefore()

std::set< tree_nodeConstRef, TreeNodeConstSorter > tree_helper::GetTypesToBeDeclaredBefore ( const tree_nodeConstRef tn,
const bool  without_transformation 
)
static

Return the types to be declared before declaring index type.

Parameters
tnis the starting type
without_transformationspecifies if we are not restructuring the code
Returns
the types to be declared

Definition at line 1093 of file tree_helper.cpp.

References RecursiveGetTypesToBeDeclared().

Referenced by CBackend::AnalyzeInclude(), and CWriter::DeclareType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUnqualified()

unsigned int tree_helper::GetUnqualified ( const tree_managerConstRef TM,
unsigned int  type 
)
static

Return the unqualified version of a type.

Parameters
TMis the tree_manager
typeis the type
Returns
the unqualified version of the type if it exists, 0 otherwiseFIXME: to be remove after substitution with GetUnqualifiedType

Definition at line 5080 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GetUnqualifiedType(), and tree_node::index.

Referenced by BehavioralHelper::GetUnqualified().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUnqualifiedType()

tree_nodeConstRef tree_helper::GetUnqualifiedType ( const tree_nodeConstRef type)
static

Return the unqualified version of a type.

Parameters
typeis the type
Returns
the unqualified version of the type if it exists, nullptr else

Definition at line 5086 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), and test_panda::type.

Referenced by GetRealType(), and GetUnqualified().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_function_return()

static bool tree_helper::has_function_return ( const tree_managerConstRef tm,
const unsigned int  index 
)
static

Return true if the function index returns a not void type, false otherwise.

Parameters
indexis the treenode_index of the functionsFIXME: to be remove after substitution with HasReturnType

◆ has_omp_simd()

bool tree_helper::has_omp_simd ( const statement_list sl)
static

Check if omp simd pragmas are present in given statement list.

Parameters
slstatement list to analyse
Returns
true If omp simd pragmas where found
false If no omp simd pragmas are present

Definition at line 8912 of file tree_helper.cpp.

References GET_NODE, statement_list::list_of_bloc, and THROW_ASSERT.

Referenced by LoopsAnalysisBambu::ComputeFrontendRelationships(), Vectorize::ComputeFrontendRelationships(), and FunctionCallOpt::InternalExec().

Here is the caller graph for this function:

◆ HasReturnType()

static bool tree_helper::HasReturnType ( const tree_managerConstRef tm,
const unsigned int  index 
)
static

Return true if the function index returns a not void type, false otherwise.

Parameters
typeis the treenode of the functions
Returns
true if the function returns a not void type, false otherwise

◆ HasToBeDeclared()

bool tree_helper::HasToBeDeclared ( const tree_managerConstRef TM,
const tree_nodeConstRef type 
)
static

Return true if the type has to be declared.

Parameters
typeis the treenode
Returns
if the type has to be declared

Definition at line 2561 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), PrintType(), SplitString(), STR, THROW_ASSERT, and test_panda::type.

Referenced by tree_manager::collapse_into(), and CWriter::DeclareType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_a_complex()

bool tree_helper::is_a_complex ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if treenode index is a complex.

Parameters
TMis the tree_manager
indexis the treenode index
Returns
true if treenode index is a complexFIXME: to be remove after substitution with IsComplexType

Definition at line 2341 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsComplexType().

Referenced by VcdSignalSelection::InitialSsaIsAddress(), BehavioralHelper::is_a_complex(), Bit_Value_opt::optimize(), VcdSignalSelection::SelectInitialSsa(), and VcdSignalSelection::SingleStepPropagateAddrSsa().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_a_function()

bool tree_helper::is_a_function ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if treenode index is a function_decl.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsFunctionDeclaration

Definition at line 2509 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsFunctionDeclaration().

Referenced by get_type_index().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_a_misaligned_vector()

bool tree_helper::is_a_misaligned_vector ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode index is a a misaligned access to a vector data object.

Parameters
TMis the tree_manager
indexis the treenode index

Definition at line 2537 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), CGetType(), GET_CONST_NODE, IsVectorType(), Size(), STR, and THROW_ASSERT.

Referenced by memory_allocation::finalize_memory_allocation(), and fu_binding::specialise_fu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_a_nop_function_decl()

bool tree_helper::is_a_nop_function_decl ( const function_decl fd)
static

◆ is_a_pointer()

bool tree_helper::is_a_pointer ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if treenode index is a pointer.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsPointerType

Definition at line 2481 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsPointerType().

Referenced by mux_connection_binding::create_connections(), CreateAddressTranslation::Exec(), memory_allocation::finalize_memory_allocation(), get_type_index(), BehavioralHelper::is_a_pointer(), VcdSignalSelection::IsAddressType(), and Bit_Value_opt::optimize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_a_struct()

bool tree_helper::is_a_struct ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if treenode index is a record.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsStructType

Definition at line 2315 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsStructType().

Referenced by AllocationInformation::get_correction_time(), and BehavioralHelper::is_a_struct().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_a_variable()

bool tree_helper::is_a_variable ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

FIXME: to be remove after substitution with IsVariableType.

Definition at line 2961 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsVariableType().

Here is the call graph for this function:

◆ is_a_vector()

bool tree_helper::is_a_vector ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode index is a vector.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsVectorType

Definition at line 2524 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsVectorType().

Referenced by PhiOpt::ApplyIfMerge(), PhiOpt::ApplyIfRemove(), PhiOpt::ApplyMultiMerge(), PhiOpt::ApplyMultiRemove(), short_circuit_taf::create_gimple_cond(), PhiOpt::IdentifyPattern(), BehavioralHelper::is_a_vector(), VcdSignalSelection::IsAddressType(), Bit_Value_opt::optimize(), and VcdSignalSelection::SingleStepPropagateAddrSsa().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_a_void()

bool tree_helper::is_a_void ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode is of void type.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsVoidType

Definition at line 2645 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsVoidType().

Here is the call graph for this function:

◆ is_an_addr_expr()

bool tree_helper::is_an_addr_expr ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if treenode index is an address expression.

Parameters
TMis the tree manager
indexis the treenode index
Returns
true if treenode index is an address expression

Definition at line 2556 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), and tree_node::get_kind().

Here is the call graph for this function:

◆ is_an_array()

bool tree_helper::is_an_array ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if treenode index is an array or it is equivalent to an array (record recursively having a single field ending into a single arrays)

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsArrayEquivType

Definition at line 2442 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsArrayEquivType().

Referenced by AllocationInformation::get_correction_time(), BehavioralHelper::is_an_array(), and VcdSignalSelection::IsAddressType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_an_enum()

bool tree_helper::is_an_enum ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if treenode index is an enumeral type.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsEnumType

Definition at line 2302 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsEnumType().

Referenced by BehavioralHelper::is_an_enum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_an_union()

bool tree_helper::is_an_union ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if treenode index is an union.

Parameters
TMis the tree_manager
indexis the treenode index
Returns
true if treenode index is an unionFIXME: to be remove after substitution with IsUnionType

Definition at line 2328 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsUnionType().

Referenced by AllocationInformation::get_correction_time(), and BehavioralHelper::is_an_union().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_bool()

bool tree_helper::is_bool ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode is of bool type.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsBooleanType

Definition at line 2625 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsBooleanType().

Referenced by mux_connection_binding::create_connections(), and BehavioralHelper::is_bool().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_builtin_channel()

bool tree_helper::is_builtin_channel ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index is a SystemC builtin channel.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is a SystemC builtin channel, false otherwise

Definition at line 2764 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), tree_manager::CGetTreeReindex(), GetRecordTypeName(), and THROW_ASSERT.

Referenced by is_channel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_channel()

bool tree_helper::is_channel ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index is a SystemC channel.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is a sc_channel, false otherwise

Definition at line 2771 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, is_builtin_channel(), look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_clock()

bool tree_helper::is_clock ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index as parm is a SystemC sc_clock.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is a sc_clock, false otherwise

Definition at line 2823 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_concat_bit_ior_expr()

bool tree_helper::is_concat_bit_ior_expr ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

check if a given tree node is a concatenation operation

Parameters
TMis the tree_manager
indexis the index of the tree_node
Returns
true when index is a bit_ior_expr and the bit values are mutually exclusive.

Definition at line 4521 of file tree_helper.cpp.

References tree_node::get_kind(), GET_NODE, and tree_manager::get_tree_node_const().

Referenced by AllocationInformation::GetNodeTypePrec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_const_type()

bool tree_helper::is_const_type ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if the treenode is of const type.

Parameters
TMis the tree_manager
indexis the treenode index
Returns
if tree_node is of const typeFIXME: to be remove after substitution with IsConstType

Definition at line 4254 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsConstType().

Here is the call graph for this function:

◆ is_constant()

bool tree_helper::is_constant ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return if a tree node is a constant object.

Parameters
TMis the tree_manager
indexis the index of the tree_node
Returns
true is the object is constantFIXME: to be remove after substitution with IsConstant

Definition at line 4592 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsConstant().

Referenced by simple_code_motion::CheckMovable(), commutative_expr_restructuring::IsCommExprChain(), and CondExprRestructuring::IsCondExprChain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_event()

bool tree_helper::is_event ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index is a SystemC event.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is an event, false otherwise

Definition at line 2945 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_extern()

bool tree_helper::is_extern ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

FIXME: to be remove after substitution with IsExternDeclaration.

Definition at line 4230 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsExternDeclaration().

Referenced by BehavioralHelper::is_extern(), DiscrepancyAnalysisCWriter::WriteFunctionDeclaration(), and DiscrepancyAnalysisCWriter::WriteFunctionImplementation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_fully_resolved()

bool tree_helper::is_fully_resolved ( const tree_managerConstRef TM,
const unsigned int  index,
CustomOrderedSet< unsigned int > &  res_set 
)
static

FIXME: to be remove after substitution with IsPointerResolved.

Definition at line 3852 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsPointerResolved().

Here is the call graph for this function:

◆ is_function_pointer_type()

bool tree_helper::is_function_pointer_type ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode is of type function pointer type.

Parameters
TMis the tree_manager
indexis the treenode_indexFIXME: to be remove after substitution with IsFunctionPointerType

Definition at line 2604 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsFunctionPointerType().

Here is the call graph for this function:

◆ is_function_type()

bool tree_helper::is_function_type ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode is of type function type.

Parameters
TMis the tree_manager
indexis the treenode_indexFIXME: to be remove after substitution with IsFunctionType

Definition at line 2592 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsFunctionType().

Here is the call graph for this function:

◆ is_in_port()

bool tree_helper::is_in_port ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index is a SystemC input port.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is an input port, false otherwise

Definition at line 2896 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_inout_port()

bool tree_helper::is_inout_port ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index is a SystemC in-output port.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is an inoutput port, false otherwise

Definition at line 2929 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_int()

bool tree_helper::is_int ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode is of integer type.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsSignedIntegerType

Definition at line 2677 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsSignedIntegerType().

Referenced by Bit_Value::backward_transfer(), BitLatticeManipulator::constructor_bitstring(), convert_bitvalue_to_integer_cst(), mux_connection_binding::create_connections(), AllocationInformation::GetConnectionTime(), IR_lowering::InternalExec(), BehavioralHelper::is_int(), Bit_Value_opt::optimize(), lut_transformation::ProcessBasicBlock(), and BitLatticeManipulator::string_cst_bitstring().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_module()

bool tree_helper::is_module ( const tree_managerConstRef TM,
unsigned int  index 
)
static

This function test if a given index is a SystemC module.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is a sc_module, false otherwise

Definition at line 2745 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_natural()

bool tree_helper::is_natural ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode is a ssa_name greater or equal to zero.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsPositiveIntegerValue

Definition at line 2658 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsPositiveIntegerValue().

Referenced by Bit_Value::initialize(), and BehavioralHelper::is_natural().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_out_port()

bool tree_helper::is_out_port ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index is a SystemC output port.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is an output port, false otherwise

Definition at line 2912 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_packed()

bool tree_helper::is_packed ( const tree_managerConstRef TreeM,
unsigned int  node_index 
)
static

FIXME: to be remove after substitution with IsPackedType.

Definition at line 6291 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsPackedType().

Here is the call graph for this function:

◆ is_packed_access()

bool tree_helper::is_packed_access ( const tree_managerConstRef TreeM,
unsigned int  node_index 
)
static

Check if the access is on a packed data structure or not.

Parameters
TreeMis the tree manager
node_indexis the node id under check
Returns
true in case the access is to a packed data structure or not

Definition at line 6430 of file tree_helper.cpp.

References CASE_CPP_NODES, CASE_CST_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_TYPE_NODES, tree_manager::CGetTreeNode(), GET_CONST_NODE, GET_INDEX_CONST_NODE, and THROW_ERROR.

Referenced by memory_allocation::finalize_memory_allocation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_parameter()

bool tree_helper::is_parameter ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

return true in case the index corresponds to a parameter in ssa form or not

Parameters
TMis the tree manager
indexis the id of a potential parameter
Returns
true in case the index is a parameter

Definition at line 4169 of file tree_helper.cpp.

References GET_NODE, tree_manager::get_tree_node_const(), and THROW_ASSERT.

Referenced by mux_connection_binding::connect_to_registers(), StorageValueInformation::Initialize(), cdfc_module_binding::initialize_connection_relation(), FSM_NI_SSA_liveness::InternalExec(), values_scheme::InternalExec(), port_swapping::InternalExec(), and HLS_manager::is_register_compatible().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_port()

bool tree_helper::is_port ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index is a SystemC port.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is a port, false otherwise

Definition at line 2879 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_real()

bool tree_helper::is_real ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode is of real type.

Parameters
TMis the tree_manager
indexis the treenode index
Returns
if index is of real typeFIXME: to be remove after substitution with IsRealType

Definition at line 2699 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsRealType().

Referenced by simple_code_motion::CheckMovable(), mux_connection_binding::create_connections(), VcdSignalSelection::InitialSsaIsAddress(), IR_lowering::InternalExec(), BehavioralHelper::is_real(), Bit_Value_opt::optimize(), VcdSignalSelection::SelectInitialSsa(), and VcdSignalSelection::SingleStepPropagateAddrSsa().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_SC_BIND_PROXY_NIL()

bool tree_helper::is_SC_BIND_PROXY_NIL ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index as parm is a SC_BIND_PROXY_NIL.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is a SC_BIND_PROXY_NIL, false otherwise

Definition at line 2842 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, and THROW_ASSERT.

Here is the call graph for this function:

◆ is_scalar()

bool tree_helper::is_scalar ( const tree_managerConstRef TM,
const unsigned int  var 
)
static

Return true if the treenode is an int, an unsigned, a real or a Boolean data type.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsScalarType

Definition at line 2735 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsScalarType().

Here is the call graph for this function:

◆ is_signal()

bool tree_helper::is_signal ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

This function test if a given index is a SystemC sc_signal.

Parameters
TMis the tree_manager
indexis the treenode
Returns
true if index is a sc_signal, false otherwise

Definition at line 2802 of file tree_helper.cpp.

References tree_manager::CGetTreeNode(), GET_CONST_NODE, look_for_binfo_inheritance(), and THROW_ASSERT.

Here is the call graph for this function:

◆ is_simple_pointer_plus_test()

bool tree_helper::is_simple_pointer_plus_test ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

check if a given tree node is a simple pointer plus expression

Parameters
TMis the tree_manager
indexis the index of the tree_node
Returns
true when index is a simple pointer plus expression between two constants

Definition at line 4557 of file tree_helper.cpp.

References tree_node::get_kind(), GET_NODE, and tree_manager::get_tree_node_const().

Here is the call graph for this function:

◆ is_ssa_name()

bool tree_helper::is_ssa_name ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true in case index is a ssa_name.

Parameters
TMis the tree manager
indexis the index of a possible ssa_name
Returns
true in case of ssa_name

Definition at line 4186 of file tree_helper.cpp.

References tree_manager::get_tree_node_const(), and THROW_ASSERT.

Referenced by StorageValueInformation::Initialize(), FSM_NI_SSA_liveness::InternalExec(), and HLS_manager::is_register_compatible().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_static()

bool tree_helper::is_static ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

FIXME: to be remove after substitution with IsStaticDeclaration.

Definition at line 4206 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsStaticDeclaration().

Referenced by BehavioralHelper::is_static(), PrintType(), DiscrepancyAnalysisCWriter::WriteFunctionDeclaration(), and DiscrepancyAnalysisCWriter::WriteFunctionImplementation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_system()

bool tree_helper::is_system ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if variable or type is a system one.

Parameters
TMis the tree manager
indexis the index of the treenode corresponding to the decl node or to the type node
Returns
true if variable or type is a system oneFIXME: to be remove after substitution with IsSystemType

Definition at line 1051 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsSystemType().

Referenced by BehavioralHelper::function_has_to_be_printed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_unsigned()

bool tree_helper::is_unsigned ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the treenode is of unsigned integer type.

Parameters
TMis the tree_manager
indexis the treenode indexFIXME: to be remove after substitution with IsUnsignedIntegerType

Definition at line 2712 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsUnsignedIntegerType().

Referenced by mux_connection_binding::create_connections(), IR_lowering::expand_mult_highpart(), and BehavioralHelper::is_unsigned().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_virtual()

bool tree_helper::is_virtual ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

return true in case the ssa_name is virtual

Parameters
TMis the tree manager
indexis the id of a potential ssa_name
Returns
true in case the index is a virtual ssa_name

Definition at line 4194 of file tree_helper.cpp.

References tree_manager::get_tree_node_const(), and THROW_ASSERT.

Referenced by StorageValueInformation::Initialize(), FSM_NI_SSA_liveness::InternalExec(), NI_SSA_liveness::InternalExec(), and HLS_manager::is_register_compatible().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_volatile()

bool tree_helper::is_volatile ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

return true in case the index corresponds to a volatile variable

Parameters
TMis the tree manager
indexis the id of a variable/ssa_name
Returns
true in case the variable/ssa_name is a volatile objectFIXME: to be remove after substitution with IsVolatile

Definition at line 4148 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and IsVolatile().

Here is the call graph for this function:

◆ IsAligned() [1/2]

bool tree_helper::IsAligned ( const tree_managerConstRef TM,
unsigned int  type 
)
static

Return true if type has not default alignment.

Definition at line 5096 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex().

Referenced by RecursiveGetTypesToBeDeclared().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsAligned() [2/2]

bool tree_helper::IsAligned ( const tree_nodeConstRef tn)
static

Definition at line 5101 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), STR, THROW_ASSERT, and test_panda::type.

Here is the call graph for this function:

◆ IsArrayEquivType()

bool tree_helper::IsArrayEquivType ( const tree_nodeConstRef type)
static

Return true if treenode is an array or it is equivalent to an array (record recursively having a single field ending into a single arrays)

Parameters
typeis the treenode
Returns
true if treenode is an array or it is equivalent to an array

Definition at line 2448 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, same_size_fields(), THROW_ASSERT, and test_panda::type.

Referenced by operations_cfg_computation::build_operation_recursive(), constructor_range(), fu_binding::fill_array_ref_memory(), AllocationInformation::get_correction_time(), MemoryInitializationWriterBase::GoNext(), CSE::has_memory_access(), mem_dominator_allocation::InternalExec(), is_an_array(), and InterfaceInfer::interface_info::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsArrayType()

bool tree_helper::IsArrayType ( const tree_nodeConstRef type)
static

Return true if treenode is an array.

Parameters
typeis the treenode
Returns
true if treenode is an array
false if treenode is not an array

Definition at line 2463 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, THROW_ASSERT, and test_panda::type.

Referenced by InterfaceInfer::Exec(), AllocationInformation::GetNodeTypePrec(), MemoryInitializationWriterBase::GoDown(), mux_connection_binding::object_bitsize(), TestbenchGeneration::print_var_init(), BehavioralHelper::PrintNode(), and HLSCWriter::WriteMainTestbench().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsBooleanType()

bool tree_helper::IsBooleanType ( const tree_nodeConstRef type)
static

◆ IsComplexType()

bool tree_helper::IsComplexType ( const tree_nodeConstRef type)
static

◆ IsConstant()

bool tree_helper::IsConstant ( const tree_nodeConstRef node)
static

◆ IsConstType()

bool tree_helper::IsConstType ( const tree_nodeConstRef type)
static

Return true if the treenode is of const type.

Parameters
typeis the treenode
Returns
true if tree_node is of const type

Definition at line 4260 of file tree_helper.cpp.

References CGetType(), FIRST_TOKEN, GET_CONST_NODE, THROW_ASSERT, TOK_QUAL_C, TOK_QUAL_CV, and TOK_QUAL_CVR.

Referenced by is_const_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsEnumType()

bool tree_helper::IsEnumType ( const tree_nodeConstRef type)
static

Return if treenode index is an enumeral type.

Parameters
typeis the treenode
Returns
if treenode is an enumeral type

Definition at line 2308 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, and THROW_ASSERT.

Referenced by fu_binding::fill_array_ref_memory(), allocation::InternalExec(), and is_an_enum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsExternDeclaration()

bool tree_helper::IsExternDeclaration ( const tree_nodeConstRef decl)
static

Definition at line 4235 of file tree_helper.cpp.

References GET_CONST_NODE, and tree_node::get_kind().

Referenced by discrepancy_instruction_writer::declareFunction(), and is_extern().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsFunctionDeclaration()

bool tree_helper::IsFunctionDeclaration ( const tree_nodeConstRef type)
static

Return true if treenode is a function_decl.

Parameters
typeis the treenode
Returns
true if treenode is a function_decl

Definition at line 2514 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), and THROW_ASSERT.

Referenced by CBackend::AnalyzeInclude(), and is_a_function().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsFunctionPointerType()

bool tree_helper::IsFunctionPointerType ( const tree_nodeConstRef type)
static

Return true if the treenode is of type function pointer type.

Parameters
typeis the treenode
Returns
true if the treenode is of type function pointer type

Definition at line 2610 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, and THROW_ASSERT.

Referenced by is_function_pointer_type(), and BehavioralHelper::PrintNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsFunctionType()

bool tree_helper::IsFunctionType ( const tree_nodeConstRef type)
static

Return true if the treenode is of type function type.

Parameters
typeis the treenode
Returns
true if the treenode is of type function type

Definition at line 2597 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, and THROW_ASSERT.

Referenced by is_function_type(), and soft_float_cg_ext::signature_lowering().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsInLibbambu() [1/2]

bool tree_helper::IsInLibbambu ( const tree_managerConstRef TM,
const unsigned int  index 
)
static

Return true if the decl node or type is in libbambu.

Parameters
TMis the tree manager
indexis the treenode indexFIXME: to be remove after substitution with IsInLibbambu

Definition at line 1072 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex().

Referenced by CBackend::AnalyzeInclude(), CWriter::DeclareType(), CWriter::DeclareVariable(), BehavioralHelper::function_has_to_be_printed(), BehavioralHelper::PrintVarDeclaration(), and CheckSystemType::recursive_examinate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsInLibbambu() [2/2]

bool tree_helper::IsInLibbambu ( const tree_nodeConstRef type)
static

Return true if the decl node or type is in libbambu.

Parameters
typeis the treenode
Returns
true if the decl node or type is in libbambu

Definition at line 1078 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), and test_panda::type.

Here is the call graph for this function:

◆ IsLoad()

bool tree_helper::IsLoad ( const tree_nodeConstRef tn,
const CustomOrderedSet< unsigned int > &  fun_mem_data 
)
static

Return true if the tree node is a gimple_assign reading something which will be allocated in memory.

Parameters
tnis the tree node
fun_mem_datais the set of memory variables of the function
Returns
true if tn operation is a load

check for bit field ref of vector type

Definition at line 8844 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, tree_node::get_kind(), and IsVectorType().

Referenced by operations_cfg_computation::build_operation_recursive(), BehavioralHelper::IsLoad(), LoadOpNode::opCtorGenerator(), and soft_float_cg_ext::RecursiveExaminate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLut()

bool tree_helper::IsLut ( const tree_nodeConstRef tn)
static

Return true in case the right operation is a lut_expr.

Parameters
TMis the tree manager
tnis the tree node
Returns
if tn operation is a lut_expr

Definition at line 8900 of file tree_helper.cpp.

References GET_CONST_NODE, and tree_node::get_kind().

Referenced by BehavioralHelper::IsLut().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsPackedType()

bool tree_helper::IsPackedType ( const tree_nodeConstRef type)
static

◆ IsPointerResolved()

bool tree_helper::IsPointerResolved ( const tree_nodeConstRef ptr,
CustomOrderedSet< unsigned int > &  res_set 
)
static

◆ IsPointerType()

bool tree_helper::IsPointerType ( const tree_nodeConstRef type)
static

◆ IsPositiveIntegerValue()

bool tree_helper::IsPositiveIntegerValue ( const tree_nodeConstRef type)
static

Return true if the treenode is a ssa_name greater or equal to zero.

Parameters
typeis the treenode
Returns
true if the treenode is a ssa_name greater or equal to zero

Definition at line 2664 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), GetConstValue(), min, STR, THROW_ASSERT, and test_panda::type.

Referenced by is_natural().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsRealType()

bool tree_helper::IsRealType ( const tree_nodeConstRef type)
static

◆ IsSameType()

bool tree_helper::IsSameType ( const tree_nodeConstRef tn0,
const tree_nodeConstRef tn1 
)
static

Given two nodes tells if they have same base type (const is not considered: const double == double)

Parameters
tn0first node to compare
tn1second node to compare
Returns
true if tn0 and tn1 have the same type

Definition at line 2087 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, and Size().

Referenced by mux_connection_binding::create_connections(), soft_float_cg_ext::generate_interface(), FunctionCallTypeCleanup::InternalExec(), dead_code_elimination::InternalExec(), IR_lowering::InternalExec(), Bit_Value_opt::optimize(), FunctionCallTypeCleanup::ParametersTypeCleanup(), InterfaceInfer::setReadInterface(), and InterfaceInfer::setWriteInterface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsScalarType()

bool tree_helper::IsScalarType ( const tree_nodeConstRef type)
static

Return true if the treenode is an int, an unsigned, a real or a Boolean data type.

Parameters
typeis the treenode
Returns
true if the treenode is an int, an unsigned, a real or a Boolean data type

Definition at line 2740 of file tree_helper.cpp.

References IsBooleanType(), IsRealType(), IsSignedIntegerType(), and IsUnsignedIntegerType().

Referenced by BitValueIPA::Exec(), and is_scalar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsSignedIntegerType()

bool tree_helper::IsSignedIntegerType ( const tree_nodeConstRef type)
static

◆ IsStaticDeclaration()

bool tree_helper::IsStaticDeclaration ( const tree_nodeConstRef decl)
static

Definition at line 4211 of file tree_helper.cpp.

References GET_CONST_NODE, and tree_node::get_kind().

Referenced by discrepancy_instruction_writer::declareFunction(), and is_static().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsStore()

bool tree_helper::IsStore ( const tree_nodeConstRef tn,
const CustomOrderedSet< unsigned int > &  fun_mem_data 
)
static

Return true if the tree node is a gimple_assign writing something which will be allocated in memory.

Parameters
tnis the tree node
fun_mem_datais the set of memory variables of the function
Returns
true if tn operation is a store

Definition at line 8798 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, and tree_node::get_kind().

Referenced by operations_cfg_computation::build_operation_recursive(), BehavioralHelper::IsStore(), and soft_float_cg_ext::RecursiveExaminate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsStructType()

bool tree_helper::IsStructType ( const tree_nodeConstRef type)
static

◆ IsSystemType()

bool tree_helper::IsSystemType ( const tree_nodeConstRef type)
static

Return true if variable or type is a system one.

Parameters
typeis the treenode corresponding to the decl node or to the type node
Returns
true if variable or type is a system one

Definition at line 1057 of file tree_helper.cpp.

References GET_CONST_NODE, tree_node::get_kind(), and test_panda::type.

Referenced by CWriter::DeclareVariable(), is_system(), BehavioralHelper::PrintConstant(), and DiscrepancyAnalysisCWriter::WriteExtraInitCode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsUnionType()

bool tree_helper::IsUnionType ( const tree_nodeConstRef type)
static

◆ IsUnsignedIntegerType()

bool tree_helper::IsUnsignedIntegerType ( const tree_nodeConstRef type)
static

◆ IsVariableType()

bool tree_helper::IsVariableType ( const tree_nodeConstRef node)
static

Return true if the treenode is a valid variable.

Parameters
nodethe treenode
Returns
true if the treenode is a valid variable

The following one are not considered as variables, but as operations on the variables

Definition at line 2967 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, GET_CONST_NODE, tree_node::get_kind(), tree_node::GetString(), NODE_NOT_YET_SUPPORTED_EC, and THROW_ERROR_CODE.

Referenced by is_a_variable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsVectorType()

bool tree_helper::IsVectorType ( const tree_nodeConstRef type)
static

◆ IsVoidType()

bool tree_helper::IsVoidType ( const tree_nodeConstRef type)
static

Return true if the treenode is of void type.

Parameters
typeis the treenode
Returns
true if the treenode is of void type

Definition at line 2651 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, and THROW_ASSERT.

Referenced by is_a_void(), BehavioralHelper::PrintNode(), HLSCWriter::WriteMainTestbench(), and HLSCWriter::WriteParamInitialization().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsVolatile()

bool tree_helper::IsVolatile ( const tree_nodeConstRef tn)
static

return true in case the tree node corresponds to a volatile variable

Parameters
tnis the tree node
Returns
true in case the variable/ssa_name is a volatile object

Definition at line 4153 of file tree_helper.cpp.

References CGetType(), GET_CONST_NODE, tree_node::get_kind(), TOK_QUAL_CVR, TOK_QUAL_V, and TOK_QUAL_VR.

Referenced by determine_memory_accesses::analyze_node(), memory_allocation::finalize_memory_allocation(), and is_volatile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LastStatement()

bool tree_helper::LastStatement ( const tree_nodeConstRef statement)
static

Return true if statement must be the last of a basic block.

Parameters
statementis the statement to be analyzed
Returns
true if statement must be the last of a basic block

Definition at line 8696 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_CST_NODES, CASE_DECL_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, GET_CONST_NODE, tree_node::get_kind(), THROW_UNREACHABLE, and tree_node::ToString().

Referenced by bloc::PushBack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ look_for_binfo_inheritance()

bool tree_helper::look_for_binfo_inheritance ( const binfo b,
const std::string &  bcs 
)
static

Look for inheritance of a class.

Parameters
bis the binfo to explore
bcsis the name of the base class
Returns
true if an inheritance is found

Definition at line 957 of file tree_helper.cpp.

References binfo::get_base(), binfo::get_baseinfo_size(), GET_CONST_NODE, and binfo::type.

Referenced by is_channel(), is_clock(), is_event(), is_in_port(), is_inout_port(), is_module(), is_out_port(), is_port(), and is_signal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name_function()

std::string tree_helper::name_function ( const tree_managerConstRef tm,
const unsigned int  index 
)
static

◆ NormalizeTypename()

std::string tree_helper::NormalizeTypename ( const std::string &  id)
static

◆ op_symbol() [1/2]

std::string tree_helper::op_symbol ( const tree_nodeConstRef op)
static

Function return the symbol related with the operator op passed as parameter.

Parameters
opis the tree node of the expression
Returns
the string corresponding to the operator

Definition at line 4637 of file tree_helper.cpp.

References refcount< T >::get().

Referenced by GimpleWriter::GimpleWriter(), and BehavioralHelper::PrintNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ op_symbol() [2/2]

std::string tree_helper::op_symbol ( const tree_node op)
static

Function return the symbol related with the operator op passed as parameter.

Parameters
opis the tree node of the expression
Returns
the string corresponding to the operator

Definition at line 4642 of file tree_helper.cpp.

References CASE_CPP_NODES, CASE_CST_NODES, CASE_DECL_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, GET_CONST_NODE, tree_node::get_kind(), tree_node::get_kind_text(), GetConstValue(), tree_node::index, STR, THROW_ASSERT, and THROW_ERROR.

Here is the call graph for this function:

◆ print_function_name()

std::string tree_helper::print_function_name ( const tree_managerConstRef TM,
const function_decl fd 
)
static

Return the name of the function in a string.

Parameters
nodeis the function_decl

Definition at line 467 of file tree_helper.cpp.

References function_decl::body, function_decl::builtin_flag, GET_CONST_NODE, GET_INDEX_CONST_NODE, tree_node::get_kind(), tree_node::get_kind_text(), tree_manager::is_top_function(), attr::list_attr, decl_node::mngl, decl_node::name, NormalizeTypename(), print_type(), THROW_ERROR, TI_getTokenName(), TOK_ASSIGN, TOK_CONVERSION, TOK_LSHIFT, TOK_MEMBER, TOK_OPERATOR, TOK_PRIVATE, TOK_PROTECTED, TOK_PUBLIC, TOK_RSHIFT, and decl_node::type.

Referenced by CallGraphManager::AddCallPoint(), CallGraphManager::AddFunctionAndCallPoint(), determine_memory_accesses::analyze_node(), operations_cfg_computation::build_operation_recursive(), InterfaceInfer::ChasePointerInterfaceRecurse(), tree_manipulation::CloneFunction(), tree_manager::function_index_mngl(), tree_manager::GetFunction(), GetFunctionName(), tree_manipulation::InlineFunctionCall(), HWCallInjection::InternalExec(), call_expr_fix::InternalExec(), IR_lowering::InternalExec(), BehavioralHelper::is_va_start_call(), CallGraphManager::IsCallPoint(), BehavioralHelper::PrintConstant(), BehavioralHelper::PrintInit(), BehavioralHelper::PrintNode(), PrintType(), BehavioralHelper::PrintVariable(), CheckSystemType::recursive_examinate(), soft_float_cg_ext::RecursiveExaminate(), application_manager::RegisterTransformation(), CallGraphManager::RemoveCallPoint(), bloc::RemoveStmt(), and soft_float_cg_ext::soft_float_cg_ext().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_type()

std::string tree_helper::print_type ( const tree_managerConstRef TM,
unsigned int  type,
bool  global = false,
bool  print_qualifiers = false,
bool  print_storage = false,
unsigned int  var = 0,
const var_pp_functorConstRef vppf = var_pp_functorConstRef(),
const std::string &  prefix = "",
const std::string &  tail = "" 
)
static

Print a type and its variable in case var is not zero.

Parameters
typeis the type of var.
globaltells if the variable is global
print_qualifierstells if the qualifiers (i.e. "const") have to be printed
print_storagetells if the storage (i.e. "static") has to be printed
varis the variable.
vppfis the pointer to the functor used to dump the possible variable var
prefixis the string to be appended at the begining of the printing
Returns
std::string the printed stringFIXME: to be remove after substitution with PrintType

Definition at line 5139 of file tree_helper.cpp.

References tree_manager::CGetTreeReindex(), and PrintType().

Referenced by CallGraphBuiltinCall::buildTypeToDeclaration(), CWriter::compute_phi_nodes(), CallGraphBuiltinCall::ExtendCallGraph(), soft_float_cg_ext::InternalExec(), print_function_name(), PrintType(), soft_float_cg_ext::signature_lowering(), dead_code_eliminationIPA::signature_opt(), and soft_float_cg_ext::soft_float_cg_ext().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintType()

std::string tree_helper::PrintType ( const tree_managerConstRef TM,
const tree_nodeConstRef type,
bool  global = false,
bool  print_qualifiers = false,
bool  print_storage = false,
const tree_nodeConstRef var = nullptr,
const var_pp_functorConstRef vppf = var_pp_functorConstRef(),
const std::string &  prefix = "",
const std::string &  tail = "" 
)
static

Print a type and its variable in case var is not zero.

Parameters
typeis the type of var.
globaltells if the variable is global
print_qualifierstells if the qualifiers (i.e. "const") have to be printed
print_storagetells if the storage (i.e. "static") has to be printed
varis the variable.
vppfis the pointer to the functor used to dump the possible variable var
prefixis the string to be appended at the begining of the printing
Returns
std::string the printed string

patch for unsigned char

patch for va_list

Ad hoc management of vector of bool

references are translated as pointer type objects

Compute the dimensions

add alignment

tree_list are used for parameters declaration: in that case void_type has to be removed from the last type parameter

Definition at line 5149 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_CST_NODES, CASE_DECL_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, tree_manager::CGetTreeReindex(), CGetType(), debug_level, DEBUG_LEVEL_PARANOIC, GET_CONST_NODE, tree_manager::get_implementation_node(), GET_INDEX_CONST_NODE, GET_INDEX_NODE, tree_node::get_kind(), GET_NODE, GetConstValue(), GetRealType(), INDENT_DBG_MEX, tree_node::index, is_static(), NormalizeTypename(), print_function_name(), print_type(), return_C_qualifiers(), Size(), SplitString(), STR, THROW_ASSERT, THROW_ERROR, THROW_UNREACHABLE, and test_panda::type.

Referenced by HLSInstructionWriter::declareFunction(), InstructionWriter::declareFunction(), InterfaceInfer::Exec(), HasToBeDeclared(), BehavioralHelper::print_forward_declaration(), BehavioralHelper::print_type(), print_type(), BehavioralHelper::print_type_declaration(), BehavioralHelper::PrintConstant(), BehavioralHelper::PrintNode(), BehavioralHelper::PrintVarDeclaration(), BehavioralHelper::PrintVariable(), CWriter::WriteBuiltinWaitCall(), HLSCWriter::WriteMainTestbench(), DiscrepancyAnalysisCWriter::WriteMainTestbench(), HLSCWriter::WriteParamDecl(), and HLSCWriter::WriteParamInitialization().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecursiveGetTypesToBeDeclared()

void tree_helper::RecursiveGetTypesToBeDeclared ( std::set< tree_nodeConstRef, TreeNodeConstSorter > &  returned_types,
const tree_nodeConstRef type,
const bool  recursion,
const bool  without_transformation,
const bool  before 
)
staticprivate

Return the types to be declared before/after declaring type.

Parameters
returned_typesis the set of type declarations
typeis the starting type
recursionmust be set to true in recursive call
without_transformationspecifies if we are not restructuring the code
beforeis true/false if we are computing types which must be declared before/after type

Non pointer fields must be declared before structs, pointer fields can be declared after; in some cases they must be declared after (circular dependencies)

Here true is correct

Non pointer fields must be declared before structs, pointer fields can be declared after; in some cases they must be declared after (circular dependencies)

Here true is correct

Definition at line 1108 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_CST_NODES, CASE_DECL_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_UNARY_EXPRESSION, CGetElements(), CGetFieldTypes(), CGetPointedType(), debug_level, DEBUG_LEVEL_PARANOIC, GET_CONST_NODE, tree_node::get_kind(), GetFunctionReturnType(), GetParameterTypes(), INDENT_DBG_MEX, IsAligned(), IsPointerType(), test_panda::parameters, STR, THROW_UNREACHABLE, and test_panda::type.

Referenced by GetTypesToBeDeclaredAfter(), and GetTypesToBeDeclaredBefore().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ return_C_qualifiers()

std::string tree_helper::return_C_qualifiers ( const TreeVocabularyTokenTypes_TokenEnum  quals,
bool  real_const 
)
static

return the qualifiers in C format

Parameters
qualsstore the token encoding the qualifiers
real_constis true when we need a real constant (e.g., const is not commented)

Definition at line 4305 of file tree_helper.cpp.

References FIRST_TOKEN, STR, THROW_UNREACHABLE, TOK_QUAL_C, TOK_QUAL_CR, TOK_QUAL_CV, TOK_QUAL_CVR, TOK_QUAL_R, TOK_QUAL_V, and TOK_QUAL_VR.

Referenced by GimpleWriter::GimpleWriter(), BehavioralHelper::print_type_declaration(), and PrintType().

Here is the caller graph for this function:

◆ return_qualifier_prefix()

std::string tree_helper::return_qualifier_prefix ( const TreeVocabularyTokenTypes_TokenEnum  quals)
static

return the prefix given a qualifier

Parameters
qualsstore the token encoding the qualifiers

Definition at line 4271 of file tree_helper.cpp.

References STR, THROW_UNREACHABLE, TOK_QUAL_C, TOK_QUAL_CR, TOK_QUAL_CV, TOK_QUAL_CVR, TOK_QUAL_R, TOK_QUAL_V, and TOK_QUAL_VR.

Referenced by tree_manager::check_for_decl(), and tree_manager::check_for_type().

Here is the caller graph for this function:

◆ Size()

unsigned long long tree_helper::Size ( const tree_nodeConstRef tn)
static

Return the size of a tree object.

Parameters
tnis the tree object
Returns
the size of the object

Definition at line 153 of file tree_helper.cpp.

References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_FAKE_NODES, CASE_PRAGMA_NODES, CASE_TERNARY_EXPRESSION, CASE_UNARY_EXPRESSION, CGetType(), debug_level, DEBUG_LEVEL_PARANOIC, GET_CONST_NODE, tree_node::get_kind(), GetConstValue(), INDENT_DBG_MEX, IsRealType(), IsSignedIntegerType(), max, min, APInt::minBitwidth(), sign_reduce_bitstring(), STR, and THROW_UNREACHABLE.

Referenced by AccessedMaximumBitsize(), AccessedMinimunBitsize(), mux_connection_binding::add_conversion(), memory::add_internal_symbol(), fu_binding::add_to_SM(), mux_connection_binding::address_precision(), memory_allocation::allocate_parameters(), AllocatedMemorySize(), StorageValueInformation::are_value_bitsize_compatible(), operations_cfg_computation::build_operation_recursive(), minimal_interface::build_wrapper(), top_entity_parallel_cs::BW_loop_iter(), AllocationInformation::can_be_asynchronous_ram(), AllocationInformation::CanBeMerged(), lut_transformation::CHECK_BIN_EXPR_BOOL_SIZE(), lut_transformation::CHECK_BIN_EXPR_INT_SIZE(), lut_transformation::CHECK_COND_EXPR_SIZE(), lut_transformation::CHECK_NOT_EXPR_SIZE(), simple_code_motion::CheckMovable(), memory::compute_next_base_address(), CreateAddressTranslation::ComputeAddress(), mux_connection_binding::create_connections(), tree_manipulation::create_gimple_modify_stmt(), tree_manipulation::create_phi_node(), tree_manipulation::create_ternary_operation(), tree_manager::CreateUniqueIntegerCst(), DiscrepancyAnalysisCWriter::DeclareLocalVariables(), vcd_utility::detect_fixed_address_mismatch(), mux_connection_binding::determine_connection(), IR_lowering::division_by_a_constant(), TestbenchGeneration::Exec(), InterfaceInfer::Exec(), IR_lowering::expand_MC(), IR_lowering::expand_mult_const(), IR_lowering::expand_smod_pow2(), fu_binding::fill_array_ref_memory(), memory_allocation::finalize_memory_allocation(), get_array_dim_and_bitsize(), HLS_manager::get_constant_string(), WB4_interface::get_data_bus_bitsize(), get_data_bus_bitsize(), memory::get_last_address(), BehavioralHelper::get_size(), GetArrayDimensions(), GetArrayElementSize(), AllocationInformation::GetCondExprTimeLatency(), AllocationInformation::GetConnectionTime(), GetConstValue(), AllocationInformation::GetCycleLatency(), AllocationInformation::GetNodeTypePrec(), AllocationInformation::GetPhiConnectionLatency(), ComputeReservedMemory::GetReservedBytes(), AllocationInformation::GetStatementArea(), AllocationInformation::GetTimeLatency(), CSE::hash_check(), soft_float_cg_ext::int_type_for(), allocation::IntegrateTechnologyLibraries(), FixStructsPassedByValue::InternalExec(), BuiltinWaitCallModuleGenerator::InternalExec(), BuiltinWaitCallNModuleGenerator::InternalExec(), extract_patterns::InternalExec(), mem_dominator_allocation::InternalExec(), compute_implicit_calls::InternalExec(), dead_code_elimination::InternalExec(), IR_lowering::InternalExec(), soft_float_cg_ext::InternalExec(), allocation::InternalExec(), is_a_misaligned_vector(), IsSameType(), mux_connection_binding::object_bitsize(), Bit_Value_opt::optimize(), vcd_utility::print_discrepancy(), TestbenchGeneration::print_var_init(), BehavioralHelper::PrintNode(), PrintType(), MemoryInitializationCWriter::Process(), MemoryInitializationWriter::Process(), lut_transformation::ProcessBasicBlock(), Bit_Value_opt::propagateValue(), hls_div_cg_ext::recursive_examinate(), soft_float_cg_ext::RecursiveExaminate(), compute_implicit_calls::replace_with_memcpy(), compute_implicit_calls::replace_with_memset(), same_size_fields(), InterfaceInfer::setReadInterface(), InterfaceInfer::setWriteInterface(), soft_float_cg_ext::signature_lowering(), fu_binding::specialise_fu(), Vectorize::Transform(), InterfaceInfer::interface_info::update(), fu_binding::write_init(), CWriter::WriteBuiltinWaitCall(), DiscrepancyAnalysisCWriter::WriteExtraInitCode(), HLSCWriter::WriteMainTestbench(), and DiscrepancyAnalysisCWriter::writePostInstructionInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ debug_level

int tree_helper::debug_level = 0
static

◆ SC_builtin_scalar_type

const std::set< std::string > tree_helper::SC_builtin_scalar_type
staticprivate
Initial value:
= {
"sc_int", "sc_uint", "sc_biguint", "sc_bigint", "sc_lv", "sc_in_rv",
"sc_out_rv", "sc_inout_rv", "sc_bv", "sc_signal_rv"}

store the set of SystemC class for which the template parameter correspond to the bit size of the type

Definition at line 85 of file tree_helper.hpp.

◆ SC_tmpl_class

const std::set< std::string > tree_helper::SC_tmpl_class
staticprivate
Initial value:
= {"sc_signal", "sc_in", "sc_out",
"sc_inout", "sc_port", "sc_export"}

store the set of SystemC class for which the type correspond to the template parameter

Header include.

parser/compiler include STL include Tree include Utility include built in type without parameter "sc_in_resolved" is not a template and inherits from sc_in<sc_dt::sc_logic> "sc_inout_resolved" is not a template and inherits from sc_inout<sc_dt::sc_logic> "sc_out_resolved" is not a template and inherits from sc_inout_resolved "sc_in_clk" is not a template and is a typedef of sc_in<bool> "sc_out_clk" is not a template and is a typedef of sc_out<bool> "sc_inout_clk" is not a template and is a typedef of sc_inout<bool> builtin types with parameter "sc_lv" is a template, has a parameter (W) "sc_bv" is a template, has a parameter (W) "sc_in_rv" is a template, has a parameter (W) and inherits from sc_in<sc_dt::sc_lv<W> > "sc_out_rv" is a template, has a parameter (W) and inherits from sc_inout_rv<W> "sc_inout_rv" is a template, has a parameter (W) and inherits from sc_inout<sc_dt::sc_lv<W> > "sc_signal_rv" is a template, has a parameter (W) and inherits from sc_signal<sc_dt::sc_lv<W> > "sc_fifo_in" is a template, has a parameter (T) and inherits from sc_port<sc_fifo_in_if<T>,0> "sc_fifo_out" is a template, has a parameter (T) and inherits from sc_port<sc_fifo_out_if<T>,0>

Definition at line 82 of file tree_helper.hpp.

Referenced by GetTypeName().

◆ TLM_SC_builtin_scalar_type

const std::set< std::string > tree_helper::TLM_SC_builtin_scalar_type
staticprivate
Initial value:
= {
"tlm_blocking_put_if", "tlm_blocking_get_if", "tlm_nonblocking_get_if", "tlm_nonblocking_put_if",
"tlm_transport_if"
}

store the set of TLM SystemC class for which the size corresponds to the sum of the size of template parameters

Definition at line 88 of file tree_helper.hpp.


The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:04:07 for PandA-2024.02 by doxygen 1.8.13