summaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-23 21:41:38 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-23 21:41:38 +0000
commit37495d692287591b7996a73a144768cf86b156fa (patch)
tree1cf3efa2038a7fb928d17752f24afb12821b1df7 /gcc/gcse.c
parent690973a8398e9e305bd43ea322c4911c6b0d291e (diff)
downloadgcc-37495d692287591b7996a73a144768cf86b156fa.tar.gz
* gcse.c (oprs_unchanged_p): Respect flag_gcse_lm.
(record_last_mem_set_info): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197012 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index e0bd200c230..0c176f69f48 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -890,8 +890,9 @@ oprs_unchanged_p (const_rtx x, const_rtx insn, int avail_p)
}
case MEM:
- if (load_killed_in_block_p (current_bb, DF_INSN_LUID (insn),
- x, avail_p))
+ if (! flag_gcse_lm
+ || load_killed_in_block_p (current_bb, DF_INSN_LUID (insn),
+ x, avail_p))
return 0;
else
return oprs_unchanged_p (XEXP (x, 0), insn, avail_p);
@@ -1471,10 +1472,14 @@ canon_list_insert (rtx dest ATTRIBUTE_UNUSED, const_rtx x ATTRIBUTE_UNUSED,
static void
record_last_mem_set_info (rtx insn)
{
- int bb = BLOCK_FOR_INSN (insn)->index;
+ int bb;
+
+ if (! flag_gcse_lm)
+ return;
/* load_killed_in_block_p will handle the case of calls clobbering
everything. */
+ bb = BLOCK_FOR_INSN (insn)->index;
modify_mem_list[bb].safe_push (insn);
bitmap_set_bit (modify_mem_list_set, bb);