PandA-2024.02
Public Member Functions | Private Member Functions | Private Attributes
tree_node_dup Struct Reference

#include <tree_node_dup.hpp>

Inheritance diagram for tree_node_dup:
Inheritance graph
[legend]
Collaboration diagram for tree_node_dup:
Collaboration graph
[legend]

Public Member Functions

 tree_node_dup (CustomUnorderedMapStable< unsigned int, unsigned int > &_remap, const application_managerRef _AppM, unsigned int _remap_bbi=0, unsigned int _remap_loop_id=0, bool _use_counting=false)
 Construct a new tree node dup object. More...
 
unsigned int create_tree_node (const tree_nodeRef &tn, int mode=tree_node_dup_mode::DEFAULT)
 tree_node visitors More...
 
- Public Member Functions inherited from object_visitor
virtual ~object_visitor ()
 destructor More...
 
 BOOST_PP_SEQ_FOR_EACH (OPERATOR_MACRO, BOOST_PP_EMPTY, VISITED_OBJ_SEQ1)
 virtual template object functor More...
 
 BOOST_PP_SEQ_FOR_EACH (OPERATOR_MACRO, BOOST_PP_EMPTY, VISITED_OBJ_SEQ2)
 

Private Member Functions

unsigned int get_bbi (unsigned int old_bb)
 
unsigned int get_loop_id (unsigned int old_loop_id)
 

Private Attributes

CustomUnorderedMapStable< unsigned int, unsigned int > & remap
 remap old indexes in new indexes More...
 
const bool use_counting
 enable use counting on duplicated instances (when possible) More...
 
unsigned int remap_bbi
 basic block indexes remap base More...
 
CustomUnorderedMapStable< unsigned int, unsigned int > remap_bb
 remap old basic block indexes in new indexes More...
 
unsigned int remap_loop_id
 basic block loop ids remap base More...
 
CustomUnorderedMapStable< unsigned int, unsigned int > remap_lid
 remap old basic block loop ids in new ids More...
 
const application_managerRef AppM
 application manager More...
 
const tree_managerRef TM
 tree manager More...
 
tree_nodecurr_tree_node_ptr
 current tree node filled according to the source tree_node More...
 
bloccurr_bloc
 current basic block pointer More...
 
tree_nodeRef source_tn
 current tree_node source More...
 
blocRef source_bloc
 current basic block source More...
 
int mode
 enables full nodes duplication More...
 

Detailed Description

Definition at line 71 of file tree_node_dup.hpp.

Constructor & Destructor Documentation

◆ tree_node_dup()

tree_node_dup::tree_node_dup ( CustomUnorderedMapStable< unsigned int, unsigned int > &  _remap,
const application_managerRef  _AppM,
unsigned int  _remap_bbi = 0,
unsigned int  _remap_loop_id = 0,
bool  _use_counting = false 
)

Construct a new tree node dup object.

Parameters
_remapis the struture to map old nodes to new one
_AppMis the application manager instance
_remap_bbiis the base index to renumber duplicated bloc (default = 0, no remapping)
_remap_loop_idis the base index to renumber loop ids in blocs (default = 0, no remapping)
_use_countingset use counting on nodes after duplication (bloc, gimple_phi) (default = false)

Definition at line 95 of file tree_node_dup.cpp.

References bloc::ENTRY_BLOCK_ID, bloc::EXIT_BLOCK_ID, remap_bb, and remap_bbi.

Member Function Documentation

◆ create_tree_node()

unsigned int tree_node_dup::create_tree_node ( const tree_nodeRef tn,
int  mode = tree_node_dup_mode::DEFAULT 
)

tree_node visitors

Factory method. It duplicates a tree_node when needed according to the source node tn

Parameters
tnis the source tree node
moderequired duplication mode
Returns
the node_id of the created object or of tn.

Definition at line 116 of file tree_node_dup.cpp.

References CASE_FAKE_NODES, CREATE_TREE_NODE_CASE_BODY, DECLARATION, FUNCTION, GET_CONST_NODE, tree_node::get_kind(), tree_node::get_kind_text(), tree_node::index, mode, remap, RET_NODE_ID_CASE_BODY, template_id_expr(), THROW_UNREACHABLE, TM, typename_type(), U, and using_decl().

Referenced by tree_manipulation::CloneFunction(), Vectorize::DuplicateIncrement(), and soft_float_cg_ext::signature_lowering().

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

◆ get_bbi()

unsigned int tree_node_dup::get_bbi ( unsigned int  old_bb)
private

Definition at line 715 of file tree_node_dup.cpp.

References remap_bb, and remap_bbi.

◆ get_loop_id()

unsigned int tree_node_dup::get_loop_id ( unsigned int  old_loop_id)
private

Field Documentation

◆ AppM

const application_managerRef tree_node_dup::AppM
private

application manager

Definition at line 112 of file tree_node_dup.hpp.

◆ curr_bloc

bloc* tree_node_dup::curr_bloc
private

current basic block pointer

Definition at line 118 of file tree_node_dup.hpp.

◆ curr_tree_node_ptr

tree_node* tree_node_dup::curr_tree_node_ptr
private

current tree node filled according to the source tree_node

Definition at line 116 of file tree_node_dup.hpp.

Referenced by get_loop_id().

◆ mode

int tree_node_dup::mode
private

enables full nodes duplication

Definition at line 124 of file tree_node_dup.hpp.

Referenced by create_tree_node().

◆ remap

CustomUnorderedMapStable<unsigned int, unsigned int>& tree_node_dup::remap
private

remap old indexes in new indexes

Definition at line 100 of file tree_node_dup.hpp.

Referenced by create_tree_node().

◆ remap_bb

CustomUnorderedMapStable<unsigned int, unsigned int> tree_node_dup::remap_bb
private

remap old basic block indexes in new indexes

Definition at line 106 of file tree_node_dup.hpp.

Referenced by get_bbi(), and tree_node_dup().

◆ remap_bbi

unsigned int tree_node_dup::remap_bbi
private

basic block indexes remap base

Definition at line 104 of file tree_node_dup.hpp.

Referenced by get_bbi(), and tree_node_dup().

◆ remap_lid

CustomUnorderedMapStable<unsigned int, unsigned int> tree_node_dup::remap_lid
private

remap old basic block loop ids in new ids

Definition at line 110 of file tree_node_dup.hpp.

Referenced by get_loop_id().

◆ remap_loop_id

unsigned int tree_node_dup::remap_loop_id
private

basic block loop ids remap base

Definition at line 108 of file tree_node_dup.hpp.

Referenced by get_loop_id().

◆ source_bloc

blocRef tree_node_dup::source_bloc
private

current basic block source

Definition at line 122 of file tree_node_dup.hpp.

◆ source_tn

tree_nodeRef tree_node_dup::source_tn
private

current tree_node source

Definition at line 120 of file tree_node_dup.hpp.

◆ TM

const tree_managerRef tree_node_dup::TM
private

tree manager

Definition at line 114 of file tree_node_dup.hpp.

Referenced by create_tree_node().

◆ use_counting

const bool tree_node_dup::use_counting
private

enable use counting on duplicated instances (when possible)

Definition at line 102 of file tree_node_dup.hpp.


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

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