public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Aurelien Buhrig <aurelien.buhrig.gcc@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: reload in incompatible constraints
Date: Tue, 28 Jun 2011 06:01:00 -0000	[thread overview]
Message-ID: <mcrsjqu3mq2.fsf@coign.corp.google.com> (raw)
In-Reply-To: <BANLkTi=VXiMtNPQ3dDKDJbGmaLThQhCe-w@mail.gmail.com> (Aurelien	Buhrig's message of "Mon, 27 Jun 2011 18:15:52 +0200")

Aurelien Buhrig <aurelien.buhrig.gcc@gmail.com> writes:

> I'm trying to implement TARGET_SECONDARY_RELOAD but I cannot make it
> work properly.
> The hook seems to work for preventing from moving from BASE_REG to
> BASE_REG in HImode by inserting a GENERAL_REG.
> But I also want to insert a GENERAL_REGS intermediate register when
> moving between BASE_REGS registers and memory in HImode.
>
> So I wrote something like that in my TARGET_SECONDARY_RELOAD:
> if (MEM_P(x) && (reload_mode == HImode) && reload_class == BASE_REGS)
>      return GENERAL_REGS;
>
>
> But it seems this do not work. For instance with DI function parameter
> access (movdi reg:DI <-- m) which are (automatically) split into movhi
> subreg:HI <-- m; then in movhi reg:HI <- m. But the hook do not seem
> to work since the reg:HI is reloaded into a BASE_REG...
>
> So when is this hook called? Is there something specific with spliting
> insn? Or just a general thing about TARGET_SECONDARY_RELOAD I missed ?

The hook is called during reload, which is run as part of register
allocation.  When are you splitting the DImode load?

Ian

  reply	other threads:[~2011-06-27 22:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  8:35 Aurelien Buhrig
2011-06-23 17:58 ` Ian Lance Taylor
2011-06-27 21:46   ` Aurelien Buhrig
2011-06-28  6:01     ` Ian Lance Taylor [this message]
2011-06-28 17:57       ` Aurelien Buhrig
2011-06-28 18:55         ` Ian Lance Taylor

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=mcrsjqu3mq2.fsf@coign.corp.google.com \
    --to=iant@google.com \
    --cc=aurelien.buhrig.gcc@gmail.com \
    --cc=gcc-help@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).