Commit b152a615 by Jie Zhang Committed by Jie Zhang

re PR rtl-optimization/47763 (Useless initialization of register)

	PR rtl-optimization/47763
	* web.c (web_main): Ignore naked clobber when replacing register.

	testsuite/
	PR rtl-optimization/47763
	* gcc.dg/pr47763.c: New test.

From-SVN: r170422
parent 9f1a8175
2011-02-23 Jie Zhang <jie@codesourcery.com>
PR rtl-optimization/47763
* web.c (web_main): Ignore naked clobber when replacing register.
2011-02-22 Anatoly Sokolov <aesok@post.ru>
* config/stormy16/stormy16.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P):
......
2011-02-23 Jie Zhang <jie@codesourcery.com>
PR rtl-optimization/47763
* gcc.dg/pr47763.c: New test.
2011-02-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/45743
......
/* { 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" } } */
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment