public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>,
	       Steven Bosscher <stevenb.gcc@gmail.com>,
	       GCC Patches <gcc-patches@gcc.gnu.org>,
	rdsandiford@googlemail.com
Subject: Re: Instructions vs Expressions in the backend (was Re: RFA: Rework FOR_BB_INSNS iterators)
Date: Wed, 25 Jun 2014 20:46:00 -0000	[thread overview]
Message-ID: <53AB351C.4090203@redhat.com> (raw)
In-Reply-To: <87ionpgyid.fsf@talisman.default>

On 06/25/14 02:54, Richard Sandiford wrote:
>>
>> and the code now uses "rtx_insn *" in hundreds of places where it would
>> previously have used "rtx".
>
> This looks really good to me FWIW.  The only thing I'm not sure about is
> how useful rtx_nonjump_insn would be.  ISTM that jump_insn and call_insn
> really are subclasses that add extra information on top of a "normal"
> insn (JUMP_LABEL for jumps and CALL_INSN_FUNCTION_USAGE for calls).
Glad you think so -- I hope others chime in as the work progresses so 
they're not saying WTF, why did all this change when I approve the 
massive patchkit.


>
> I suppose there's also a bikeshed argument about whether "rtx_"
> should be in the name, if we want to keep open the option of
> moving to a different structure.
Well, as you're probably aware, I hate the "everything is an RTX" model 
we've got in GCC.  I'm not aware of anything having the toplevel objects 
in the insn chain buys us other than bugs.

>
> What do you think about adding something like:
>
>    /* Account for the NEXT_INSN and BLOCK_FOR_INSN fields.  */
>    rtunion GTY ((skip)) fld[2];
>
> to rtx_insn, and similarly for the derived classes, so that each derived
> class has the right size?  It might even help the compiler prove that it
> can speculatively fetch later parts of the structure before a condition
> based on something like BLOCK_FOR_INSN.
For objects which form the insn chain, I'd like the prev, next which 
each object must have would be in the base object.

> Do you get to the point where things like NEXT_INSN and PREV_INSN can
> require rtx_insns as argument?  I suppose that would be the end goal.
> Same for JUMP_LABEL requiring an rtx_jump_insn, etc.
Yea, I think that's the ultimate goal of this stage.  In my mind I 
wanted to narrow the scope enough that it had a chance to get into the 
upcoming release -- thus I've asked David to  focus on the objects that 
show up in the insn chain.  There may be some bleed out, but that's 
really the focus and if we could get to NEXT_INSN/PREV_INSN requiring an 
rtx_insn argument, then we'd be golden.

>
> SEQUENCE is just weird though :-)  It would be good to have an alternative
> representation, but that'd be a lot of work on reorg.
Yea.  And I don't think anyone is keen on rewriting reorg.

Jeff

  reply	other threads:[~2014-06-25 20:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-07 17:54 RFA: Rework FOR_BB_INSNS iterators Richard Sandiford
2014-06-07 20:26 ` Steven Bosscher
2014-06-09 19:32   ` Richard Sandiford
2014-06-23 19:01     ` Instructions vs Expressions in the backend (was Re: RFA: Rework FOR_BB_INSNS iterators) David Malcolm
2014-06-23 20:38       ` Oleg Endo
2014-06-25  9:36         ` Richard Sandiford
2014-06-25 20:39           ` Jeff Law
2014-06-27 14:28             ` David Malcolm
2014-06-27 15:38               ` Jeff Law
2014-06-27  7:36           ` Oleg Endo
2014-06-27 14:35           ` David Malcolm
2014-06-25  8:54       ` Richard Sandiford
2014-06-25 20:46         ` Jeff Law [this message]
2014-06-25 21:24           ` Steven Bosscher

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=53AB351C.4090203@redhat.com \
    --to=law@redhat.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rdsandiford@googlemail.com \
    --cc=stevenb.gcc@gmail.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).