From 6e3957da3145a2d2a1d8837d6a78aa1663245764 Mon Sep 17 00:00:00 2001 From: Zhouyi Zhou Date: Thu, 16 Apr 2015 20:02:01 +0000 Subject: [PATCH] ira-color.c (setup_left_conflict_sizes_p): Do not process node itself when computing left conflict subnode size. * ira-color.c (setup_left_conflict_sizes_p): Do not process node itself when computing left conflict subnode size. From-SVN: r222157 --- gcc/ChangeLog | 5 +++++ gcc/ira-color.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 188430058cd..008bd47fb01 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-04-16 Zhouyi Zhou + + * ira-color.c (setup_left_conflict_sizes_p): Do not process + node itself when computing left conflict subnode size. + 2015-04-16 Uros Bizjak * config/i386/predicates.md (register_mixssei387nonimm_operand): New. diff --git a/gcc/ira-color.c b/gcc/ira-color.c index ff1fe8a78ad..d2d5102a4a9 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -938,7 +938,7 @@ setup_left_conflict_sizes_p (ira_allocno_t a) subnodes[i].left_conflict_subnodes_size = 0; } start = node_preorder_num * allocno_hard_regs_nodes_num; - for (i = data->hard_regs_subnodes_num - 1; i >= 0; i--) + for (i = data->hard_regs_subnodes_num - 1; i > 0; i--) { int size, parent_i; allocno_hard_regs_node_t parent; @@ -948,12 +948,10 @@ setup_left_conflict_sizes_p (ira_allocno_t a) - subnodes[i].left_conflict_subnodes_size, subnodes[i].left_conflict_size)); parent = allocno_hard_regs_nodes[i + node_preorder_num]->parent; - if (parent == NULL) - continue; + gcc_checking_assert(parent); parent_i = allocno_hard_regs_subnode_index[start + parent->preorder_num]; - if (parent_i < 0) - continue; + gcc_checking_assert(parent_i >= 0); subnodes[parent_i].left_conflict_subnodes_size += size; } left_conflict_subnodes_size = subnodes[0].left_conflict_subnodes_size; -- 2.30.2