public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jeff Law <law@redhat.com>
Cc: Georg-Johann Lay <gjl@gcc.gnu.org>, gcc@gcc.gnu.org
Subject: Re: cc0 -> CCmode questions
Date: Sat, 02 Nov 2019 17:39:00 -0000	[thread overview]
Message-ID: <20191102173929.GI28442@gate.crashing.org> (raw)
In-Reply-To: <fc4f109b-1108-f18b-feb1-bbd9221dccd1@redhat.com>

On Sat, Nov 02, 2019 at 10:14:15AM -0600, Jeff Law wrote:
> On 11/2/19 9:51 AM, Georg-Johann Lay wrote:
> > Segher Boessenkool schrieb:
> >>> Btw, does GCC support clobbering registers in branches (or
> >>> cbranch<mode>4 for that matter)?  This requirement would come up when
> >>> transitioning avr to cc_mode because cbranches would live post reload.
> >>
> >> Of course.  You cannot have *reloads* on branches, that is all.

Sigh.  *Output reloads*, sorry for dropping a crucial word here :-/

> > Does this also apply to input reloads?
>
> This should work in the LRA world just fine.  The problems are with
> output reloads, not input reloads.

In the old reload world as well.  Only output reloads are a problem.

> With an output reload on a branch you have to emit the reload at the
> target(s) of the branch as well as the fallthru path (if one exists).

Or you can do something *before* the branch, but that is different for
every case, and harder to do anyway.

If you insert the reloads at the jump target, you'll need to make a
separate predecessor of the jump target and insert the reload *there*,
if we aren't the only predecessor of that target.

> In theory we could do this for simple branches, but for indirects it'd
> be virtually impossible.

Yup.  Luckily most branches with outputs are not indirect branches.

I would love if this problem was fixed once and for all (I only care
about LRA here of course).


Segher

      reply	other threads:[~2019-11-02 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19  9:58 BountySource campaign for gcc PR/91851 John Paul Adrian Glaubitz
2019-10-30 19:33 ` Georg-Johann Lay
2019-10-30 20:03   ` Peter Bergner
2019-10-31 21:01     ` Georg-Johann Lay
2019-10-31 22:12       ` John Paul Adrian Glaubitz
2019-10-31 22:47         ` Georg-Johann Lay
2019-11-01  1:06           ` Segher Boessenkool
2019-11-02 15:53             ` cc0 -> CCmode questions Georg-Johann Lay
2019-11-02 16:14               ` Jeff Law
2019-11-02 17:39                 ` Segher Boessenkool [this message]

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=20191102173929.GI28442@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc@gcc.gnu.org \
    --cc=gjl@gcc.gnu.org \
    --cc=law@redhat.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).