GCC Middle and Back End API Reference
ira_loop_tree_node Struct Reference

#include <ira-int.h>

Collaboration diagram for ira_loop_tree_node:

Data Fields

basic_block bb
struct looploop
ira_loop_tree_node_t subloop_next
ira_loop_tree_node_t next
ira_loop_tree_node_t subloops
ira_loop_tree_node_t children
ira_loop_tree_node_t parent
int level
int loop_num
bool to_remove_p
ira_allocno_tregno_allocno_map
bool entered_from_non_parent_p
int reg_pressure [N_REG_CLASSES]
bitmap all_allocnos
bitmap border_allocnos
bitmap modified_regnos
bitmap local_copies

Detailed Description

In general case, IRA is a regional allocator. The regions are nested and form a tree. Currently regions are natural loops. The following structure describes loop tree node (representing basic block or loop). We need such tree because the loop tree from cfgloop.h is not convenient for the optimization: basic blocks are not a part of the tree from cfgloop.h. We also use the nodes for storing additional information about basic blocks/loops for the register allocation purposes.


Field Documentation

bitmap ira_loop_tree_node::all_allocnos

Numbers of allocnos referred or living in the loop node (except for its subloops).

Referenced by ira_create_object(), and remove_uneccesary_loop_nodes_from_loop_tree().

basic_block ira_loop_tree_node::bb

The node represents basic block if children == NULL.

Referenced by find_call_crossed_cheap_reg(), finish_copies(), finish_copy(), finish_cost_vectors(), and setup_loop_tree_level().

bitmap ira_loop_tree_node::border_allocnos

Numbers of allocnos living at the loop borders.

ira_loop_tree_node_t ira_loop_tree_node::children

Referenced by setup_loop_tree_level().

bool ira_loop_tree_node::entered_from_non_parent_p

True if there is an entry to given loop not from its parent (or grandparent) basic block. For example, it is possible for two adjacent loops inside another loop.

int ira_loop_tree_node::level

Loop level in range [0, ira_loop_tree_height).

bitmap ira_loop_tree_node::local_copies

Numbers of copies referred in the corresponding loop.

struct loop* ira_loop_tree_node::loop

NULL for BB or for loop tree root if we did not build CFG loop tree.

Referenced by delete_allocno_from_bucket(), and setup_loop_tree_level().

int ira_loop_tree_node::loop_num

All the following members are defined only for nodes representing loops. The loop number from CFG loop tree. The root number is 0.

Referenced by process_bb_node_lives().

bitmap ira_loop_tree_node::modified_regnos

Regnos of pseudos modified in the loop node (including its subloops).

ira_loop_tree_node_t ira_loop_tree_node::next

Referenced by setup_loop_tree_level().

ira_loop_tree_node_t ira_loop_tree_node::parent

The node immediately containing given node.

Referenced by process_bb_node_lives(), and subloop_tree_node_p().

int ira_loop_tree_node::reg_pressure[N_REG_CLASSES]

Maximal register pressure inside loop for given register class (defined only for the pressure classes).

Referenced by allocno_priority_compare_func(), find_call_crossed_cheap_reg(), fix_reg_equiv_init(), and init_loop_tree_node().

ira_allocno_t* ira_loop_tree_node::regno_allocno_map

Allocnos in the loop corresponding to their regnos. If it is NULL the loop does not form a separate register allocation region (e.g. because it has abnormal enter/exit edges and we can not put code for register shuffling on the edges if a different allocation is used for a pseudo-register on different sides of the edges). Caps are not in the map (remember we can have more one cap with the same regno in a region).

Referenced by add_loop_to_tree(), finish_cost_vectors(), init_loop_tree_node(), ira_create_object(), remove_uneccesary_loop_nodes_from_loop_tree(), setup_loop_tree_level(), and subloop_tree_node_p().

ira_loop_tree_node_t ira_loop_tree_node::subloop_next

NEXT/SUBLOOP_NEXT is the next node/loop-node of the same parent. SUBLOOP_NEXT is always NULL for BBs.

Referenced by setup_loop_tree_level().

ira_loop_tree_node_t ira_loop_tree_node::subloops

CHILDREN/SUBLOOPS is the first node/loop-node immediately inside the node. They are NULL for BBs.

Referenced by setup_loop_tree_level().

bool ira_loop_tree_node::to_remove_p

True if the loop was marked for removal from the register allocation.

Referenced by move_allocno_live_ranges().


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