public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* question on TARGET_SECONDARY_RELOAD
@ 2020-10-21  9:40 Henri Cloetens
  2020-10-21 19:16 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: Henri Cloetens @ 2020-10-21  9:40 UTC (permalink / raw)
  To: gcc-help

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: question on TARGET_SECONDARY_RELOAD
  2020-10-21  9:40 question on TARGET_SECONDARY_RELOAD Henri Cloetens
@ 2020-10-21 19:16 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2020-10-21 19:16 UTC (permalink / raw)
  To: Henri Cloetens; +Cc: gcc-help

Hi!

On Wed, Oct 21, 2020 at 11:40:46AM +0200, Henri Cloetens wrote:
> But, question, what should I do with the /sri->code/ and /sri->cost/ 
> arguments ??.

"icode" is the number of the RTL pattern that implements this.  "cost"
usually is the number of machine instructions you need to insert.


Segher

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-21 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21  9:40 question on TARGET_SECONDARY_RELOAD Henri Cloetens
2020-10-21 19:16 ` Segher Boessenkool

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).