From 85c0f02d872dc02ebe9568dd748e09b88acba886 Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Sat, 23 Mar 2013 21:41:38 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 3 +++ gcc/gcse.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 387ccf3758a..60749994051 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2013-03-23 Steven Bosscher + * 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 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);