This is the mail archive of the
mailing list for the GCC project.
Re: [patch] for PR 18040
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 17 Oct 2004 16:43:19 -0400
- Subject: Re: [patch] for PR 18040
- References: <10410172029.AA01248@vlsi1.ultra.nyu.edu>
On Sun, 2004-10-17 at 16:29 -0400, Richard Kenner wrote:
> It is the job of the optimizers to produce good code, not the job of
> the front end. If the optimizers can't produce good code from this,
> then fix the optimizers.
> Yeah, but there's no point in making things arbitrarily hard for them.
> GIGO still applies.
Except that this is exactly what you are doing by making it so
conversions can appear more or less anywhere in an expression, instead
of just a single place.
I see two sane options here.
1. Don't allow casts except at the top level. Deal with consequences.
2. Make them mandatory inside component_refs, so that you *always* have
them there. This is what LLVM does with getelementptr. Each piece has a