This is the mail archive of the gcc-patches@gcc.gnu.org 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 fixing PR37948


On Mon, Nov 10, 2008 at 8:21 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
>  The following patch solves PR37948.  The analysis of the problem can be
> found
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37948
>
> The patch also switches on extended coalescing in IRA which can be used also
> for solving the problem.
>
> I found some pitfalls in coalescing code (usage of allocnos itself instead
> of head of coalescing allocnos list) and fixed that.
>
> The patch was successfully bootstrapped and tested on x86/x86_64.
>
> 2008-11-07  Vladimir Makarov  <vmakarov@redhat.com>
>         PR rtl-optimizations/37948
>   * ira-int.h (struct ira_allocno_copy): New member constraint_p.
>   (ira_create_copy, ira_add_allocno_copy): New parameter.
>
>   * ira-conflicts.c (process_regs_for_copy): New parameter.  Pass it
>   to ira_add_allocno_copy.
>   (process_reg_shuffles, add_insn_allocno_copies): Pass a new
>   parameter to process_regs_for_copy.
>   (propagate_copies): Pass a new parameter to ira_add_allocno_copy.
>   Fix typo in passing second allocno to ira_add_allocno_copy.
>
>   * ira-color.c (update_conflict_hard_regno_costs): Use head of
>   coalesced allocnos list.
>   (assign_hard_reg): Ditto.  Check that assigned allocnos are not in
>   the graph.
>   (add_ira_allocno_to_bucket): Rename to add_allocno_to_bucket.
>   (add_ira_allocno_to_ordered_bucket): Rename to
>   add_allocno_to_ordered_bucket.
>   (push_ira_allocno_to_stack): Rename to push_allocno_to_stack.  Use
>   head of coalesced allocnos list.
>   (push_allocnos_to_stack): Remove calculation of ALLOCNO_TEMP.
>   Check that it is aready calculated.
>   (push_ira_allocno_to_spill): Rename to push_ira_allocno_to_spill.
>   (setup_allocno_left_conflicts_num): Use head of coalesced allocnos
>   list.
>   (coalesce_allocnos): Do extended coalescing too.
>
>   * ira-emit.c (add_range_and_copies_from_move_list): Pass a new
>   parameter to ira_add_allocno_copy.
>
>   * ira-build.c (ira_create_copy, ira_add_allocno_copy): Add a new
>   parameter.
>   (print_copy): Print copy origination too.
>
>   * ira-costs.c (scan_one_insn): Use alloc_pref for load from
>   equivalent memory.
>
>

I applied this patch and patch for PR37397:

http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00373.html

on ira-merge branch. I got slower SPEC CPU 2K integer at -O2 on Intel64:

                                   -O2/-O2 -fno-ira
164.gzip                         -13.6086%
175.vpr                          1.98564%
176.gcc                          -2.571%
181.mcf                          -2.03085%
186.crafty                       -0.0267738%
197.parser                       0.42261%
252.eon                          1.66472%
253.perlbmk                      -0.419036%
254.gap                          1.52114%
255.vortex                       -0.382458%
256.bzip2                        0.620347%
300.twolf                        1.4111%
SPECint_base2000                         -1.04107%

-- 
H.J.


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