This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR22555, salias disabled by arrays
On 8/12/05, Daniel Berlin <dberlin@dberlin.org> wrote:
> On Thu, 2005-08-11 at 15:35 +0200, Richard Guenther wrote:
> > This fixes the enhancement PR that we disable struct aliasing
> > for structs containing an array member. Several places in
> > the compiler had to be fixed to deal with this.
> >
> > Bootstrapped and regtested on x86_64-unknown-linux-gnu
>
> You really want to wait for 4.2 for this. It has the potential to
> really screw with compile time/etc at this late stage. (Sad, but true)
Yes, I didn't do any timing analysis btw. I posted the patch for
reference and for the fixes of the (latent) bugs.
> Also,
>
> > *************** get_expr_operands (tree stmt, tree *expr
> > *** 1328,1342 ****
> > if (overlap_subvar (offset, size, sv, &exact))
> > {
> > int subvar_flags = flags;
> > if (!exact)
> > subvar_flags &= ~opf_kill_def;
> > add_stmt_operand (&sv->var, s_ann, subvar_flags);
> > }
> > }
> > }
> > ! else
> > ! get_expr_operands (stmt, &TREE_OPERAND (expr, 0),
> > ! flags & ~opf_kill_def);
> >
> > if (code == COMPONENT_REF)
> > {
> > --- 1329,1345 ----
> > if (overlap_subvar (offset, size, sv, &exact))
> > {
> > int subvar_flags = flags;
> > + none = false;
> > if (!exact)
> > subvar_flags &= ~opf_kill_def;
> > add_stmt_operand (&sv->var, s_ann, subvar_flags);
> > }
> > }
> > + if (!none)
> > + flags |= opf_no_vops;
> > }
> > ! get_expr_operands (stmt, &TREE_OPERAND (expr, 0),
> > ! flags & ~opf_kill_def);
> >
> > if (code == COMPONENT_REF)
> > {
> >
>
>
> You didn't add any comments, so i can't quite wrap my head around what
> this part is for.
> I imagine we were now missing some real use or def for array_ref's
> somewhere in component_refs, but if that is true, why would it have no
> vops?
See PR23297, it's with a.x[d] where we miss the immuse of d otherwise.
Richard.