This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: patch for 37790

H.J. Lu wrote:
On Sun, Nov 16, 2008 at 11:54:09AM -0500, Vladimir Makarov wrote:
The following patch solves PR37790. The problem is described on

The patch switches stack slot coalescing from usage of bitmaps to usage of live ranges. It dramatically decreases compilation speed and memory usage for this test. The patch also prohibits stack slot sharing and processing pseudos spilled by IRA in reload pass when the register pressure is too high (more than 10K) to guarantee IRA decent behavior in extreme cases. The patch was successfully bootstrapped on x86/x86_64, ppc64, and itanium.

Ok to submit?

2008-11-15 Vladimir Makarov <>

   PR bootstrap/37790
   * ira-int.h (ira_copy_allocno_live_range_list,
   ira_finish_allocno_live_range_list): New prototypes.
   ira_pseudo_live_ranges_intersect_p): Remove.
     * ira-conflicts.c (ira_allocno_live_ranges_intersect_p,
   ira_pseudo_live_ranges_intersect_p): Rename to
   allocnos_have_intersected_live_ranges_p and
   pseudos_have_intersected_live_ranges_p.  Move them from here to

   * ira-color.c: ... here
   (coalesced_allocno_conflict_p): Use
   set_coalesced_allocnos_live_points): Remove.
   setup_slot_coalesced_allocno_live_ranges): New.
   (coalesce_spill_slots): Use ranges of coalesced allocnos.
   (ira_sort_regnos_for_alter_reg): Use
   (ira_reuse_stack_slot): Use

   * global.c (pseudo_for_reload_consideration_p): Check
   flag_ira_share_spill_slots too.

* ira-build.c (copy_allocno_live_range_list): Rename to
ira_copy_allocno_live_range_list. Make it external.
(merge_ranges): Rename to ira_merge_allocno_live_ranges. Make it
(ira_allocno_live_ranges_intersect_p): New.
(ira_finish_allocno_live_range_list): New.
(finish_allocno): Use it.
(remove_unnecessary_allocnos): Use ira_merge_allocno_live_ranges.
(copy_info_to_removed_store_destinations): Ditto. Use
(ira_flattening): Use ira_merge_allocno_live_ranges.
* ira.c (too_high_register_pressure_p): New function.
(ira): Switch off sharing spill slots if the pressure is too high.

I need this patch on ira-merge branch. Otherwise, gcc may error pseudos_have_intersected_live_ranges_p is defined, but used.

Ok, sure. Thanks, H.J. I've should have checked bootstrap with --dsiable-checking too. As for the mainline I am going to submit your patch with the patch for pr37790 into the trunk today.
2008-11-18  H.J. Lu  <>

	* ira-color.c (pseudos_have_intersected_live_ranges_p): Define
	only if ENABLE_IRA_CHECKING is defined.

Index: ira-color.c
--- ira-color.c (revision 141993)
+++ ira-color.c (working copy)
@@ -103,6 +103,7 @@ allocnos_have_intersected_live_ranges_p ALLOCNO_LIVE_RANGES (a2));
/* Return TRUE if live ranges of pseudo-registers REGNO1 and REGNO2
intersect. This should be used when there is only one region.
Currently this is used during reload. */
@@ -120,6 +121,7 @@ pseudos_have_intersected_live_ranges_p (
return false;
return allocnos_have_intersected_live_ranges_p (a1, a2);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]