Commit ccfce8d2 by Jan Hubicka Committed by Jan Hubicka

flow.c (init_propagate_block_info): Canon address and use single_set for killing…

flow.c (init_propagate_block_info): Canon address and use single_set for killing dead memory stores.

	* flow.c (init_propagate_block_info): Canon address and use single_set
	for killing dead memory stores.

From-SVN: r39949
parent 0443f602
Wed Feb 21 17:35:24 CET 2001 Jan Hubicka <jh@suse.cz>
* flow.c (init_propagate_block_info): Canon address and use single_set
for killing dead memory stores.
2001-02-21 Jeffrey Oldham <oldham@codesourcery.com> 2001-02-21 Jeffrey Oldham <oldham@codesourcery.com>
* Makefile.in (reorg.o): Add params.h dependence. * Makefile.in (reorg.o): Add params.h dependence.
......
...@@ -4110,25 +4110,26 @@ init_propagate_block_info (bb, live, local_set, cond_local_set, flags) ...@@ -4110,25 +4110,26 @@ init_propagate_block_info (bb, live, local_set, cond_local_set, flags)
|| (bb->succ->succ_next == NULL || (bb->succ->succ_next == NULL
&& bb->succ->dest == EXIT_BLOCK_PTR))) && bb->succ->dest == EXIT_BLOCK_PTR)))
{ {
rtx insn; rtx insn, set;
for (insn = bb->end; insn != bb->head; insn = PREV_INSN (insn)) for (insn = bb->end; insn != bb->head; insn = PREV_INSN (insn))
if (GET_CODE (insn) == INSN if (GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) == SET && (set = single_set (insn))
&& GET_CODE (SET_DEST (PATTERN (insn))) == MEM) && GET_CODE (SET_DEST (set)) == MEM)
{ {
rtx mem = SET_DEST (PATTERN (insn)); rtx mem = SET_DEST (set);
rtx canon_mem = canon_rtx (mem);
/* This optimization is performed by faking a store to the /* This optimization is performed by faking a store to the
memory at the end of the block. This doesn't work for memory at the end of the block. This doesn't work for
unchanging memories because multiple stores to unchanging unchanging memories because multiple stores to unchanging
memory is illegal and alias analysis doesn't consider it. */ memory is illegal and alias analysis doesn't consider it. */
if (RTX_UNCHANGING_P (mem)) if (RTX_UNCHANGING_P (canon_mem))
continue; continue;
if (XEXP (mem, 0) == frame_pointer_rtx if (XEXP (canon_mem, 0) == frame_pointer_rtx
|| (GET_CODE (XEXP (mem, 0)) == PLUS || (GET_CODE (XEXP (canon_mem, 0)) == PLUS
&& XEXP (XEXP (mem, 0), 0) == frame_pointer_rtx && XEXP (XEXP (canon_mem, 0), 0) == frame_pointer_rtx
&& GET_CODE (XEXP (XEXP (mem, 0), 1)) == CONST_INT)) && GET_CODE (XEXP (XEXP (canon_mem, 0), 1)) == CONST_INT))
{ {
#ifdef AUTO_INC_DEC #ifdef AUTO_INC_DEC
/* Store a copy of mem, otherwise the address may be scrogged /* Store a copy of mem, otherwise the address may be scrogged
......
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