On Mon, 24 Oct 2016, Kyrill Tkachov wrote:

> Hi all,
> 
> This is a slight update over [1] with Richard's feedback addressed.
> In terminate_all_aliasing_chains we now terminate the chain early if
> the destination is writing to a base offset by a variable amount.
> This avoids walking the store chain and performing more alias checks.
> 
> The param max-stores-to-merge is introduced to limit the number of statements
> we merge. Its default value is set to 64 which should be enough for now and
> avoids
> blowing up compile time in cases such as [2].
> 
> I've also introduced a timevar for the pass to allow us to track it in
> -ftime-report.
> 
> Bootstrapped and tested on aarch64, arm, x86_64.
> 
> Ok?

Ok if you add documentation for the two new --params.

Thanks,
Richard.

> Thanks,
> Kyrill
> 
> [1] https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01459.html
> [2] https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01880.html
> 
> 2016-10-24  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
> 
>     PR middle-end/22141
>     * Makefile.in (OBJS): Add gimple-ssa-store-merging.o.
>     * common.opt (fstore-merging): New Optimization option.
>     * opts.c (default_options_table): Add entry for
>     OPT_ftree_store_merging.
>     * fold-const.h (can_native_encode_type_p): Declare prototype.
>     * fold-const.c (can_native_encode_type_p): Define.
>     * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Define.
>     (PARAM_MAX_STORES_TO_MERGE): Likewise.
>     * timevar.def (TV_GIMPLE_STORE_MERGING): New timevar.
>     * passes.def: Insert pass_tree_store_merging.
>     * tree-pass.h (make_pass_store_merging): Declare extern
>     prototype.
>     * gimple-ssa-store-merging.c: New file.
>     * doc/invoke.texi (Optimization Options): Document
>     -fstore-merging.
> 
> 2016-10-24  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
>             Jakub Jelinek  <ja...@redhat.com>
>             Andrew Pinski  <pins...@gmail.com>
> 
>     PR middle-end/22141
>     PR rtl-optimization/23684
>     * gcc.c-torture/execute/pr22141-1.c: New test.
>     * gcc.c-torture/execute/pr22141-2.c: Likewise.
>     * gcc.target/aarch64/ldp_stp_1.c: Adjust for -fstore-merging.
>     * gcc.target/aarch64/ldp_stp_4.c: Likewise.
>     * gcc.dg/store_merging_1.c: New test.
>     * gcc.dg/store_merging_2.c: Likewise.
>     * gcc.dg/store_merging_3.c: Likewise.
>     * gcc.dg/store_merging_4.c: Likewise.
>     * gcc.dg/store_merging_5.c: Likewise.
>     * gcc.dg/store_merging_6.c: Likewise.
>     * gcc.dg/store_merging_7.c: Likewise.
>     * gcc.target/i386/pr22141.c: Likewise.
>     * gcc.target/i386/pr34012.c: Add -fno-store-merging to dg-options.
>     * g++.dg/init/new17.C: Likewise.
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
21284 (AG Nuernberg)

Reply via email to