This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Incomplete instatitiation of virtual registers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]