[PATCH] Fix up DSE - PR middle-end/64388, target/55023

Jeff Law law@redhat.com
Thu Jan 8 21:25:00 GMT 2015


On 01/06/15 07:08, Jakub Jelinek wrote:
> Hi!
>
> On Mon, Jan 05, 2015 at 10:31:17PM +0100, Jakub Jelinek wrote:
>> Or you could e.g. do the
>>    if (HARD_FRAME_POINTER_IS_ARG_POINTER
>>        && !reload_completed
>>        && SIBLING_CALL_P (insn))
>>      { add_wild_read (bb_info); return; }
>> case first, then compute const_call and memset_call,
>>    if (const_call || memset_call)
>>      { current_big_block }
>>    else if (reload_completed && SIBLING_CALL_P (insn))
>>      add_wild_read (bb_info);
>>    else
>>      add_non_frame_wild_read (bb_info);
>>
>> That way, you would not punish const/memset calls unnecessarily after reload
>> when they are sibling calls.
>
> So what about this way?  Even for the HARD_FRAME_POINTER_IS_ARG_POINTER
> before reload case, there is no reason for wild read IMHO, just setting
> frame_read should do all that is necessary.  Bootstrapped/regtested on
> x86_64-linux and i686-linux, tested on the pr55023 testcase with cross
> to hppa-linux.  Ok for trunk?
>
> 2015-01-06  Jakub Jelinek  <jakub@redhat.com>
>
> 	PR target/55023
> 	PR middle-end/64388
> 	* dse.c (struct insn_info): Mention frame_read set also
> 	before reload for tail calls on some targets.
> 	(scan_insn): Revert 2014-12-22 change.  Set frame_read
> 	also before reload for tail calls if
> 	HARD_FRAME_POINTER_IS_ARG_POINTER.  Call add_wild_read
> 	instead of add_non_frame_wild_read for non-const/memset
> 	tail calls after reload.
OK with the typo John pointed out fixed.

jeff



More information about the Gcc-patches mailing list