This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Teach SCCVN/FRE expression insertion, optimize type-punning through unions (final!)
- From: Richard Guenther <rguenther at suse dot de>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Daniel Berlin <dberlin at dberlin dot org>
- Date: Fri, 14 Mar 2008 13:20:31 +0100 (CET)
- Subject: Re: [PATCH] Teach SCCVN/FRE expression insertion, optimize type-punning through unions (final!)
- References: <Pine.LNX.4.64.0803141153250.4133@zhemvz.fhfr.qr> <47DA698B.80102@gnu.org>
On Fri, 14 Mar 2008, Paolo Bonzini wrote:
> > + *state_in = fs.reg;
> > + *state_in = fs.offset;
>
> Better to write to two different variables, maybe?
>
> > + union loc fs;
> > + for (;;)
> > + {
> > + *state_in = fs.offset;
> > + *state_in = fs.reg;
>
> Likewise, and also make them volatile?
>
> > + case 0:
> > + *state_in = fs.reg;
> > + case 1:
> > + *state_in = fs.offset;
>
> Write to two variables here too?
Both stores need to be connected via VOPs - all the above testcases
are for situations we would ICE if the dominance / avail checks were
not done (and we would be happen to visit the loads in the wrong order).
Richard.