public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jgreenhalgh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66119] [5/6 Regression] in optimization of avx-code
Date: Tue, 12 May 2015 10:43:00 -0000	[thread overview]
Message-ID: <bug-66119-4-sb1slB2waa@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66119-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66119

--- Comment #7 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> DEFPARAM (PARAM_SRA_MAX_SCALARIZATION_SIZE_SPEED,
>           "sra-max-scalarization-size-Ospeed",
>           "Maximum size, in storage units, 
> 
> storage units!  But the value seems to be in bits?  It gets used as
> 
>             if (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (var)))
>                 <= max_scalarization_size)
> 

Well, that part should have been covered by:

+  unsigned max_scalarization_size
+    = (optimize_function_for_size_p (cfun)
+       ? PARAM_VALUE (PARAM_SRA_MAX_SCALARIZATION_SIZE_SIZE)
+       : PARAM_VALUE (PARAM_SRA_MAX_SCALARIZATION_SIZE_SPEED))
+      * BITS_PER_UNIT;

>From the original patch, 

> Looks like get_move_ratio returns different things at SRA time (if I re-call
> it)
> and the time it gets invoked in toplev.c.

But, yes these parameters will cause a difference in code generation if
previously MOVE_RATIO could return different values at different times, as it
might well have if target_option_override set up a structure used by
MOVE_RATIO.

The patch I applied carries the hidden assumption that MOVE_RATIO is constant.
Clearly there are a number of situations we might not want that to be true
(say, for switchable targets - which I don't think your patch will help).


  parent reply	other threads:[~2015-05-12 10:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 10:00 [Bug c++/66119] New: Regression " joachim.schoeberl at tuwien dot ac.at
2015-05-12 10:08 ` [Bug c++/66119] [5/6 Regression] " jakub at gcc dot gnu.org
2015-05-12 10:11 ` rguenth at gcc dot gnu.org
2015-05-12 10:15 ` [Bug tree-optimization/66119] " rguenth at gcc dot gnu.org
2015-05-12 10:16 ` rguenth at gcc dot gnu.org
2015-05-12 10:27 ` rguenth at gcc dot gnu.org
2015-05-12 10:43 ` jgreenhalgh at gcc dot gnu.org [this message]
2015-05-13 10:59 ` rguenth at gcc dot gnu.org
2015-06-22 12:11 ` rguenth at gcc dot gnu.org
2015-06-22 12:48 ` jgreenhalgh at gcc dot gnu.org
2015-07-02 16:27 ` jgreenhalgh at gcc dot gnu.org
2015-07-03  9:15 ` rguenth at gcc dot gnu.org
2015-07-03  9:26 ` jgreenhalgh at gcc dot gnu.org
2015-07-03  9:54 ` jgreenhalgh at gcc dot gnu.org

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=bug-66119-4-sb1slB2waa@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).