From: Richard Biener <richard.guenther@gmail.com>
To: James Greenhalgh <james.greenhalgh@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Marcus Shawcroft <marcus.shawcroft@arm.com>,
Richard Earnshaw <richard.earnshaw@arm.com>,
Andrew Pinski <pinskia@gmail.com>
Subject: Re: [Patch 1/2] Control SRA and IPA-SRA by a param rather than MOVE_RATIO
Date: Wed, 20 Aug 2014 09:21:00 -0000 [thread overview]
Message-ID: <CAFiYyc33WnFRGZiSLz+b8dFX=eE_pkoHPoTMFEN3zna-rRUKTQ@mail.gmail.com> (raw)
In-Reply-To: <1408525799-25739-1-git-send-email-james.greenhalgh@arm.com>
On Wed, Aug 20, 2014 at 11:09 AM, James Greenhalgh
<james.greenhalgh@arm.com> wrote:
>
> Hi,
>
> Presently the decision as to whether to completely scalarize an aggregate
> or not is made based on MOVE_RATIO. This is an undocumented, and unexpected,
> overloading of the target macro.
>
> In this patch we fix this.
>
> First, we we add a new target hook
> TARGET_DEFAULT_MAX_TOTAL_SCALARIZATION_SIZE, which returns MOVE_RATIO
> by default.
>
> Then we add two new parameters:
>
> sra-max-total-scalarization-size-Ospeed - The maximum size of aggregate
> to consider when compiling for speed
> sra-max-total-scalarization-size-Osize - The maximum size of aggregate
> to consider when compiling for size.
>
> Set to default to 0.
>
> Finally we wire up SRA to prefer using the parameters, and if it doesn't
> find values for them, fallback to the target hook.
>
> Bootstrapped and regression tested for x86, arm and aarch64 with no
> issues, I've also thrown a smoke-test of popular small benchmarks at
> each platform without seeing meaningful differences (as you would expect).
>
> OK?
I think this is overly complicated and instead SRA should only
use the parameters. Targets can adjust their default (like they
do for other parameters).
The default should be MOVE_RATIO which should be applied
where the common code adjusts parameters (see existing
examples for not overriding user specified ones).
Thanks,
Richard.
> Thanks,
> James
>
> ---
> gcc/
>
> 2014-08-20 James Greenhalgh <james.greenhalgh@arm.com>
>
> * doc/invoke.texi (sra-max-total-scalarization-size-Ospeed): Document.
> (sra-max-total-scalarization-size-Osize): Likewise.
> * doc/tm.texi.in
> (TARGET_DEFAULT_MAX_TOTAL_SCALARIZATION_SIZE): Add hook.
> * doc/tm.texi: Regenerate.
> * params.def (sra-max-total-scalarization-size-Ospeed): New.
> (sra-max-total-scalarization-size-Osize): Likewise.
> * target.def (default_max_total_scalarization_size): New.
> * targhooks.c (default_max_total_scalarization_size): New.
> * targhooks.h (default_max_total_scalarization_size): New.
> * tree-sra.c (get_max_total_scalarization_size): New.
> (analyze_all_variable_accesses): Use it.
next prev parent reply other threads:[~2014-08-20 9:21 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 8:50 [AArch64] Implement movmem for the benefit of inline memcpy James Greenhalgh
2014-06-06 10:39 ` Richard Earnshaw
2014-08-01 6:38 ` Andrew Pinski
2014-08-01 9:05 ` Richard Biener
2014-08-01 9:21 ` pinskia
2014-08-05 7:05 ` Andrew Pinski
2014-08-07 14:20 ` James Greenhalgh
2014-08-07 14:34 ` Richard Biener
2014-08-20 9:10 ` [Patch 1/2] Control SRA and IPA-SRA by a param rather than MOVE_RATIO James Greenhalgh
2014-08-20 9:10 ` [Patch AArch64 2/2] Wire up TARGET_DEFAULT_MAX_SCALARIZATION_SIZE James Greenhalgh
2014-08-20 9:21 ` Richard Biener [this message]
2014-09-25 14:58 ` [Patch 0/4] Re: Control SRA and IPA-SRA by a param rather than MOVE_RATIO James Greenhalgh
2014-09-25 14:58 ` [Patch AArch64 4/4] Wire up New target hooks James Greenhalgh
2014-09-26 13:31 ` James Greenhalgh
2014-09-25 14:58 ` [Patch 2/4] Hack out a use of MOVE_RATIO in tree-inline.c James Greenhalgh
2014-09-26 8:58 ` Richard Biener
2014-09-25 14:58 ` [Patch 1/4] Hookize MOVE_BY_PIECES_P, remove most uses of MOVE_RATIO James Greenhalgh
2014-09-25 15:09 ` Steven Bosscher
2014-09-26 9:16 ` Richard Biener
2014-10-29 10:45 ` [Patch 0/6] Hookize MOVE_BY_PIECES_P James Greenhalgh
2014-10-29 10:47 ` [Patch 1/6] Hookize MOVE_BY_PIECES_P, remove most uses of MOVE_RATIO James Greenhalgh
2014-10-29 12:29 ` Matthew Fortune
2014-10-29 16:11 ` James Greenhalgh
2014-10-31 15:09 ` James Greenhalgh
2014-10-31 15:10 ` [Patch 2/7 s390] Deprecate *_BY_PIECES_P, move to hookized version James Greenhalgh
2014-10-31 15:10 ` [Patch 1/7] Hookize *_BY_PIECES_P James Greenhalgh
2014-10-31 21:08 ` Jeff Law
2014-10-31 15:11 ` [Patch 3/7 arc] Deprecate *_BY_PIECES_P, move to hookized version James Greenhalgh
2014-11-04 12:08 ` Joern Rennecke
2014-11-04 14:24 ` James Greenhalgh
2014-11-04 16:20 ` Joern Rennecke
2014-10-31 15:11 ` [Patch 4/7 sh] " James Greenhalgh
2014-11-01 23:27 ` Kaz Kojima
2014-10-31 15:12 ` [Patch 5/7 mips] " James Greenhalgh
2014-10-31 15:16 ` [Patch 6/7 AArch64] " James Greenhalgh
2014-10-31 15:34 ` [Patch 7/7] Remove *_BY_PIECES_P James Greenhalgh
2014-10-29 10:49 ` [Patch 2/6 s390] Deprecate MOVE_BY_PIECES_P, move to hookized version James Greenhalgh
2014-10-29 21:09 ` Jeff Law
2014-10-29 10:50 ` [Patch 3/6 arc] " James Greenhalgh
2014-10-29 21:10 ` Jeff Law
2014-10-29 10:50 ` [Patch 4/6 sh] " James Greenhalgh
2014-10-29 21:10 ` Jeff Law
2014-10-30 0:49 ` Kaz Kojima
2014-10-29 10:51 ` [Patch 5/6 mips] " James Greenhalgh
2014-10-29 21:18 ` Jeff Law
2014-10-29 10:53 ` [Patch 6/6] Remove MOVE_BY_PIECES_P James Greenhalgh
2014-10-29 21:20 ` Jeff Law
2014-09-25 14:58 ` [Patchv2 3/4] Control SRA and IPA-SRA by a param rather than MOVE_RATIO James Greenhalgh
2014-09-26 9:11 ` Richard Biener
2014-10-01 16:38 ` James Greenhalgh
2014-10-29 14:39 ` James Greenhalgh
2014-10-31 10:58 ` Richard Biener
2014-11-06 11:53 ` [Patchv3] " James Greenhalgh
2014-11-06 14:10 ` Richard Biener
2014-08-21 10:34 ` [Patch 1/2] Don't put out a call to memcpy for volatile struct operations James Greenhalgh
2014-08-21 10:34 ` [Patch AArch64 2/2] Do not double-copy bytes in " James Greenhalgh
2014-08-21 11:22 ` [Patch 1/2] Don't put out a call to memcpy for " Richard Biener
2014-08-21 23:47 ` Mike Stump
2014-08-22 15:42 ` Joseph S. Myers
2014-08-22 17:33 ` Mike Stump
2014-08-26 8:35 ` Richard Biener
2014-08-26 16:42 ` Mike Stump
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFiYyc33WnFRGZiSLz+b8dFX=eE_pkoHPoTMFEN3zna-rRUKTQ@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=james.greenhalgh@arm.com \
--cc=marcus.shawcroft@arm.com \
--cc=pinskia@gmail.com \
--cc=richard.earnshaw@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).