public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alan Lawrence <alan.lawrence@arm.com>
To: gcc-patches@gcc.gnu.org
Cc: rguenther@suse.de, mjambor@suse.cz,
	Alan Lawrence <alan.lawrence@arm.com>
Subject: [RFC 5/5] Always completely replace constant pool entries
Date: Tue, 25 Aug 2015 11:06:00 -0000	[thread overview]
Message-ID: <1440500777-25966-6-git-send-email-alan.lawrence@arm.com> (raw)
In-Reply-To: <1440500777-25966-1-git-send-email-alan.lawrence@arm.com>

I used this as a means of better-testing the previous changes, as it exercises
the constant replacement code a whole lot more. Indeed, quite a few tests are
now optimized away to nothing on AArch64...

Always pulling in constants, is almost certainly not what we want, but we may
nonetheless want something more aggressive than the usual --param, e.g. for the
ssa-dom-cse-2.c test. Thoughts welcomed?

Thanks, Alan

gcc/ChangeLog:

	* tree-sra.c (analyze_all_variable_accesses): Bypass size limit for
	constant-pool accesses.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/ssa-dom-cse-2.c: Remove --param
	sra-max-scalarization-size-Ospeed.
---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c | 2 +-
 gcc/tree-sra.c                                | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c
index b13d583..370b785 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -fno-tree-fre -fno-tree-pre -fdump-tree-optimized --param sra-max-scalarization-size-Ospeed=32" } */
+/* { dg-options "-O3 -fno-tree-fre -fno-tree-pre -fdump-tree-optimized" } */
 
 int
 foo ()
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index a3ff2df..2a741b8 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2651,7 +2651,8 @@ analyze_all_variable_accesses (void)
 	    && scalarizable_type_p (TREE_TYPE (var)))
 	  {
 	    if (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (var)))
-		<= max_scalarization_size)
+		  <= max_scalarization_size
+		|| DECL_IN_CONSTANT_POOL (var))
 	      {
 		create_total_scalarization_access (var);
 		completely_scalarize (var, TREE_TYPE (var), 0, var);
-- 
1.8.3

  parent reply	other threads:[~2015-08-25 11:06 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 11:06 [PATCH 0/5][tree-sra.c] PR/63679 Make SRA replace constant pool loads Alan Lawrence
2015-08-25 11:06 ` [RFC 4/5] Handle constant-pool entries Alan Lawrence
2015-08-25 20:19   ` Jeff Law
2015-08-26  7:24     ` Richard Biener
2015-08-26 15:51     ` Alan Lawrence
2015-08-26 14:08   ` Martin Jambor
2015-08-25 11:06 ` Alan Lawrence [this message]
2015-08-25 20:09   ` [RFC 5/5] Always completely replace constant pool entries Jeff Law
2015-08-26  7:29     ` Richard Biener
2015-08-25 11:21 ` [PATCH 2/5] completely_scalarize arrays as well as records Alan Lawrence
2015-08-25 19:40   ` Jeff Law
2015-08-27 16:54     ` Fixing sra-12.c (was: Re: [PATCH 2/5] completely_scalarize arrays as well as records) Alan Lawrence
2015-08-27 20:58       ` Fixing sra-12.c Jeff Law
2015-08-25 21:44   ` [PATCH 2/5] completely_scalarize arrays as well as records Martin Jambor
2015-08-25 21:55     ` Jeff Law
2015-08-26  7:11       ` Richard Biener
2015-08-26  9:39         ` Martin Jambor
2015-08-26 10:12           ` Richard Biener
2015-08-26 16:30             ` Alan Lawrence
2015-08-26 19:18               ` Richard Biener
2015-08-27 16:00     ` Alan Lawrence
2015-08-28  7:19       ` Christophe Lyon
2015-08-28  8:06         ` Richard Biener
2015-08-28  8:16           ` Christophe Lyon
2015-08-28  8:31             ` Richard Biener
2015-08-28 10:09             ` Alan Lawrence
2015-08-28 13:35               ` Richard Biener
2015-08-28 14:05                 ` Alan Lawrence
2015-08-28 15:17                   ` Alan Lawrence
2015-09-07 13:20                     ` Alan Lawrence
2015-09-08 12:47                       ` Martin Jambor
2015-09-14 17:41                         ` Alan Lawrence
2015-09-15  7:49                           ` Richard Biener
2015-09-17 17:12                             ` Alan Lawrence
2015-09-18  8:36                               ` Richard Biener
2015-08-25 11:30 ` [PATCH 1/5] Refactor completely_scalarize_var Alan Lawrence
2015-08-25 19:36   ` Jeff Law
2015-08-25 21:42   ` Martin Jambor
2015-08-25 12:30 ` [PATCH 3/5] Build ARRAY_REFs when the base is of ARRAY_TYPE Alan Lawrence
2015-08-25 19:54   ` Jeff Law
2015-08-26  6:34     ` Bin.Cheng
2015-08-26  7:40       ` Richard Biener
2015-08-26  7:41         ` Bin.Cheng
2015-08-26  7:20     ` Richard Biener
2015-08-25 22:51   ` Martin Jambor

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=1440500777-25966-6-git-send-email-alan.lawrence@arm.com \
    --to=alan.lawrence@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mjambor@suse.cz \
    --cc=rguenther@suse.de \
    /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).