This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR39207, bogus strict-aliasing warning, PR39074, wrong PTA
On Wed, 18 Feb 2009, Daniel Berlin wrote:
> On Wed, Feb 18, 2009 at 8:47 AM, Richard Guenther <rguenther@suse.de> wrote:
> >
> > This "backports" the fix for PR39074 from alias-improvements branch to
> > trunk, thereby fixing PR39207, bogus strict-aliasing warnings from
> > libstdc++ headers. On the branch I needed the second patch appended
> > below to avoid performance regressions, so I will backport this as well.
> >
> > Bootstrapped and tested on x86_64-unknown-linux-gnu. I have put the
> > patches on x86_64 and ia64 SPEC2000 testing (I hope we're not going
> > the 4.3 way of very late performance regressions due to bug fixes...).
> >
> > I plan to apply this tomorrow after testresults have arrived.
> >
> > Richard.
> >
> > 2009-02-18 Richard Guenther <rguenther@suse.de>
> >
> > PR tree-optimization/39207
> > PR tree-optimization/39074
> > * tree-ssa-structalias.c (storedanything_id, var_storedanything,
> > storedanything_tree): New.
> > (do_ds_constraint): Simplify ANYTHING shortcutting. Update
> > the STOREDANYTHING solution if the lhs solution contains
> > ANYTHING.
> > (build_pred_graph): Add edges from STOREDANYTHING to all
> > non-direct nodes.
> You mean build_succ_graph.
Thanks, fixed.
> Also, you have the comment and the description wrong.
> It's really adding edges *to* STOREDANYTHING *from* all non-direct nodes.
Sure? We want to propagate from STOREDANYTHING to all non-direct nodes,
so with
/* Add a graph edge to GRAPH, going from FROM to TO if
it doesn't exist in the graph already.
Return false if the edge already existed, true otherwise. */
static bool
add_graph_edge (constraint_graph_t graph, unsigned int to,
unsigned int from)
(note the ordering of the to/from arguments) and
> + /* Add edges from STOREDANYTHING to all non-direct nodes. */
> + t = find (storedanything_id);
> + for (i = integer_id + 1; i < FIRST_REF_NODE; ++i)
> + {
> + if (!TEST_BIT (graph->direct_nodes, i))
> + add_graph_edge (graph, find (i), t);
the comment looks correct.
Am I missing something?
Thanks,
Richard.