public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Incomplete instatitiation of virtual registers
@ 2005-05-01 15:25 Martin Koegler
  2005-05-04  0:44 ` James E Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Koegler @ 2005-05-01 15:25 UTC (permalink / raw)
  To: Richard Henderson; +Cc: gcc

I notice, that your last change in function.c forgets virtual
registers in the RTL in some conditions. In older version (the last I used was 20050412),
this has not happend.

In 01.sibling, I have the instruction:
(insn 10 8 12 1 (set (mem/f/i:HI (plus:HI (reg/f:HI 23 virtual-stack-vars)
                (const_int -2 [0xfffffffe])) [0 b+0 S2 A8 00000000])
        (plus:HI (reg/f:HI 23 virtual-stack-vars)
            (const_int -6 [0xfffffffa]))) -1 (nil)
    (nil))

In 03.jump, it is replaced with
(insn 10 8 12 1 (set (mem/f/i:HI (plus:HI (reg/f:HI 23 virtual-stack-vars)
                (const_int -2 [0xfffffffe])) [0 b+0 S2 A8 00000000])
        (plus:HI (reg/f:HI 6 VFP)
            (const_int -6 [0xfffffffa]))) 73 {addhi3} (nil)
    (nil))

The left virtual-stack-vars causes other problems in the reload pass.

I noticed this in my GCC port, I don't know, if such RTL expressions can
occure in offical versions.

A simple workaround is to rerun the instanication, if anything changes:
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.616
diff -u -p -r1.616 function.c
--- function.c  30 Apr 2005 03:17:53 -0000      1.616
+++ function.c  1 May 2005 15:11:22 -0000
@@ -1528,6 +1528,8 @@ instantiate_virtual_regs_in_insn (rtx in
       if (recog_memoized (insn) < 0)
        fatal_insn_not_found (insn);
     }
+  if(any_change)
+    instantiate_virtual_regs_in_insn (insn);
 }

 /* Subroutine of instantiate_decls.  Given RTL representing a decl,


mfg Martin Kögler

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

end of thread, other threads:[~2005-05-05 11:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-01 15:25 Incomplete instatitiation of virtual registers Martin Koegler
2005-05-04  0:44 ` James E Wilson
2005-05-04  0:55   ` Richard Henderson
2005-05-04  8:02   ` Martin Koegler
2005-05-04  8:08     ` Richard Henderson
2005-05-04 10:01       ` Martin Koegler
2005-05-05 12:09       ` Martin Koegler

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