This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: ssa subvariables for complex types
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: pinskia at physics dot uc dot edu (Andrew Pinski)
- Cc: aldyh at redhat dot com (Aldy Hernandez), dnovillo at redhat dot com, law at redhat dot com, gcc at gcc dot gnu dot org
- Date: Mon, 17 Apr 2006 16:55:36 -0400 (EDT)
- Subject: Re: RFC: ssa subvariables for complex types
>
> >
> > Hi folks.
> >
> > While investigating a regression from the V_MUST_DEF removal on mem-ssa,
> > I've noticed that we were missing out on optimization of certain
> > stores to complex types (on mainline).
> >
> > For example, here:
> >
> > _Complex int t = 0;
> > __real__ t = 2;
> > __imag__ t = 2;
> >
> > we end up with:
> >
> > # t_2 = V_MUST_DEF <t_1>;
> > t = __complex__ (0, 0);
> > # t_3 = V_MAY_DEF <t_2>;
> > REALPART_EXPR <t> = 2;
> > # t_4 = V_MAY_DEF <t_3>;
> > IMAGPART_EXPR <t> = 2;
> >
> > When we really should be decomposing the field stores into SFTs, like this:
> >
> > # SFT.0_3 = V_MUST_DEF <SFT.0_1>;
> > # SFT.1_4 = V_MUST_DEF <SFT.1_2>;
> > t = __complex__ (0, 0);
> > # SFT.1_5 = V_MUST_DEF <SFT.1_4>;
> > REALPART_EXPR <t> = 2;
> > # SFT.0_6 = V_MUST_DEF <SFT.0_3>;
> > IMAGPART_EXPR <t> = 2;
>
> Relooking at the orginal testcase which actually has a read in it, This
> seems like the wrong approach. Can you figure out why write_only is not
> being set to false for the orginal testcase (and not the reduced one)?
I should also mention on the mainline, we get the decomposing for the
orginal testcase which means this is a bug only on the MEM-SSA branch.
-- Pinski