public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* SUBREG Unrecognizable RTL
@ 2009-09-30  8:41 daniel tian
  2009-09-30  8:49 ` daniel tian
  0 siblings, 1 reply; 4+ messages in thread
From: daniel tian @ 2009-09-30  8:41 UTC (permalink / raw)
  To: gcc; +Cc: Ian Lance Taylor, Dave Korn, peng.zheng

Hi:

Yeah. You are right. Here is another RTL unrecognized.  It happened
after reload.

(insn 749 156 147 22 (set (reg:HI 5 R5)
        (subreg:HI (mem/c:SI (plus:SI (reg/f:SI 15 R15)
                    (const_int 108 [0x6c])) [19 d0+0 S4 A32]) 0)) -1 (nil))

I traced the lots of functions like: reload, reload_as_needed,
emit_reload_insn, do_input_reload, emit_input_reload_insn in reload1.c
file. But I couldn't get any clue.
the gcc clashed in function: cleanup_subreg_operands. Because you can
see the RTL seems move reg to reg,  actually it load data from memory.
My target didn't accept this kind of RTL. The memory area is the
pseduo register.94. But the reg_renumber[i] < 0 &&
reg_equiv_memory_loc[i], then the pseduo register.94 was replaced with
memory location.

But I 've no idea about why it generates this kind of unrecognized RTL.
I have been hampered this problem for a while.

Any suggestion is appreciated.
Thanks very much.

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

* Re: SUBREG Unrecognizable RTL
  2009-09-30  8:41 SUBREG Unrecognizable RTL daniel tian
@ 2009-09-30  8:49 ` daniel tian
  2009-09-30 14:41   ` Dave Korn
  0 siblings, 1 reply; 4+ messages in thread
From: daniel tian @ 2009-09-30  8:49 UTC (permalink / raw)
  To: gcc; +Cc: Ian Lance Taylor, Dave Korn, peng.zheng

here are some information from the libgcc2.c.176r.greg. (BTY: the
error happened when cc1 build the libgcc2.c)

Reloads for insn # 147
Reload 0: reload_out (SI) = (reg/v:SI 99 [ __d0 ])
	GENERAL_REGS, RELOAD_FOR_OUTPUT (opnum = 0)
	reload_out_reg: (reg/v:SI 99 [ __d0 ])
	reload_reg_rtx: (reg:SI 5 R5)
Reload 1: reload_in (HI) = (subreg:HI (reg/v:SI 94 [ d0 ]) 0)
	GENERAL_REGS, RELOAD_FOR_INPUT (opnum = 1)
	reload_in_reg: (subreg:HI (reg/v:SI 94 [ d0 ]) 0)
	reload_reg_rtx: (reg:HI 5 R5)

So does it mean when the pseduo register 94 allocated fail, the memory
location will be substitute ?

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

* Re: SUBREG Unrecognizable RTL
  2009-09-30  8:49 ` daniel tian
@ 2009-09-30 14:41   ` Dave Korn
  2009-10-01  6:00     ` daniel tian
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Korn @ 2009-09-30 14:41 UTC (permalink / raw)
  To: daniel tian; +Cc: gcc, Ian Lance Taylor, Dave Korn, peng.zheng

daniel tian wrote:
> here are some information from the libgcc2.c.176r.greg. (BTY: the
> error happened when cc1 build the libgcc2.c)
> 
> Reloads for insn # 147
> Reload 0: reload_out (SI) = (reg/v:SI 99 [ __d0 ])
> 	GENERAL_REGS, RELOAD_FOR_OUTPUT (opnum = 0)
> 	reload_out_reg: (reg/v:SI 99 [ __d0 ])
> 	reload_reg_rtx: (reg:SI 5 R5)
> Reload 1: reload_in (HI) = (subreg:HI (reg/v:SI 94 [ d0 ]) 0)
> 	GENERAL_REGS, RELOAD_FOR_INPUT (opnum = 1)
> 	reload_in_reg: (subreg:HI (reg/v:SI 94 [ d0 ]) 0)
> 	reload_reg_rtx: (reg:HI 5 R5)
> 
> So does it mean when the pseduo register 94 allocated fail, the memory
> location will be substitute ?

  Yes, when the register allocator can't find a spare register for a variable,
it makes use of a stack slot instead.

> (insn 749 156 147 22 (set (reg:HI 5 R5)
>         (subreg:HI (mem/c:SI (plus:SI (reg/f:SI 15 R15)
>                     (const_int 108 [0x6c])) [19 d0+0 S4 A32]) 0)) -1 (nil))

  So, does your CPU support HImode sized load and store operations?

    cheers,
      DaveK

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

* Re: SUBREG Unrecognizable RTL
  2009-09-30 14:41   ` Dave Korn
@ 2009-10-01  6:00     ` daniel tian
  0 siblings, 0 replies; 4+ messages in thread
From: daniel tian @ 2009-10-01  6:00 UTC (permalink / raw)
  To: Dave Korn; +Cc: gcc, peng.zheng

Yeah. My target do have instructions support load/store HImode. And
the problem is fix. I just don't understand why.  Here is the
information I gotta: http://gcc.gnu.org/ml/gcc/2005-01/msg00788.html.
I defined a predicate function rice_memory_operand which calls the
function memory operand directly, and nothing else it do. I wrote it
because it's convenient to debug. This is the what make the RTL
unrecognizable.

This is weird. I have to hack it later.
Anyway, after fixed it, gcc is build success which means a great
forward step for me.

Thanks for your guys'help.
Best Wishes.

                daniel

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

end of thread, other threads:[~2009-10-01  6:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-30  8:41 SUBREG Unrecognizable RTL daniel tian
2009-09-30  8:49 ` daniel tian
2009-09-30 14:41   ` Dave Korn
2009-10-01  6:00     ` daniel tian

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