This is the mail archive of the
mailing list for the GCC project.
Re: g++ 4.3, troubles with C++ indexing idioms
On 7/25/07, Paolo Bonzini <email@example.com> wrote:
> For performance small arrays should be the same as individual members
> (I can see the annoying fact that initialization is a headache - this has
> annoyed me as well). For larger arrays (>4 members), aliasing will
> make a difference possibly, making the array variant slower. Any union
> variant is expected to be slower for aliasing reasons (we do not do
> field-sensitive aliasing for unions).
I wonder if the fabled "union as VIEW_CONVERT_EXPR" patch would help...
Richi, do you know?
I don't think so. As long as our memory optimizers are weak and only work
well if they are faced with single SFT.xx VUSEs and VDEFs then using a union
will be hit by create_variable_info_for not creating field variables
for unions at all
(and thus memory optimizers not be able to tell apart fields).