public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Eric Botcazou <ebotcazou@libertysurf.fr>
Cc: gcc-patches@gcc.gnu.org, Kelvin Nilsen <kdnilsen@linux.vnet.ibm.com>
Subject: Re: [PATCH] PR80101: Fix ICE in store_data_bypass_p
Date: Fri, 07 Apr 2017 07:48:00 -0000	[thread overview]
Message-ID: <20170407074824.GU4402@gate.crashing.org> (raw)
In-Reply-To: <3316696.3QEehbYcbO@polaris>

On Fri, Apr 07, 2017 at 08:54:01AM +0200, Eric Botcazou wrote:
> > The only straightforward way I see is to use a rs6000_store_data_bypass_p
> > instead, which would be doing the same thing.  :-(
> 
> Why not just change the type of the blockage instruction as you suggested?

That works for this case, sure, but it won't solve the underlying
problem.

The default instruction type for rs6000 is "integer".  Many instructions
have this type: some bswap, register moves, load address/immediate,
mtvrsave, nop, and many things that are split; and that is just those
that have type "*" (so are easy to search for), not all those that do
no explicitly have a type attribute (including blockage).

Now, the power6 scheduler defines a bypass from power6-integer (which is
types "integer" as well as "add" and "logical") to stores.  And then
store_data_bypass_p ICEs because not all "integer" insns are a SET or
a PARALLEL of SETs.

So, changing the type involves changing the default to something else,
changing all pipeline descriptions to do the same with that type as it
does with "integer", checking all patterns that are type "integer" to
see if they should be that new type or not.  Or we could just change
"blockage" and wait for the next bug report.

Alternatively, we can arrange for the bypass functions to not ICE.  We
can do that specific to these rs6000 pipeline descriptions, by having
our own version of store_data_bypass_p; or we can make that function
work for all insns (its definition works fine for insn pairs where
not both the producer and consumer are SETs).  That's what Kelvin's
patch does.  What is the value in ICEing here?


Segher

  reply	other threads:[~2017-04-07  7:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 15:22 Kelvin Nilsen
2017-04-06 20:05 ` Eric Botcazou
2017-04-06 20:29   ` Segher Boessenkool
2017-04-07  6:54     ` Eric Botcazou
2017-04-07  7:48       ` Segher Boessenkool [this message]
2017-04-07  8:39         ` Eric Botcazou
2017-04-07  9:19           ` Segher Boessenkool
2017-04-10 17:38             ` Richard Sandiford
2017-04-10 21:37               ` Segher Boessenkool
2017-04-18 20:21             ` Eric Botcazou
2017-04-19 20:33               ` Segher Boessenkool
  -- strict thread matches above, loose matches on Subject: below --
2017-03-29 18:07 Kelvin Nilsen

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=20170407074824.GU4402@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=ebotcazou@libertysurf.fr \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kdnilsen@linux.vnet.ibm.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).