]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2008-09-09 Vladimir Makarov <vmakarov@redhat.com>
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Sep 2008 17:05:56 +0000 (17:05 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Sep 2008 17:05:56 +0000 (17:05 +0000)
PR rtl-opt/37333

* ira-build.c (ira_create_allocno): Setup frequency to 0.

* ira-color.c (update_conflict_hard_regno_costs): Remove assert.
Check zero freq and increase if necessary.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140160 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ira-build.c
gcc/ira-color.c

index cfa7b26a4eced4002f8ecbd7b96f32c7807d611f..743c6081ca51ff74794a0a0afea9efee14c0df1b 100644 (file)
@@ -1,3 +1,12 @@
+2008-09-09  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-opt/37333
+       
+       * ira-build.c (ira_create_allocno): Setup frequency to 0.
+
+       * ira-color.c (update_conflict_hard_regno_costs): Remove assert.
+       Check zero freq and increase if necessary.
+
 2008-09-09  Vladimir Makarov  <vmakarov@redhat.com>
 
        * ira-conflicts.c (process_regs_for_copy): Check that the hard
index b1f496c41dfa4c75ce24dadbb9f69e79f5bd3cd5..3535214cac62d51b9d7cc03a4822241aa6a222c0 100644 (file)
@@ -443,7 +443,7 @@ ira_create_allocno (int regno, bool cap_p, ira_loop_tree_node_t loop_tree_node)
   COPY_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), ira_no_alloc_regs);
   COPY_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a), ira_no_alloc_regs);
   ALLOCNO_NREFS (a) = 0;
-  ALLOCNO_FREQ (a) = 1;
+  ALLOCNO_FREQ (a) = 0;
   ALLOCNO_HARD_REGNO (a) = -1;
   ALLOCNO_CALL_FREQ (a) = 0;
   ALLOCNO_CALLS_CROSSED_NUM (a) = 0;
index a161c08b0349b24ffd94abc20b76383bd42af8e4..6342e90a9232ddea8045d36b57d8f5b682760e30 100644 (file)
@@ -210,7 +210,7 @@ static void
 update_conflict_hard_regno_costs (int *costs, ira_allocno_t allocno,
                                  int divisor, bool decr_p)
 {
-  int i, cost, class_size, mult, div;
+  int i, cost, class_size, freq, mult, div;
   int *conflict_costs;
   bool cont_p;
   enum machine_mode mode;
@@ -258,9 +258,11 @@ update_conflict_hard_regno_costs (int *costs, ira_allocno_t allocno,
        cont_p = true;
       else
        {
-         ira_assert (ALLOCNO_FREQ (another_allocno) != 0);
          mult = cp->freq;
-         div = ALLOCNO_FREQ (another_allocno) * divisor;
+         freq = ALLOCNO_FREQ (another_allocno);
+         if (freq == 0)
+           freq = 1;
+         div = freq * divisor;
          cont_p = false;
          for (i = class_size - 1; i >= 0; i--)
            {