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: [Patch] IRA: Update heuristics for optimal coalescing


  Sorry, for postponing it.  I was going to do this when stage1 starts.

  After reading this today I have some comments.  I believe the copy
frequency should be not changed.  If you want coalesce copies according
the frequency of loop back edges on which the allocno involved in given
copy lives you should implement sorting according it w/o changes the
copy frequency.

  I don't see a logical sense to sort copies according to your criteria
and don't understand why you consider only one allocno involved in the
copy on its back-edge frequencies (as another allocno can live on back
edges too).  But sometime heuristics work opposite to rational sense. 
It might be this case.   But still I need a prove that there is an
improvement on x86/x86-64 SPEC too.  If you can not run x86/x86-64
SPEC2000, I can do this but it will take some time and I can do this in
Apr when probably stage1 starts.

  Besides these 2 important comments, some work needs to be done to make
the patch conforming GNU coding standards used in GCC: a necessary
comment for ira_loop_back_edge_freq.  But there is no sense to fix this
as probably the patch will be rewritten.

On 2015-03-23 12:18 PM, Ajit Kumar Agarwal wrote:
> Hello Vladimir:
>
> Did you get a chance to look at the below patch.
>
> Thanks & Regards
> Ajit
>
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-owner@gcc.gnu.org] On Behalf Of Ajit Kumar Agarwal
> Sent: Friday, February 27, 2015 11:25 AM
> To: vmakarov@redhat.com; Jeff Law; GCC Patches
> Cc: Vinod Kathail; Shail Aditya Gupta; Vidhumouli Hunsigida; Nagaraju Mekala
> Subject: [Patch] IRA: Update heuristics for optimal coalescing
>
> Hello Vladimir:
>
> The changes in the patch are made in the frequency heuristics for optimal coalescing. The Loop back edge frequencies are taken instead of the block frequency for optimal coalescing. Ignores the frequency for the loop for the allocno not having references inside the loops but spans the loops and live at the exit block of the loop. Another similar change are made not to consider allcono frequency at the cost calculation but to consider the loop back edge frequencies having references and spans through the loop and live at the exit of the block.
>
> We have tested the changes with MIBench and EEMBC benchmarks and there is a gain in the Geomean for the overall benchmarks for Microblaze target. Also no regressions are seen in deja GNU tests run for microblaze.
>
> Please let us know with your feedbacks.
>
> commit e6a2edd3794080a973695f80e77df3e7de55452d
> Author: Ajit Kumar Agarwal <ajitkum@xhdspdgnu.(none)>
> Date:   Fri Feb 27 11:15:48 2015 +0530
>
>     IRA: Update heuristics for optimal coalescing.
>     
>     The changes are made in the frequency heuristics for optimal coalescing.
>     The Loop back edge frequencies are taken instead of the block frequency
>     for optimal coalescing. Ignores the frequency for the loop having not any
>     references but spans the loop and live at the exit block of the loop.
>     Another similar change not to consider allcono frequency at the cost
>     calculation but to consider the loop back edge frequencies having references
>     and spans through the loop and live at the exit of the block.
>     
>     ChangeLog:
>     2015-02-27  Ajit Agarwal  <ajitkum@xilinx.com>
>     
>         * ira-color.c (ira_loop_back_edge_freq): New.
>         (coalesce_allocnos): Use of ira_loop_back_edge_freq to update
>         the back edge frequencies.
>         (setup_coalesced_allocno_costs_and_nums): Use of
>         ira_loop_back_edge_freq to update the cost.
>     
>     Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
>
> Thanks & Regards
> Ajit



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