diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-19 20:46:31 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-19 20:46:31 +0000 |
commit | 9f8ac54664b3f8f1c9a25cac135bc9885e19c91f (patch) | |
tree | 0d29df176c3620279d71202389bdc2b5691fc410 /gcc/ira-int.h | |
parent | 799347b4f3a31352a3d3e3797b28abc41580cdf5 (diff) | |
download | gcc-9f8ac54664b3f8f1c9a25cac135bc9885e19c91f.tar.gz |
2012-01-19 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/40761
* ira-int.h (struct ira_loop_tree_node): Add comment for member
loop. Add new member loop_num.
(IRA_LOOP_NODE_BY_INDEX): Modify the check.
(ira_build): Remove the parameter.
* ira.c (ira_print_disposition): Use loop_num instead of
loop->num.
(ira.c): Do not build CFG loops for one region allocation. Remove
argument from ira_build call.
* ira-build.c (init_loop_tree_node): New function.
(create_loop_tree_nodes): Use it. Separate the case when CFG
loops are not built.
(more_one_region_p): Check current_loops.
(finish_loop_tree_nodes): Separate the case when CFG loops are not
built.
(add_loop_to_tree): Process loop equal to NULL too.
(form_loop_tree): Separate the case when CFG loops are not built.
Use explicitly number for the root.
(rebuild_regno_allocno_maps, create_loop_tree_node_allocnos): Add
an assertion.
(ira_print_expanded_allocno, loop_compare_func): Use loop_num
instead of loop->num.
(mark_loops_for_removal): Ditto. Use loop_num instead of
loop->num.
(mark_all_loops_for_removal): Ditto.
(remove_unnecessary_regions): Separate the case when CFG loops
are not built.
(ira_build): Remove the parameter. Use explicit number of regions
when CFG loops are not built.
* ira-color.c (print_loop_title): Separate the case for the root
node. Use loop_num instead of loop->num.
(move_spill_restore): Use loop_num instead of loop->num.
* ira-emit.c (setup_entered_from_non_parent_p): Add an assertion.
(change_loop): Ditto.
(change_loop): Use loop_num instead of loop->num.
* ira-lives.c (process_bb_node_lives): Ditto.
* ira-costs.c (print_allocno_costs, find_costs_and_classes):
Ditto.
* ira-conflicts.c (print_allocno_conflicts): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183312 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-int.h')
-rw-r--r-- | gcc/ira-int.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ira-int.h b/gcc/ira-int.h index 61998942d9e..9faabb5d703 100644 --- a/gcc/ira-int.h +++ b/gcc/ira-int.h @@ -87,7 +87,8 @@ struct ira_loop_tree_node { /* The node represents basic block if children == NULL. */ basic_block bb; /* NULL for loop. */ - struct loop *loop; /* NULL for BB. */ + /* NULL for BB or for loop tree root if we did not build CFG loop tree. */ + struct loop *loop; /* NEXT/SUBLOOP_NEXT is the next node/loop-node of the same parent. SUBLOOP_NEXT is always NULL for BBs. */ ira_loop_tree_node_t subloop_next, next; @@ -103,6 +104,9 @@ struct ira_loop_tree_node /* All the following members are defined only for nodes representing loops. */ + /* The loop number from CFG loop tree. The root number is 0. */ + int loop_num; + /* True if the loop was marked for removal from the register allocation. */ bool to_remove_p; @@ -154,7 +158,7 @@ extern ira_loop_tree_node_t ira_bb_nodes; /* Two access macros to the nodes representing basic blocks. */ #if defined ENABLE_IRA_CHECKING && (GCC_VERSION >= 2007) #define IRA_BB_NODE_BY_INDEX(index) __extension__ \ -(({ ira_loop_tree_node_t _node = (&ira_bb_nodes[index]); \ +(({ ira_loop_tree_node_t _node = (&ira_bb_nodes[index]); \ if (_node->children != NULL || _node->loop != NULL || _node->bb == NULL)\ { \ fprintf (stderr, \ @@ -176,8 +180,9 @@ extern ira_loop_tree_node_t ira_loop_nodes; /* Two access macros to the nodes representing loops. */ #if defined ENABLE_IRA_CHECKING && (GCC_VERSION >= 2007) #define IRA_LOOP_NODE_BY_INDEX(index) __extension__ \ -(({ ira_loop_tree_node_t const _node = (&ira_loop_nodes[index]);\ - if (_node->children == NULL || _node->bb != NULL || _node->loop == NULL)\ +(({ ira_loop_tree_node_t const _node = (&ira_loop_nodes[index]); \ + if (_node->children == NULL || _node->bb != NULL \ + || (_node->loop == NULL && current_loops != NULL)) \ { \ fprintf (stderr, \ "\n%s: %d: error in %s: it is not a loop node\n", \ @@ -989,7 +994,7 @@ extern int *ira_allocate_cost_vector (reg_class_t); extern void ira_free_cost_vector (int *, reg_class_t); extern void ira_flattening (int, int); -extern bool ira_build (bool); +extern bool ira_build (void); extern void ira_destroy (void); /* ira-costs.c */ |