Message ID | 4D5DEE6D.4040709@codesourcery.com |
---|---|
State | New |
Headers | show |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/17/11 20:58, Jie Zhang wrote: >> > Anyway I have also tested the attached patch as your advice. Testing > arm-none-linux-gnueabi on qemu shows no regressions. Also bootstrapped > and regression tested natively on x86_64-unknown-linux-gnu. > > If you like this one better, I do not object. It seems safer than the > previous one and also fixes the issue I concern. > > I also reported a new PR and use that PR for the test case file name. This is OK. Sorry for the long review cycle times. Jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNY9/rAAoJEBRtltQi2kC7+LYIAK72iW9S/XDto5T4IKNvVv6W sZ6X7Dn+ep10jMaC2BfX/3F6Cly1DS4SmW0pzF4mMkr4KFwfLrZrDxdr0Qn+eTlO vVkcgEeH+FiiZoDALLgAt6oc0z7hDY3Ny+hqAXe2+z60EQVnzPpQSVr5bxQjA252 eehBhijFbgXVq3EPLqryqA73P+bGrp7ZS9tjDDmUeEEZ777pjxJjO+EhcLFEBa/c rKV5nmbBQtSHClr4w+Zd5XP4ZGpudkmicnxCHXY8EOXzAg5Vlqi6QUFA6zf+dxNd c6ggHUeTcO55+WYVukMSt8ZdC9nkO7GVWduzE8gbfOuxXphyc68QjU1vRNrOAtw= =BOhD -----END PGP SIGNATURE-----
On 02/23/2011 12:10 AM, Jeff Law wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 02/17/11 20:58, Jie Zhang wrote: >>> >> Anyway I have also tested the attached patch as your advice. Testing >> arm-none-linux-gnueabi on qemu shows no regressions. Also bootstrapped >> and regression tested natively on x86_64-unknown-linux-gnu. >> >> If you like this one better, I do not object. It seems safer than the >> previous one and also fixes the issue I concern. >> >> I also reported a new PR and use that PR for the test case file name. > This is OK. Sorry for the long review cycle times. > Committed on trunk. Thanks! Regards,
* web.c (web_main): Ignore naked clobber when replacing register. testsuite/ * gcc.dg/pr47763.c: New test. Index: testsuite/gcc.dg/pr47763.c =================================================================== --- testsuite/gcc.dg/pr47763.c (revision 0) +++ testsuite/gcc.dg/pr47763.c (revision 0) @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -funroll-loops -fdump-rtl-web" } */ + +foo() +{ +} + +/* { dg-final { scan-rtl-dump-not "Web oldreg" "web" } } */ +/* { dg-final { cleanup-rtl-dump "web" } } */ Index: web.c =================================================================== --- web.c (revision 169997) +++ web.c (working copy) @@ -377,7 +377,17 @@ web_main (void) FOR_BB_INSNS (bb, insn) { unsigned int uid = INSN_UID (insn); - if (NONDEBUG_INSN_P (insn)) + + if (NONDEBUG_INSN_P (insn) + /* Ignore naked clobber. For example, reg 134 in the second insn + of the following sequence will not be replaced. + + (insn (clobber (reg:SI 134))) + + (insn (set (reg:SI 0 r0) (reg:SI 134))) + + Thus the later passes can optimize them away. */ + && GET_CODE (PATTERN (insn)) != CLOBBER) { df_ref *use_rec; df_ref *def_rec;