public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Henri Cloetens <henri.cloetens@blueice.be>
To: gcc-help <gcc-help@gcc.gnu.org>
Subject: question on TARGET_SECONDARY_RELOAD
Date: Wed, 21 Oct 2020 11:40:46 +0200	[thread overview]
Message-ID: <a7019a27-3763-2a2b-e1ae-42010ae64d50@blueice.be> (raw)

Hello all,

When writing my custom backend, I hit problems when more processor 
registers are needed than there
are available.

In this case,
   - it works without the optimizer (Obviously . Without the optimizer, 
the compiler puts all on the stack.)
   - it crashes with the optimizer. It crashes in the reload step, seems 
to me it fails to put some variables in memory.

This seems to be associated with my implementation of 
preferred_reload_class and secondary_reload.

This is from the log:

/blueproc_secondary_reload , return NO_REGS, rclass = BASE_REGS, mode = 
SI, type 1 x://
//(reg/v:SI 333 [ ndigits ])//
//
//blueproc_preferred_reload_class, return BASE_REGS, rclass = BASE_REGS, 
mode = SI, x://
//(reg/v:SI 333 [ ndigits ])//
//
//blueproc_preferred_reload_class, return BASE_REGS, rclass = BASE_REGS, 
mode = SI, x://
//(reg/v:SI 333 [ ndigits ])//
/

Now, something is obviously wrong. Secondary reload returns /no_regs/, 
meaning it should go straigth to memory.
But, question, what should I do with the /sri->code/ and /sri->cost/ 
arguments ??.

Best Regards,

Henri.


             reply	other threads:[~2020-10-21  9:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21  9:40 Henri Cloetens [this message]
2020-10-21 19:16 ` Segher Boessenkool

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=a7019a27-3763-2a2b-e1ae-42010ae64d50@blueice.be \
    --to=henri.cloetens@blueice.be \
    --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).