ira-color.c (setup_left_conflict_sizes_p): Do not process node itself when computing...
authorZhouyi Zhou <yizhouzhou@ict.ac.cn>
Thu, 16 Apr 2015 20:02:01 +0000 (20:02 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 16 Apr 2015 20:02:01 +0000 (14:02 -0600)
       * ira-color.c (setup_left_conflict_sizes_p): Do not process
        node itself when computing left conflict subnode size.

From-SVN: r222157

gcc/ChangeLog
gcc/ira-color.c

index 188430058cdc926f57fe3bfe28c4405292f8fa95..008bd47fb015b4dec7a63fdac7b6dc80db7b7db2 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-16  Zhouyi Zhou  <yizhouzhou@ict.ac.cn> 
+
+       * ira-color.c (setup_left_conflict_sizes_p): Do not process
+       node itself when computing left conflict subnode size.
+
 2015-04-16  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/predicates.md (register_mixssei387nonimm_operand): New.
index ff1fe8a78ad362491a671082c3fd34dec0d3ff92..d2d5102a4a90cdad5a43a6a81b0e270e8ea2251d 100644 (file)
@@ -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;