RFA: patch to solve PR38583

Vladimir Makarov vmakarov@redhat.com
Mon Jan 5 20:20:00 GMT 2009

The following patch solves PR38583.  The details of the problem can be found on


In brief, gcc4.4 (with IRA or the old RA) needs more 9GB memory to compile the test in question in comparison with 2.5Gb for gcc4.3.

Most memory is for conflict table and the patch don't build conflict table if it is going to be too big.

The patch was successfully bootstrapped with and without --param ira-max-conflict-table-size=0 on i686 and x86_64.

Ok to commit?

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_color): Use ira_conflicts_p.
	* global.c: Include ira.h.
	(pseudo_for_reload_consideration_p, build_insn_chain): Use

	* 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
	(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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr35853.patch
Type: text/x-patch
Size: 27380 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090105/99861cb0/attachment.bin>

More information about the Gcc-patches mailing list