diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2008-12-09 08:16:57 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2008-12-09 08:16:57 +0100 |
commit | 13a4e57765a90e8a4eea8f61874f85b9da15a47f (patch) | |
tree | 0ea8f9f0dd9c6383c4b241aa3381dab19f9e113c | |
parent | c69c7be10b82d76d6b3d8daf88d9e7a05278bdda (diff) | |
download | gcc-13a4e57765a90e8a4eea8f61874f85b9da15a47f.zip gcc-13a4e57765a90e8a4eea8f61874f85b9da15a47f.tar.gz gcc-13a4e57765a90e8a4eea8f61874f85b9da15a47f.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8b338f..fe7ef41 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> PR c++/38410 diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 26feea5..52ae122 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1603,18 +1603,17 @@ alpha_set_memflags_1 (rtx *xp, void *data) return -1; } -/* Given INSN, which is an INSN list or the PATTERN of a single insn - generated to perform a memory operation, look for any MEMs in either +/* Given SEQ, which is an INSN list, look for any MEMs in either 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 a MEM, don't do anything. */ 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; /* This is only called from alpha.md, after having had something @@ -1627,11 +1626,11 @@ alpha_set_memflags (rtx insn, rtx ref) && !MEM_READONLY_P (ref)) return; - if (INSN_P (insn)) - base_ptr = &PATTERN (insn); - else - base_ptr = &insn; - for_each_rtx (base_ptr, alpha_set_memflags_1, (void *) ref); + for (insn = seq; insn; insn = NEXT_INSN (insn)) + if (INSN_P (insn)) + for_each_rtx (&PATTERN (insn), alpha_set_memflags_1, (void *) ref); + else + gcc_unreachable (); } static rtx alpha_emit_set_const (rtx, enum machine_mode, HOST_WIDE_INT, |