Patchwork ifcvt/crossjump patch: Fix PR 42496, 21803

login
register
mail settings
Submitter Bernd Schmidt
Date Oct. 3, 2010, 11:34 a.m.
Message ID <4CA86A32.9010603@codesourcery.com>
Download mbox | patch
Permalink /patch/66597/
State New
Headers show

Comments

Bernd Schmidt - Oct. 3, 2010, 11:34 a.m.
On 10/02/2010 03:07 PM, H.J. Lu wrote:
> On Wed, Aug 4, 2010 at 6:35 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
>> On 08/03/2010 07:12 PM, Jeff Law wrote:
>>> OK.  WRT the comment, we might want to just say that BB_MODIFIED is set
>>> at the same time as a block is marked dirty, but is not cleared during a
>>> df_analyze allowing a pass to update the DF information and still know
>>> what blocks were modified.
>>
>> New patch below.
>>
> 
> This caused:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45865

This should fix it, refusing to move NOTE_EPILOGUE_BEGIN and anything
beyond it.

Bootstrapped and tested on i686-linux, ok?


Bernd
* df-problems.c (can_move_insns_across): Stop at
	NOTE_INSN_EPILOGUE_BEG.
H.J. Lu - Oct. 3, 2010, 11:39 a.m.
On Sun, Oct 3, 2010 at 4:34 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On 10/02/2010 03:07 PM, H.J. Lu wrote:
>> On Wed, Aug 4, 2010 at 6:35 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
>>> On 08/03/2010 07:12 PM, Jeff Law wrote:
>>>> OK.  WRT the comment, we might want to just say that BB_MODIFIED is set
>>>> at the same time as a block is marked dirty, but is not cleared during a
>>>> df_analyze allowing a pass to update the DF information and still know
>>>> what blocks were modified.
>>>
>>> New patch below.
>>>
>>
>> This caused:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45865
>
> This should fix it, refusing to move NOTE_EPILOGUE_BEGIN and anything
> beyond it.
>
> Bootstrapped and tested on i686-linux, ok?
>

Can you include a testcase?

Thanks.
H.J. Lu - Oct. 6, 2010, 1:12 a.m.
On Sun, Oct 3, 2010 at 4:34 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On 10/02/2010 03:07 PM, H.J. Lu wrote:
>> On Wed, Aug 4, 2010 at 6:35 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
>>> On 08/03/2010 07:12 PM, Jeff Law wrote:
>>>> OK.  WRT the comment, we might want to just say that BB_MODIFIED is set
>>>> at the same time as a block is marked dirty, but is not cleared during a
>>>> df_analyze allowing a pass to update the DF information and still know
>>>> what blocks were modified.
>>>
>>> New patch below.
>>>
>>
>> This caused:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45865
>
> This should fix it, refusing to move NOTE_EPILOGUE_BEGIN and anything
> beyond it.
>
> Bootstrapped and tested on i686-linux, ok?
>

It still failed this testcase.

Patch

Index: df-problems.c
===================================================================
--- df-problems.c	(revision 164552)
+++ df-problems.c	(working copy)
@@ -3915,6 +3915,8 @@  can_move_insns_across (rtx from, rtx to,
     {
       if (CALL_P (insn))
 	break;
+      if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_EPILOGUE_BEG)
+	break;
       if (NONDEBUG_INSN_P (insn))
 	{
 	  if (may_trap_p (PATTERN (insn))