This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Incomplete instatitiation of virtual registers
- From: Martin Koegler <mkoegler at auto dot tuwien dot ac dot at>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 1 May 2005 17:25:31 +0200
- Subject: 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