aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2013-03-23 21:41:38 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2013-03-23 21:41:38 +0000
commit85c0f02d872dc02ebe9568dd748e09b88acba886 (patch)
tree1cf3efa2038a7fb928d17752f24afb12821b1df7
parent225ccc68d7a040c5db248b52dd4a4ed0acafd622 (diff)
downloadgcc-85c0f02d872dc02ebe9568dd748e09b88acba886.zip
gcc-85c0f02d872dc02ebe9568dd748e09b88acba886.tar.gz
gcc-85c0f02d872dc02ebe9568dd748e09b88acba886.tar.bz2
gcse.c (oprs_unchanged_p): Respect flag_gcse_lm.
* gcse.c (oprs_unchanged_p): Respect flag_gcse_lm. (record_last_mem_set_info): Likewise. From-SVN: r197012
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/gcse.c11
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 387ccf3..6074999 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2013-03-23 Steven Bosscher <steven@gcc.gnu.org>
+ * gcse.c (oprs_unchanged_p): Respect flag_gcse_lm.
+ (record_last_mem_set_info): Likewise.
+
* df-core.c (rest_of_handle_df_initialize): Use XCNEWVEC instead
of XNEWVEC followed by memset.
(df_worklist_dataflow): Use XNEWVEC instead of xmalloc with a cast.
diff --git a/gcc/gcse.c b/gcc/gcse.c
index e0bd200..0c176f6 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);