This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR52424
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: "William J. Schmidt" <wschmidt at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, bergner at vnet dot ibm dot com
- Date: Wed, 29 Feb 2012 10:37:45 +0100
- Subject: Re: [PATCH] Fix PR52424
- Authentication-results: mr.google.com; spf=pass (google.com: domain of richard.guenther@gmail.com designates 10.50.219.232 as permitted sender) smtp.mail=richard.guenther@gmail.com; dkim=pass header.i=richard.guenther@gmail.com
- References: <1330485140.4317.11.camel@gnopaine>
On Wed, Feb 29, 2012 at 4:12 AM, William J. Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> This patch fixes PR52424 by pushing a missing marker onto
> const_and_copies_stack before calling dom_thread_across_edge. ?This bug
> has resulted in lost copy propagation opportunities in the presence of
> edge threading.
>
> Bootstrapped and tested with no regressions on powerpc64-linux-gnu. ?I'm
> waiting on Jiangning Liu to verify the patch fixes his performance
> concern. ?Provided it does, is this OK for trunk?
Ok.
> Also, this bug has apparently been there for a long time. ?Should we
> consider backporting the fix to 4.6 and/or 4.5?
It's even present on the 4.1 branch, so I guess it has been there forever.
Not worth backporting IMHO.
Thanks,
Richard.
> Thanks,
> Bill
>
>
> 2012-02-28 ?Bill Schmidt ?<wschmidt@linux.vnet.ibm.com>
>
> ? ? ? ?PR tree-optimization/52424
> ? ? ? ?* tree-ssa-dom.c (dom_opt_leave_block): Push a marker before
> ? ? ? ?calling dom_thread_across_edge.
>
>
> Index: gcc/tree-ssa-dom.c
> ===================================================================
> --- gcc/tree-ssa-dom.c ?(revision 184625)
> +++ gcc/tree-ssa-dom.c ?(working copy)
> @@ -1779,6 +1779,9 @@ dom_opt_leave_block (struct dom_walk_data *walk_da
> ? ? ? && (single_succ_edge (bb)->flags & EDGE_ABNORMAL) == 0
> ? ? ? && potentially_threadable_block (single_succ (bb)))
> ? ? {
> + ? ? ?/* Push a marker on the stack, which thread_across_edge expects
> + ? ? ? ?and will remove. ?*/
> + ? ? ?VEC_safe_push (tree, heap, const_and_copies_stack, NULL_TREE);
> ? ? ? dom_thread_across_edge (walk_data, single_succ_edge (bb));
> ? ? }
> ? else if ((last = last_stmt (bb))
>
>