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

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.

This is fine. I did notice a couple of apparently gratutious changes of this form:

-	      && (ira_reg_equiv_invariant_p[ALLOCNO_REGNO (allocno)]
-		  || ira_reg_equiv_const[ALLOCNO_REGNO (allocno)] != NULL_RTX)))
+	      && (ira_reg_equiv_const[ALLOCNO_REGNO (allocno)] != NULL_RTX
+		  || ira_reg_equiv_invariant_p[ALLOCNO_REGNO (allocno)])))

Was there a particular purpose behind those changes that I missed?


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