This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make jump thread path carry more information


On Thu, Sep 26, 2013 at 04:26:35AM +0100, Jeff Law wrote:
> Bootstrapped and regression tested on x86_64-unknown-linux-gnu. 
> Installed on trunk.

Hi Jeff,

This patch caused a regression on Arm and AArch64 in:

PASS->FAIL: gcc.c-torture/execute/memcpy-2.c execution,  -O3 -fomit-frame-pointer

>From what I can see, the only place the behaviour of the threader has
changed is in this hunk:

On Thu, Sep 26, 2013 at 04:26:35AM +0100, Jeff Law wrote:
> diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
> index fd5234c..75273ca 100644
> --- a/gcc/tree-ssa-threadupdate.c
> +++ b/gcc/tree-ssa-threadupdate.c
> +     With upcoming improvements, we're going to be holding onto the entire
> +     path, so we'll be able to clean this wart up shortly.  */
> +  if (path[1]->type == EDGE_COPY_SRC_JOINER_BLOCK)
> +    {
> +      threaded_edges.safe_push (path[1]->e);
> +      threaded_edges.safe_push (path.last ()->e);
> +    }
> +  else
> +    {
> +      threaded_edges.safe_push (path.last ()->e);
> +      threaded_edges.safe_push (NULL);
> +    }

Where, to match the old behaviour, the else condition should read:

@@ -1463,7 +1463,7 @@ register_jump_thread (vec<jump_thread_edge *> path)
     }
   else
     {
-      threaded_edges.safe_push (path.last ()->e);
+      threaded_edges.safe_push (path[1]->e);
       threaded_edges.safe_push (NULL);
     }
 }

But I've almost certainly missed something here. I've attached the logs
for dom1 if that helps. It seems we start erroneously destroying blocks
we shouldn't be touching.

Thanks,
James

Attachment: memcpy-2-good.c.078t.dom1
Description: Text document

Attachment: memcpy-2-bad.c.078t.dom1
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]