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] GCSE after reload - resubmit (SPECint +1.5% fp -0.5%).


Andrew Pinski <pinskia@physics.uc.edu> wrote on 01/03/2004 07:03:10:

>
> On Feb 29, 2004, at 20:49, Mostafa Hagog wrote:
>
> > Roger Sayle <roger@eyesopen.com> wrote on 25/02/2004 15:31:32:
> >
> >>
> >> On Wed, 25 Feb 2004, Mostafa Hagog wrote:
> >>> So I need approval for cvs write access.
> >>>
> >>
> >> In the meantime, I'd suggest that you repost the patch with all of the
> >> necessary corrections, so that I or someone else with CVS write access
> >> can commit it for you.
> >
> > Here is an updated patch with the fixes, Passed regression tests and
> > bootstrap (again) on powerpc-apple-darwin7.2.0 and i686-pc-linux-gnu.
>
> Three quick issues I saw when looking over the patch:
> + /* This is the threshold ratio when to perform partial redundancy
> +    elimination after reload. We perfrom partial redundany elimination
> +    when the following holds:
> +    (Redundant load execution count)
> +    ------------------------------- >=
> GCSE_AFTER_RELOAD_PARTIAL_FRACTION
> +    (Added loads execution count)               */
> + #define GCSE_AFTER_RELOAD_PARTIAL_FRACTION 3
>
> This really should be a --param so that developers in the future can
> find the
> best option without recompiling.
>
> Also most of toplev.c has been moved to passes.c now, can you update
> the patch
> for the change?
>
> Also for the doc change:
> *** doc/invoke.texi   24 Feb 2004 20:09:16 -0000   1.415
> --- doc/invoke.texi   26 Feb 2004 15:37:57 -0000
> *************** in the following sections.
> *** 282,288 ****
>    -fno-trapping-math  -fno-zero-initialized-in-bss @gol
>    -fomit-frame-pointer  -foptimize-register-move @gol
>    -foptimize-sibling-calls  -fprefetch-loop-arrays @gol
> ! -fprofile-generate -fprofile-use @gol
>    -freduce-all-givs  -fregmove  -frename-registers @gol
>    -freorder-blocks  -freorder-functions @gol
>    -frerun-cse-after-loop  -frerun-loop-opt @gol
> --- 282,288 ----
>    -fno-trapping-math  -fno-zero-initialized-in-bss @gol
>    -fomit-frame-pointer  -foptimize-register-move @gol
>    -foptimize-sibling-calls  -fprefetch-loop-arrays @gol
> ! -fprofile-generate -fprofile-use -fgcse-after-reload @gol
>    -freduce-all-givs  -fregmove  -frename-registers @gol
>    -freorder-blocks  -freorder-functions @gol
>    -frerun-cse-after-loop  -frerun-loop-opt @gol
>
> I think this should alphabetized.
>
>
> Thanks,
> Andrew Pinski
>

The attached patch has all the above changes, checked regression and
bootstrap (again) on powerpc-apple-darwin7.2.0.
Can any body commit this?

ChangeLog entry
---------------
2004-03-01  Mostafa Hagog  <mustafa@il.ibm.com>

      * common.opt: Add description of the new -fgcse-after-reload flag.

      * flags.h (flag_gcse_after_reload): Declaration of global variable.

      * gcse.c (reg_used_on_edge ,reg_set_between_after_reload_p,
      reg_used_between_after_reload_p, rtx get_avail_load_store_reg,
      is_jump_table_basic_block, bb_has_well_behaved_predecessors,
      get_bb_avail_insn, hash_scan_set_after_reload,
      compute_hash_table_after_reload, eliminate_partially_redundant_loads,
      gcse_after_reload, get_bb_avail_insn): New functions to implement
      gcse-after-reload.
      (gcse_after_reload_main): New function, the main entry point to
      gcse-after-reload.

      * rtl.h (gcse_after_reload_main): Declaration of the new function.

      * opts.c (common_handle_option): Handle the -fgcse-after-reload flag.

      * toplev.c (flag_gcse_after_reload): Initialization.

      * passes.c (rest_of_handl_gcse2): Call gcse_after_reload_main.

      * params.def (PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION,
      PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION): New parameters for tuning
      the gcse after reload optimization.

      * params.h (GCSE_AFTER_RELOAD_PARTIAL_FRACTION,
      GCSE_AFTER_RELOAD_CRITICAL_FRACTION): Two macros to access the tuning
      parameters.

      * doc/invoke.texi: Documentation for the new flag gcse-after-reload.

(See attached file: gcse-after-reload7.patch)

Attachment: gcse-after-reload7.patch
Description: Binary data


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