aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2010-11-04 07:15:33 -0600
committerJeff Law <law@gcc.gnu.org>2010-11-04 07:15:33 -0600
commita22265a4f9303a025c5291037d74f167a7b2590d (patch)
tree661a360b05122b4081e7d9f5f7041b1015f60a1b /gcc/ira.c
parent2a2651b797f11a4dbe0fb9d9e75a7ca672f934de (diff)
downloadgcc-a22265a4f9303a025c5291037d74f167a7b2590d.zip
gcc-a22265a4f9303a025c5291037d74f167a7b2590d.tar.gz
gcc-a22265a4f9303a025c5291037d74f167a7b2590d.tar.bz2
ira.c (validate_equiv_mem): Remove code to avoid invalidation of readonly memory equivalances for...
* ira.c (validate_equiv_mem): Remove code to avoid invalidation of readonly memory equivalances for const/pure calls. From-SVN: r166309
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index e84230e..d37247f 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1915,8 +1915,12 @@ validate_equiv_mem (rtx start, rtx reg, rtx memref)
if (find_reg_note (insn, REG_DEAD, reg))
return 1;
- if (CALL_P (insn) && ! MEM_READONLY_P (memref)
- && ! RTL_CONST_OR_PURE_CALL_P (insn))
+ /* This used to ignore readonly memory and const/pure calls. The problem
+ is the equivalent form may reference a pseudo which gets assigned a
+ call clobbered hard reg. When we later replace REG with its
+ equivalent form, the value in the call-clobbered reg has been
+ changed and all hell breaks loose. */
+ if (CALL_P (insn))
return 0;
note_stores (PATTERN (insn), validate_equiv_mem_from_store, NULL);