Commit 13a4e577 by Uros Bizjak Committed by Uros Bizjak

alpha.c (alpha_set_memflags): Process memory references in full insn sequence.

	* config/alpha/alpha.c (alpha_set_memflags): Process memory
	references in full insn sequence.

From-SVN: r142581
parent c69c7be1
2008-12-08 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.c (alpha_set_memflags): Process memory
references in full insn sequence.
2008-12-09 Jason Merrill <jason@redhat.com> 2008-12-09 Jason Merrill <jason@redhat.com>
PR c++/38410 PR c++/38410
...@@ -1603,18 +1603,17 @@ alpha_set_memflags_1 (rtx *xp, void *data) ...@@ -1603,18 +1603,17 @@ alpha_set_memflags_1 (rtx *xp, void *data)
return -1; return -1;
} }
/* Given INSN, which is an INSN list or the PATTERN of a single insn /* Given SEQ, which is an INSN list, look for any MEMs in either
generated to perform a memory operation, look for any MEMs in either
a SET_DEST or a SET_SRC and copy the in-struct, unchanging, and a SET_DEST or a SET_SRC and copy the in-struct, unchanging, and
volatile flags from REF into each of the MEMs found. If REF is not volatile flags from REF into each of the MEMs found. If REF is not
a MEM, don't do anything. */ a MEM, don't do anything. */
void void
alpha_set_memflags (rtx insn, rtx ref) alpha_set_memflags (rtx seq, rtx ref)
{ {
rtx *base_ptr; rtx insn;
if (GET_CODE (ref) != MEM) if (!MEM_P (ref))
return; return;
/* This is only called from alpha.md, after having had something /* This is only called from alpha.md, after having had something
...@@ -1627,11 +1626,11 @@ alpha_set_memflags (rtx insn, rtx ref) ...@@ -1627,11 +1626,11 @@ alpha_set_memflags (rtx insn, rtx ref)
&& !MEM_READONLY_P (ref)) && !MEM_READONLY_P (ref))
return; return;
if (INSN_P (insn)) for (insn = seq; insn; insn = NEXT_INSN (insn))
base_ptr = &PATTERN (insn); if (INSN_P (insn))
else for_each_rtx (&PATTERN (insn), alpha_set_memflags_1, (void *) ref);
base_ptr = &insn; else
for_each_rtx (base_ptr, alpha_set_memflags_1, (void *) ref); gcc_unreachable ();
} }
static rtx alpha_emit_set_const (rtx, enum machine_mode, HOST_WIDE_INT, static rtx alpha_emit_set_const (rtx, enum machine_mode, HOST_WIDE_INT,
......
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