This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] for PR 18040
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dberlin at dberlin dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 17 Oct 04 16:54:27 EDT
- Subject: Re: [patch] for PR 18040
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.
Not "more or less anywhere", it's precisely just inside a chain of references.
Since the expander treats this as a single reference, I don't see why the
optimizers care about what's inside that except in special situations.
It *really* pessimizes the code to not allow them, plus, as I've said, it
means we can't convert all valid GENERIC to GIMPLE.
1. Don't allow casts except at the top level. Deal with consequences.
I'd argue exactly the other way around: having a cast at the top level
of a nest of references isn't necessary, so we can require that it be
in it's own statement. But inside is where it's useful.
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
type specifier
I don't follow. Since every tree node has a type, we always have it.
It seems that all you need is an access function that strips off the
conversion and you have the same form.