diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2013-03-23 21:41:38 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2013-03-23 21:41:38 +0000 |
commit | 85c0f02d872dc02ebe9568dd748e09b88acba886 (patch) | |
tree | 1cf3efa2038a7fb928d17752f24afb12821b1df7 | |
parent | 225ccc68d7a040c5db248b52dd4a4ed0acafd622 (diff) | |
download | gcc-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/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/gcse.c | 11 |
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. @@ -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); |