diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2008-09-09 17:05:56 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2008-09-09 17:05:56 +0000 |
commit | 854bd721f882bf19deb6774310e6b68dc7f299c8 (patch) | |
tree | f771b4c111a3916cfd3bca4597f9d6ec3585cc30 /gcc | |
parent | 496071caa61c457f55f5d4667cac37e058627d36 (diff) | |
download | gcc-854bd721f882bf19deb6774310e6b68dc7f299c8.zip gcc-854bd721f882bf19deb6774310e6b68dc7f299c8.tar.gz gcc-854bd721f882bf19deb6774310e6b68dc7f299c8.tar.bz2 |
re PR rtl-optimization/37333 (ICE in ira_flattening, at ira-build.c:2146)
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.
From-SVN: r140160
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/ira-build.c | 2 | ||||
-rw-r--r-- | gcc/ira-color.c | 8 |
3 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cfa7b26..743c608 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 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 regno is in the right range. Add comments. diff --git a/gcc/ira-build.c b/gcc/ira-build.c index b1f496c..3535214 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -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; diff --git a/gcc/ira-color.c b/gcc/ira-color.c index a161c08..6342e90 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -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--) { |