Interface to information about a loop. More...
#include <dcfg_api.H>
Public Member Functions | |
virtual DCFG_ID | get_process_id () const =0 |
Get the process ID. | |
virtual DCFG_ID | get_image_id () const =0 |
Get the image ID. | |
virtual DCFG_ID | get_routine_id () const =0 |
Get routine ID. | |
virtual DCFG_ID | get_loop_id () const =0 |
Get loop ID, which equals the basic-block ID of the head node. | |
virtual UINT32 | get_entry_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0 |
Get set of IDs of the entry edges. | |
virtual UINT32 | get_exit_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0 |
Get set of IDs of the exit edges. | |
virtual UINT32 | get_back_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0 |
Get set of IDs of the back-edges. | |
virtual DCFG_ID | get_parent_loop_id () const =0 |
Get head node ID of most immediate containing loop, if any. | |
virtual UINT64 | get_iteration_count () const =0 |
Get dynamic iteration count. | |
virtual UINT64 | get_iteration_count_for_thread (UINT32 thread_id) const =0 |
Get dynamic execution count per thread. | |
![]() | |
virtual UINT32 | get_basic_block_ids (DCFG_ID_CONTAINER &node_ids) const =0 |
Get IDs of all basic blocks in the structure. | |
virtual UINT32 | get_internal_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0 |
Get list of internal edge IDs. | |
virtual UINT32 | get_inbound_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0 |
Get list of in-bound edge IDs. | |
virtual UINT32 | get_outbound_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0 |
Get list of out-bound edge IDs. | |
virtual UINT64 | get_instr_count () const =0 |
Get the total dynamic instruction count. | |
virtual UINT64 | get_instr_count_for_thread (UINT32 thread_id) const =0 |
Get per-thread dynamic instruction count. | |
Interface to information about a loop.
|
pure virtual |
Get set of IDs of the back-edges.
These are the edges that are traversed when a loop is repeated following an entry. The target node of each back edge will be the head node of the loop by definition. By definition, an edge n->h is a back edge if h dominates n, where h is the head node.
edge_ids
. [out] | edge_ids | Container to which edge IDs are added. Previous contents of the container are not emptied by this call, so it should be emptied by the programmer before the call if desired. The programmer can use any implementation of DCFG_ID_CONTAINER: DCFG_ID_VECTOR, DCFG_ID_SET, etc. |
|
pure virtual |
Get set of IDs of the entry edges.
These are the edges that are traversed when a loop is entered from somewhere outside the loop. This set does not include back edges.
edge_ids
. [out] | edge_ids | Container to which edge IDs are added. Previous contents of the container are not emptied by this call, so it should be emptied by the programmer before the call if desired. The programmer can use any implementation of DCFG_ID_CONTAINER: DCFG_ID_VECTOR, DCFG_ID_SET, etc. |
|
pure virtual |
Get set of IDs of the exit edges.
These are the edges that are traversed when a loop is exited. This set does not include call edges from the loop. If you also want call edges, use DCFG_GRAPH_BASE::get_outbound_edge_ids(). Note that any given edge may exit more than one loop when loops are nested.
edge_ids
. [out] | edge_ids | Container to which edge IDs are added. Previous contents of the container are not emptied by this call, so it should be emptied by the programmer before the call if desired. The programmer can use any implementation of DCFG_ID_CONTAINER: DCFG_ID_VECTOR, DCFG_ID_SET, etc. |
|
pure virtual |
Get the image ID.
|
pure virtual |
Get dynamic iteration count.
This is the number of times the loop was executed, including entry from outside the loop and via its back edges. By definition, a loop can only be entered at its head node.
|
pure virtual |
Get dynamic execution count per thread.
See DCFG_LOOP::get_iteration_count() for iteration-count definition.
[in] | thread_id | Thread number. Typically, threads are consecutively numbered from zero to DCFG_PROCESS::get_highest_thread_id(). |
|
pure virtual |
Get loop ID, which equals the basic-block ID of the head node.
The head node is the common target of all the back edges in the loop.
|
pure virtual |
Get head node ID of most immediate containing loop, if any.
This indicates loop nesting.
|
pure virtual |
Get the process ID.
|
pure virtual |
Get routine ID.