aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira-color.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2009-01-06 03:50:07 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2009-01-06 03:50:07 +0000
commit311aab0649dded5e7f9bb84dd78040871d6812d9 (patch)
tree3ab87fe84116bf920cb2e70b665eec2ced158fdf /gcc/ira-color.c
parent9bfea41b05947073cce682a8a6cf14924064fbde (diff)
downloadgcc-311aab0649dded5e7f9bb84dd78040871d6812d9.zip
gcc-311aab0649dded5e7f9bb84dd78040871d6812d9.tar.gz
gcc-311aab0649dded5e7f9bb84dd78040871d6812d9.tar.bz2
re PR rtl-optimization/38583 (huge test case makes register allocator run out of memory while constructing the conflict graph)
2009-01-05 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/38583 * params.h (IRA_MAX_CONFLICT_TABLE_SIZE): New macro. * params.def (ira-max-conflict-table-size): New. * doc/invoke.texi (ira-max-conflict-table-size): Decribe. * ira.h (ira_conflicts_p): New external definition. * ira-conflicts.c (build_conflict_bit_table): Do not build too big table. Report this. Return result of building. (ira_build_conflicts): Use ira_conflicts_p. Check result of building conflict table. * ira-color.c (fast_allocation): Use num instead of ira_allocnos_num. (ira_color): Use ira_conflicts_p. * global.c: Include ira.h. (pseudo_for_reload_consideration_p, build_insn_chain): Use ira_conflicts_p. * Makefile.in (global.o): Add ira.h. * ira-build.c (mark_all_loops_for_removal, propagate_some_info_from_allocno): New. (remove_unnecessary_allocnos): Call propagate_some_info_from_allocno. (remove_low_level_allocnos): New. (remove_unnecessary_regions): Add parameter. Call mark_all_loops_for_removal and remove_low_level_allocnos. Pass parameter to remove_unnecessary_regions. (ira_build): Remove all regions but root if the conflict table was not built. Update conflict hard regs for allocnos crossing calls. * ira.c (ira_conflicts_p): New global. (ira): Define and use ira_conflicts_p. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, finish_spills, emit_input_reload_insns, delete_output_reload): Use ira_conflicts_p. From-SVN: r143112
Diffstat (limited to 'gcc/ira-color.c')
-rw-r--r--gcc/ira-color.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index c9cb184..c7c600b 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -3267,7 +3267,7 @@ fast_allocation (void)
* ira_max_point);
for (i = 0; i < ira_max_point; i++)
CLEAR_HARD_REG_SET (used_hard_regs[i]);
- qsort (sorted_allocnos, ira_allocnos_num, sizeof (ira_allocno_t),
+ qsort (sorted_allocnos, num, sizeof (ira_allocno_t),
allocno_priority_compare_func);
for (i = 0; i < num; i++)
{
@@ -3329,7 +3329,7 @@ ira_color (void)
ALLOCNO_UPDATED_MEMORY_COST (a) = ALLOCNO_MEMORY_COST (a);
ALLOCNO_UPDATED_COVER_CLASS_COST (a) = ALLOCNO_COVER_CLASS_COST (a);
}
- if (optimize)
+ if (ira_conflicts_p)
color ();
else
fast_allocation ();