public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Help interpreting RTL dumps
@ 2003-04-17  7:54 Marty Hauff
  2003-04-17 20:16 ` law
  0 siblings, 1 reply; 2+ messages in thread
From: Marty Hauff @ 2003-04-17  7:54 UTC (permalink / raw)
  To: gcc

I'm trying to retarget GCC and it fails during compilation of libgcc2.c  The RTL dumps are confusing me a little and I can't find any clear info in the "GNU Compiler Collection Internals" documentation about how to interpret them.

Output from libgcc2.c.17.ce has:
(insn 21 18 22 (set (cc0)
        (reg:SI 44)) 287 {tstsi} (nil)
    (expr_list:REG_DEAD (reg:SI 44)
        (nil)))

Output from libgcc2.c.18.regmove turns this into:
(insn:QI 21 18 22 (set (cc0)
        (reg:SI 44)) 287 {tstsi} (nil)
    (expr_list:REG_DEAD (reg:SI 44)
        (nil)))

The compiler complains about this insn.  I'm a bit confused about the ":QI" after the insn bit.  Is this valid and if so does anyone have or know of any doco that says so?  If its not valid I suppose I'll have to find out why it gets changed between these two dumps.

Thanks
Marty Moose

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

* Re: Help interpreting RTL dumps
  2003-04-17  7:54 Help interpreting RTL dumps Marty Hauff
@ 2003-04-17 20:16 ` law
  0 siblings, 0 replies; 2+ messages in thread
From: law @ 2003-04-17 20:16 UTC (permalink / raw)
  To: Marty Hauff; +Cc: gcc

In message <se9ea80a.022@ems.rmit.edu.au>, "Marty Hauff" writes:
 >I'm trying to retarget GCC and it fails during compilation of libgcc2.c  The 
 >RTL dumps are confusing me a little and I can't find any clear info in the "G
 >NU Compiler Collection Internals" documentation about how to interpret them.
 >
 >Output from libgcc2.c.17.ce has:
 >(insn 21 18 22 (set (cc0)
 >        (reg:SI 44)) 287 {tstsi} (nil)
 >    (expr_list:REG_DEAD (reg:SI 44)
 >        (nil)))
 >
 >Output from libgcc2.c.18.regmove turns this into:
 >(insn:QI 21 18 22 (set (cc0)
 >        (reg:SI 44)) 287 {tstsi} (nil)
 >    (expr_list:REG_DEAD (reg:SI 44)
 >        (nil)))
 >
 >The compiler complains about this insn.  I'm a bit confused about the ":QI" a
 >fter the insn bit.  Is this valid and if so does anyone have or know of any d
 >oco that says so?  If its not valid I suppose I'll have to find out why it ge
 >ts changed between these two dumps.
The mode of an insn is generally used within a pass for some kind of
bookkeeping.

A quick "grep QImode regmove.c" gets 3 hits.  

   QImode is used on the instruction at which the flags becomes live.
                  PUT_MODE (insn, QImode);
         result in a QImode clober.  */


Expanding the first hit we see:

/* It is a tedious task identifying when the flags register is live and
   when it is safe to optimize.  Since we process the instruction stream
   multiple times, locate and record these live zones by marking the
   mode of the instructions --
                                                                               

   QImode is used on the instruction at which the flags becomes live.
                                                                               

   HImode is used within the range (exclusive) that the flags are
   live.  Thus the user of the flags is not marked.
                                                                               

   All other instructions are cleared to VOIDmode.  */
                                                                               


Seems like things are working exactly as expected.

You're more likely to get help if you provide more details (like actual
error messages) rather than saying "the compiler complains about this insn".


Jeff

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

end of thread, other threads:[~2003-04-17 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-17  7:54 Help interpreting RTL dumps Marty Hauff
2003-04-17 20:16 ` law

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