mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-10 02:16:44 +08:00
* flow.c (insn_dead_p): Detect dead memory stores with auto increments.
From-SVN: r36220
This commit is contained in:
parent
f725a3ec9b
commit
4f4b88d083
@ -1,3 +1,7 @@
|
||||
2000-09-06 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
|
||||
|
||||
* flow.c (insn_dead_p): Detect dead memory stores with auto increments.
|
||||
|
||||
2000-09-06 Kazu Hirata <kazu@hxi.com>
|
||||
|
||||
* calls.c: Fix formatting.
|
||||
|
15
gcc/flow.c
15
gcc/flow.c
@ -3954,8 +3954,21 @@ insn_dead_p (pbi, x, call_ok, notes)
|
||||
temp = pbi->mem_set_list;
|
||||
while (temp)
|
||||
{
|
||||
if (rtx_equal_p (XEXP (temp, 0), r))
|
||||
rtx mem = XEXP (temp, 0);
|
||||
|
||||
if (rtx_equal_p (mem, r))
|
||||
return 1;
|
||||
#ifdef AUTO_INC_DEC
|
||||
/* Check if memory reference matches an auto increment. Only
|
||||
post increment/decrement or modify are valid. */
|
||||
if (GET_MODE (mem) == GET_MODE (r)
|
||||
&& (GET_CODE (XEXP (mem, 0)) == POST_DEC
|
||||
|| GET_CODE (XEXP (mem, 0)) == POST_INC
|
||||
|| GET_CODE (XEXP (mem, 0)) == POST_MODIFY)
|
||||
&& GET_MODE (XEXP (mem, 0)) == GET_MODE (r)
|
||||
&& rtx_equal_p (XEXP (XEXP (mem, 0), 0), XEXP (r, 0)))
|
||||
return 1;
|
||||
#endif
|
||||
temp = XEXP (temp, 1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user