public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Paul Koning <paulkoning@comcast.net>
Cc: Richard Biener <richard.guenther@gmail.com>,
	Gerald Pfeifer <gerald@pfeifer.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] wwwdocs: Note that old reload is deprecated
Date: Thu, 12 Jan 2023 08:40:31 -0600	[thread overview]
Message-ID: <20230112144030.GA25951@gate.crashing.org> (raw)
In-Reply-To: <6A51E423-A983-42F1-95BB-FFB495050FE2@comcast.net>

On Thu, Jan 12, 2023 at 09:17:31AM -0500, Paul Koning wrote:
> > On Jan 12, 2023, at 4:50 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> > I mean general_operand accepts that sp thing you saw.  But your
> > constraints do not?  (I don't know your target well, maybe this isn't
> > true).  Things like this should be sorted out by reload, but you get
> > better code (and fewer problems ;-) ) if you make code that fits
> > earlier.  The L in LRA means "local": it "just" makes things fit, it
> > does not emphasise optimising your code.
> 
> The destination is "nonimmediate_operand" which matches what the machine actually does.  It's like VAX and M68k, instruction operands in general can be registers, memory references, register indirect or memory indirect, memory at register with offset, or autoinc/autodec off any register.
> 
> As far as operand type is concerned, SP is certainly a valid operand for an add operation, that isn't the problem.  The problem is that it's a two operand machine: the first operand of the add instruction is both source and destination.  And LRA assigned the source register to be the destination register as required, but then after doing so it replaced the destination (an FP reference) by a different register (SP reference), violating the constraint after having satisfied it earlier.

Ah okay.  Yes, something does not verify if the instructions are valid
before doing some replacement.  Something around ELIMINABLE_REGS it
looks like?  Maybe the dump file says more, or maybe the dump file can
be improved.

> Interesting to know what LRA stands for, I didn't know that.

First line of lra.cc:
/* LRA (local register allocator) driver and LRA utilities.

:-)


Segher

  reply	other threads:[~2023-01-12 14:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 19:27 Segher Boessenkool
2023-01-05 19:54 ` Paul Koning
2023-01-05 20:23   ` Segher Boessenkool
2023-01-11 14:21 ` Gerald Pfeifer
2023-01-11 14:34   ` Richard Biener
2023-01-11 15:15     ` Segher Boessenkool
2023-01-11 16:27       ` Richard Biener
2023-01-11 18:32         ` Segher Boessenkool
2023-01-11 18:39           ` Richard Biener
2023-01-11 19:07             ` Segher Boessenkool
2023-01-12  7:44               ` Richard Biener
2023-01-12  7:48                 ` Richard Biener
2023-01-11 18:42           ` Paul Koning
2023-01-11 19:28             ` Segher Boessenkool
2023-01-11 22:07               ` Paul Koning
2023-01-12  9:50                 ` Segher Boessenkool
2023-01-12 14:17                   ` Paul Koning
2023-01-12 14:40                     ` Segher Boessenkool [this message]
2023-01-12 15:07                       ` Paul Koning

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=20230112144030.GA25951@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=paulkoning@comcast.net \
    --cc=richard.guenther@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).