diff mbox

Copy frame_related bits

Message ID 4E5E6D7B.9050308@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt Aug. 31, 2011, 5:20 p.m. UTC
With the final shrink-wrapping patch applied, I see failures in
dwarf2cfi on mips64-elf. The problem is that reorg.c uses copy_rtx to
copy instructions, and for some reason that clears the frame_related
bit. We end up with a prologue insn in a delay slot, and dwarf2cfi
disregards its effects.

I see no reason to do this, and testing (BSRT i686-linux, plus
mips64-elf sim testing) showed no reason either. Ok?


Bernd
* rtl.c (copy_rtx): Do not handle frame_related, jump or call
	flags specially.

Comments

Jeff Law Aug. 31, 2011, 5:43 p.m. UTC | #1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/31/11 11:20, Bernd Schmidt wrote:
> With the final shrink-wrapping patch applied, I see failures in 
> dwarf2cfi on mips64-elf. The problem is that reorg.c uses copy_rtx
> to copy instructions, and for some reason that clears the
> frame_related bit. We end up with a prologue insn in a delay slot,
> and dwarf2cfi disregards its effects.
> 
> I see no reason to do this, and testing (BSRT i686-linux, plus 
> mips64-elf sim testing) showed no reason either. Ok?
Presumably the jump & call flags are copied as part of the
shallow_copy_rtx call, thus removing the explicit copy is safe?

Based on my review of the history of that code I don't think ignoring
the frame related flag was ever intentional...

OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOXnLcAAoJEBRtltQi2kC735MH/AsvPSEjsFpvRebGyVGhUSGL
A4nFRZjXVuRDpUFwRrWKGdqLPPdqzdJ5ixaS+Z1pHDwXYwaLXO46XRldDf8GbcGT
Dl2tCZSel9KTVduEm4wH49ZXTMn4UZBLbpIfhO19SUXZ399AmzIeBCvfMtGPJczM
fZNjFI+/CsNQ9n6GsWMit0qjYqSZCTyVabRCKsGHiMRmnA8WtXfhdEZR5ZSANqo6
98HgCtNkD1Q643Sc9SNqXbIDdZF1CB1hKUl01Rf+SADX6In4SrDOXGYgmvt/plDB
b8j1zt0Agmjpw36f4dgIeaF50WzU1FpeaxZYZ8hfFcwBY6mBenDXB0lIGg/EHx0=
=iOxe
-----END PGP SIGNATURE-----
Bernd Schmidt Aug. 31, 2011, 9:37 p.m. UTC | #2
On 08/31/11 19:43, Jeff Law wrote:
> Presumably the jump & call flags are copied as part of the
> shallow_copy_rtx call, thus removing the explicit copy is safe?

That's the conclusion I came to.


Bernd
diff mbox

Patch

Index: gcc/rtl.c
===================================================================
--- gcc/rtl.c	(revision 178135)
+++ gcc/rtl.c	(working copy)
@@ -289,12 +289,6 @@  copy_rtx (rtx orig)
      walks over the RTL.  */
   RTX_FLAG (copy, used) = 0;
 
-  /* We do not copy FRAME_RELATED for INSNs.  */
-  if (INSN_P (orig))
-    RTX_FLAG (copy, frame_related) = 0;
-  RTX_FLAG (copy, jump) = RTX_FLAG (orig, jump);
-  RTX_FLAG (copy, call) = RTX_FLAG (orig, call);
-
   format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
 
   for (i = 0; i < GET_RTX_LENGTH (GET_CODE (copy)); i++)