PandA-2024.02
Public Member Functions | Static Public Member Functions | Data Fields | Friends
tree_node Class Referenceabstract

Abstract pure class for the tree structure. More...

#include <tree_node.hpp>

Inheritance diagram for tree_node:
Inheritance graph
[legend]

Public Member Functions

 tree_node (unsigned int i)
 Constructor. More...
 
virtual ~tree_node ()=default
 Destructor. More...
 
virtual enum kind get_kind () const =0
 Virtual function returning the type of the actual class. More...
 
virtual std::string get_kind_text () const =0
 Virtual function returning the name of the actual class. More...
 
virtual void visit (tree_node_visitor *const v) const
 virtual function used to traverse the tree_node data structure. More...
 
std::string ToString () const
 Print this node as string in gimple format. More...
 

Static Public Member Functions

static enum kind get_kind (const std::string &name)
 Given a string, return the corresponding kind. More...
 
static std::string GetString (const enum kind k)
 Given a kind, return the corresponding string. More...
 

Data Fields

const unsigned int index
 Represent the index read from the raw file and the index-1 of the vector of tree_node associated to the functions vector present in the tree_manager. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const tree_node *tn)
 Friend definition of the << operator. More...
 
std::ostream & operator<< (std::ostream &os, const tree_nodeRef &tn)
 Friend definition of the << operator. More...
 

Detailed Description

Abstract pure class for the tree structure.

This node and in particular its refCount type will be used to describe all nodes read from the tree GCC raw structure.

Definition at line 139 of file tree_node.hpp.

Constructor & Destructor Documentation

◆ tree_node()

tree_node::tree_node ( unsigned int  i)
inlineexplicit

Constructor.

Definition at line 151 of file tree_node.hpp.

References k, operator<<(), and ToString().

Referenced by handler::visit().

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

◆ ~tree_node()

virtual tree_node::~tree_node ( )
virtualdefault

Destructor.

Member Function Documentation

◆ get_kind() [1/2]

virtual enum kind tree_node::get_kind ( ) const
pure virtual

Virtual function returning the type of the actual class.

Referenced by tree_helper::AccessedMaximumBitsize(), tree_helper::AccessedMinimunBitsize(), gimple_node::AddVover(), gimple_node::AddVuse(), tree_helper::AllocatedMemorySize(), determine_memory_accesses::analyze_node(), operations_cfg_computation::build_operation_recursive(), CallGraphManager::call_graph_computation_recursive(), tree_helper::CGetElements(), tree_helper::CGetPointedType(), tree_helper::CGetType(), lut_transformation::CHECK_BIN_EXPR_INT_SIZE(), tree_manager::check_for_decl(), tree_manager::check_for_type(), FunctionExpander::check_lib_type(), tree_manager::check_ssa_uses(), lut_transformation::CheckIfPI(), simple_code_motion::CheckMovable(), Vectorize::ClassifyTreeNode(), tree_manipulation::CloneFunction(), tree_manager::collapse_into(), tree_helper::compute_ssa_uses_rec_ptr(), tree_helper::ComputeSsaUses(), BitLatticeManipulator::constructor_bitstring(), tree_helper::CountPointers(), tree_manipulation::create_binary_operation(), mux_connection_binding::create_connections(), tree_manipulation::create_extract_bit_expr(), tree_manipulation::create_gimple_cond(), tree_manipulation::create_gimple_modify_stmt(), tree_manipulation::create_gimple_return(), tree_manipulation::create_lut_expr(), tree_manipulation::create_parm_decl(), tree_manipulation::create_phi_node(), tree_manipulation::create_quaternary_operation(), tree_manipulation::create_result_decl(), tree_manipulation::create_ssa_name(), tree_manipulation::create_ternary_operation(), tree_node_dup::create_tree_node(), tree_node_index_factory::create_tree_node(), tree_manipulation::create_unary_operation(), tree_manipulation::create_var_decl(), tree_manipulation::CreateAddrExpr(), tree_manipulation::CreateIntegerCst(), tree_manipulation::CreateNopExpr(), VcdSignalSelection::CrossPropagateAddrSsa(), CWriter::DeclareLocalVariables(), VcdSignalSelection::DetectInvalidReturns(), mux_connection_binding::determine_connection(), OrderedBasicBlock::dominates(), tree_manager::erase_usage_info(), Schedule::EvaluateCondsMerging(), PragmaAnalysis::Exec(), rebuild_initialization2::extract_var_decl(), extractOp1(), tree_manager::function_index_mngl(), tree_helper::get_array_dim_and_bitsize(), BehavioralHelper::get_attributes(), operations_cfg_computation::get_first_node(), fsm_controller::get_guard_value(), BehavioralHelper::get_intermediate_var(), tree_manager::get_next_vers(), tree_helper::get_required_values(), tree_helper::get_used_variables(), tree_helper::GetArrayDimensions(), tree_helper::GetArrayElementSize(), getAssign(), tree_helper::GetBaseVariable(), tree_helper::GetConstValue(), tree_helper::GetFormalIth(), tree_manager::GetFunction(), tree_helper::GetFunctionName(), tree_helper::GetFunctionReturnType(), BehavioralHelper::GetInit(), application_manager::GetProducedValue(), tree_helper::GetRecordTypeName(), AllocationInformation::GetStatementArea(), tree_helper::GetTemplateTypeName(), tree_helper::GetTypeName(), tree_helper::GetUnqualifiedType(), GimpleWriter::GimpleWriter(), BehavioralHelper::has_bit_field(), tree_helper::HasToBeDeclared(), BitLatticeManipulator::inf(), VcdSignalSelection::InitialPhiResIsAddress(), VcdSignalSelection::InitialSsaIsAddress(), tree_manipulation::InlineFunctionCall(), tree_manager::insert_usage_info(), FixStructsPassedByValue::InternalExec(), LoopsAnalysisBambu::InternalExec(), compute_implicit_calls::InternalExec(), IR_lowering::InternalExec(), BehavioralHelper::is_a_imagpart_expr(), BehavioralHelper::is_a_realpart_expr(), BehavioralHelper::is_a_result_decl(), tree_helper::is_an_addr_expr(), tree_helper::is_concat_bit_ior_expr(), fanout_opt::is_dest_relevant(), tree_helper::is_simple_pointer_plus_test(), tree_manager::is_top_function(), BehavioralHelper::is_va_start_call(), BehavioralHelper::is_var_args(), tree_helper::IsAligned(), isCompare(), tree_helper::IsConstant(), tree_helper::IsExternDeclaration(), tree_helper::IsFunctionDeclaration(), tree_helper::IsInLibbambu(), tree_helper::IsLoad(), tree_helper::IsLut(), tree_helper::IsPackedType(), tree_helper::IsPointerResolved(), tree_helper::IsPositiveIntegerValue(), tree_helper::IsStaticDeclaration(), tree_helper::IsStore(), tree_helper::IsSystemType(), tree_helper::IsVariableType(), tree_helper::IsVolatile(), dead_code_elimination::kill_uses(), tree_helper::LastStatement(), rebuild_initialization2::look_for_ROMs(), CallGraphBuiltinCall::lookForBuiltinCall(), Vectorize::LookForScalar(), tree_manager::merge_tree_managers(), tree_helper::op_symbol(), type_casting::operator()(), BBWriter::operator()(), FunctionExpander::operator()(), tree_helper::print_function_name(), BehavioralHelper::PrintConstant(), BehavioralHelper::PrintInit(), BehavioralHelper::PrintNode(), tree_helper::PrintType(), VcdSignalSelection::PropagateAddrParamToSsa(), IR_lowering::reached_max_transformation_limit(), parm2ssa::recursive_analysis(), string_cst_fix::recursive_analysis(), hls_div_cg_ext::recursive_examinate(), VarDeclFix::recursive_examinate(), CheckSystemType::recursive_examinate(), soft_float_cg_ext::RecursiveExaminate(), tree_helper::RecursiveGetTypesToBeDeclared(), VarComputation::RecursivelyAnalyze(), tree_manager::RecursiveReplaceTreeNode(), VcdSignalSelection::SelectInitialAddrParam(), VcdSignalSelection::SelectInitialSsa(), gimple_node::SetVdef(), VcdSignalSelection::SingleStepPropagateAddrSsa(), tree_helper::Size(), BitLatticeManipulator::Size(), BitLatticeManipulator::string_cst_bitstring(), BitLatticeManipulator::sup(), Vectorize::Transform(), varFound(), fu_binding::write_init(), DiscrepancyAnalysisCWriter::writePostInstructionInfo(), DiscrepancyAnalysisCWriter::writePreInstructionInfo(), EdgeCWriter::writeRoutineInstructions_rec(), and CWriter::writeRoutineInstructions_rec().

Here is the caller graph for this function:

◆ get_kind() [2/2]

enum kind tree_node::get_kind ( const std::string &  name)
static

◆ get_kind_text()

virtual std::string tree_node::get_kind_text ( ) const
pure virtual

◆ GetString()

std::string tree_node::GetString ( const enum kind  k)
static

Given a kind, return the corresponding string.

Parameters
kis the kind
Returns
the name of the kind

Definition at line 120 of file tree_node.cpp.

References BINARY_EXPRESSION_TREE_NODES, BOOST_PP_SEQ_FOR_EACH(), CONST_OBJ_TREE_NODES, CPP_STMT_NODES, DECL_NODE_TREE_NODES, GIMPLE_NODES, k, KIND_NAME, MISCELLANEOUS_EXPR_TREE_NODES, MISCELLANEOUS_OBJ_TREE_NODES, PANDA_EXTENSION_TREE_NODES, QUATERNARY_EXPRESSION_TREE_NODES, TERNARY_EXPRESSION_TREE_NODES, THROW_ASSERT, TYPE_NODE_TREE_NODES, UNARY_EXPRESSION_TREE_NODES, and VISIT_TREE_NODE_MACRO.

Referenced by Bit_Value::backward_transfer(), operations_cfg_computation::build_operation_recursive(), UnaryOpNode::eval(), BinaryOpNode::eval(), BinaryOpNode::evaluate(), BitValueIPA::Exec(), tree_manager::find(), Bit_Value::forward(), Bit_Value::forward_transfer(), soft_float_cg_ext::generate_interface(), AllocationInformation::GetCycleLatency(), AllocationInformation::GetStatementArea(), AllocationInformation::GetTimeLatency(), FunctionCallOpt::HasConstantArgs(), BitLatticeManipulator::inf(), VcdSignalSelection::InitialPhiResIsAddress(), VcdSignalSelection::InitialSsaIsAddress(), FixStructsPassedByValue::InternalExec(), compute_implicit_calls::InternalExec(), dead_code_elimination::InternalExec(), AllocationInformation::is_operation_bounded(), tree_helper::IsVariableType(), Range::makeSatisfyingCmpRegion(), BinaryOpNode::opCtorGenerator(), UnaryOpNode::print(), BinaryOpNode::print(), BinaryOpNode::printDot(), TernaryOpNode::printDot(), VcdSignalSelection::PropagateAddrSsa(), VarComputation::RecursivelyAnalyze(), VcdSignalSelection::SelectInitialAddrParam(), VcdSignalSelection::SingleStepPropagateAddrSsa(), VcdSignalSelection::SingleStepPropagateParamToSsa(), SymbRange::solveFuture(), and BitLatticeManipulator::sup().

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

◆ ToString()

std::string tree_node::ToString ( ) const

Print this node as string in gimple format.

Returns
the string containing the gimple representation of this node

Referenced by ssa_name::AddUseStmt(), tree_helper::AllocatedMemorySize(), determine_memory_accesses::analyze_node(), Bit_Value::backward_transfer(), CallGraphManager::call_graph_computation_recursive(), AllocationInformation::can_implement_set(), Schedule::CanBeMoved(), ssa_name::CGetDefStmt(), InterfaceInfer::ChasePointerInterfaceRecurse(), Vectorize::ClassifyTreeNode(), tree_manager::collapse_into(), tree_helper::compute_ssa_uses_rec_ptr(), BitLatticeManipulator::constructor_bitstring(), PragmaAnalysis::create_omp_pragma(), tree_manipulation::create_ssa_name(), tree_manipulation::CreateNopExpr(), tree_manipulation::CreateUnsigned(), Vectorize::DuplicateIncrement(), IR_lowering::expand_mult_const(), tree_manipulation::ExtractCondition(), extractOp1(), Bit_Value::forward_transfer(), liveness::get_op_where_defined(), CSE::hash_check(), VcdSignalSelection::InitialPhiResIsAddress(), VcdSignalSelection::InitialSsaIsAddress(), BuildVirtualPhi::InternalExec(), fanout_opt::InternalExec(), operations_cfg_computation::InternalExec(), cdfc_module_binding::InternalExec(), tree_helper::LastStatement(), rebuild_initialization2::look_for_ROMs(), bloc::manageCallGraph(), Bit_Value_opt::optimize(), bloc::PushAfter(), bloc::PushBack(), bloc::PushBefore(), bloc::PushFront(), string_cst_fix::recursive_analysis(), VarDeclFix::recursive_examinate(), tree_manager::RecursiveReplaceTreeNode(), PhiOpt::RemoveCondExpr(), gimple_phi::RemoveDefEdge(), bloc::RemovePhi(), bloc::RemoveStmt(), ssa_name::RemoveUse(), tree_manager::ReplaceTreeNode(), PhiOpt::ReplaceVirtualUses(), VcdSignalSelection::SelectInitialAddrParam(), InterfaceInfer::setReadInterface(), InterfaceInfer::setWriteInterface(), VcdSignalSelection::SingleStepPropagateAddrSsa(), VcdSignalSelection::SingleStepPropagateParamToSsa(), soft_float_cg_ext::ssa_lowering(), ValueDFS::ToString(), typename_type(), and VarNode::updateIR().

Here is the caller graph for this function:

◆ visit()

virtual void tree_node::visit ( tree_node_visitor *const  v) const
virtual

virtual function used to traverse the tree_node data structure.

Parameters
vis a reference to the tree_node visitor class

Reimplemented in lut_expr, vector_type, vector_cst, var_decl, union_type, type_decl, try_block, tree_vec, tree_list, nontype_argument_pack, type_argument_pack, template_parm_index, template_decl, target_mem_ref461, target_mem_ref, target_expr, gimple_switch, string_cst, statement_list, ssa_name, scope_ref, return_stmt, gimple_return, gimple_resx, result_decl, reference_type, record_type, real_type, real_cst, pointer_type, gimple_predict, gimple_phi, parm_decl, overload, namespace_decl, method_type, gimple_label, integer_type, integer_cst, identifier_node, handler, gimple_goto, gimple_nop, gimple_assign, function_type, function_decl, field_decl, expr_stmt, enumeral_type, constructor, const_decl, gimple_cond, complex_type, complex_cst, expr_pack_expansion, type_pack_expansion, cast_expr, case_label_expr, gimple_call, aggr_init_expr, call_expr, block, binfo, gimple_bind, baselink, gimple_asm, array_type, error_mark, cst_node, memory_tag, type_node, quaternary_expr, ternary_expr, binary_expr, unary_expr, gimple_node, expr_node, decl_node, gimple_multi_way_if, WeightedNode, gimple_for, gimple_while, omp_declare_simd_pragma, omp_simd_pragma, omp_for_pragma, omp_atomic_pragma, omp_critical_pragma, omp_task_pragma, omp_target_pragma, omp_section_pragma, omp_parallel_sections_pragma, omp_sections_pragma, omp_parallel_pragma, omp_pragma, blackbox_pragma, issue_pragma, call_point_hw_pragma, call_hw_pragma, map_pragma, statistical_profiling, profiling_pragma, gimple_pragma, tree_reindex, and null_node.

Referenced by CallGraphBuiltinCall::buildTypeToDeclaration(), BehavioralHelper::GetTypecast(), GimpleWriter::GimpleWriter(), tree_node_finder::tree_node_finder(), and typename_type().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  os,
const tree_node tn 
)
friend

Friend definition of the << operator.

Parameters
osis the output stream
tnis the tree_node to be printed

Referenced by typename_type().

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  os,
const tree_nodeRef tn 
)
friend

Friend definition of the << operator.

Parameters
osis the output stream
tnis the tree_node to be printed

Definition at line 192 of file tree_node.cpp.

Field Documentation

◆ index

const unsigned int tree_node::index

Represent the index read from the raw file and the index-1 of the vector of tree_node associated to the functions vector present in the tree_manager.

Definition at line 146 of file tree_node.hpp.

Referenced by tree_helper::AccessedMaximumBitsize(), gimple_phi::AddDefEdge(), ssa_name::AddUseStmt(), determine_memory_accesses::analyze_node(), CBackend::AnalyzeInclude(), PhiOpt::ApplyMultiMerge(), IR_lowering::array_ref_lowering(), Bit_Value::backward(), Bit_Value::backward_transfer(), Vectorize::ClassifyTreeNode(), CreateAddressTranslation::ComputeAddress(), tree_manipulation::create_gimple_call(), tree_manipulation::create_ssa_name(), tree_node_dup::create_tree_node(), tree_manager::create_unique_const(), tree_manipulation::CreateAddrExpr(), tree_manipulation::CreateAndExpr(), tree_manipulation::CreateCallExpr(), tree_manipulation::CreateEqExpr(), tree_manipulation::CreateGimpleAssign(), tree_manipulation::CreateGimpleAssignAddrExpr(), tree_manipulation::CreateIntegerCst(), tree_manipulation::CreateNopExpr(), tree_manipulation::CreateNotExpr(), tree_manipulation::CreateOrExpr(), CWriter::DeclareFunctionTypes(), CWriter::DeclareVariable(), Vectorize::DuplicateIncrement(), CreateAddressTranslation::Exec(), CallGraphBuiltinCall::ExtendCallGraph(), tree_manipulation::ExtractCondition(), memory_allocation::finalize_memory_allocation(), Bit_Value::forward_transfer(), tree_helper::get_field_idx(), tree_helper::get_formal_ith(), Schedule::GetBBEndingTime(), BehavioralHelper::GetFunctionReturnType(), OpNodeInfo::GetNodeId(), AllocationInformation::GetNodeTypePrec(), tree_manipulation::GetPointerType(), tree_helper::GetUnqualified(), GimpleWriter::GimpleWriter(), CSE::hash_check(), VcdSignalSelection::InitialPhiResIsAddress(), VcdSignalSelection::InitialSsaIsAddress(), BuildVirtualPhi::InternalExec(), rebuild_initialization::InternalExec(), compute_implicit_calls::InternalExec(), CondExprRestructuring::InternalExec(), commutative_expr_restructuring::InternalExec(), dead_code_elimination::InternalExec(), MultipleEntryIfReduction::InternalExec(), allocation::InternalExec(), BitLatticeManipulator::IsSignedIntegerType(), rebuild_initialization2::look_for_ROMs(), CallGraphBuiltinCall::lookForBuiltinCall(), tree_helper::op_symbol(), tree_reindexCompare::operator()(), type_casting::operator()(), TreeNodeConstSorter::operator()(), TreeNodeSorter::operator()(), FunctionCallTypeCleanup::ParametersTypeCleanup(), tree_reindex::print(), tree_helper::PrintType(), bloc::PushAfter(), bloc::PushBefore(), soft_float_cg_ext::RecursiveExaminate(), VarComputation::RecursivelyAnalyze(), tree_manager::RecursiveReplaceTreeNode(), gimple_phi::RemoveDefEdge(), bloc::RemovePhi(), bloc::RemoveStmt(), bloc::Replace(), gimple_phi::ReplaceDefEdge(), InterfaceInfer::setReadInterface(), InterfaceInfer::setWriteInterface(), soft_float_cg_ext::signature_lowering(), VcdSignalSelection::SingleStepPropagateAddrSsa(), soft_float_cg_ext::ssa_lowering(), Vectorize::Transform(), typename_type(), BitLatticeManipulator::update_current(), bloc::update_new_stmt(), expr_pack_expansion::visit(), and DiscrepancyAnalysisCWriter::writePostInstructionInfo().


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

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