This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix wrong code with VCE to bit-field type at -O
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Martin Jambor <mjambor at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Biener <richard dot guenther at gmail dot com>
- Date: Wed, 12 Feb 2014 18:51:36 +0100
- Subject: Re: [patch] Fix wrong code with VCE to bit-field type at -O
- Authentication-results: sourceware.org; auth=none
- References: <1407954 dot 7L4M0YkQRE at polaris> <CAFiYyc2LoKr+iT68vxVP4AqbFVdMt6YQBo_JHydauHtQcHhmhg at mail dot gmail dot com> <20140212171053 dot GD5840 at virgil dot suse>
> I am not sure how to deal with this, given that we have mismatched
> V_C_Es anyway, I'm inclined not to care and let the expander deal with
> it. But at the same I understand that it is ugly and will certainly
> cause somebody more headache in the future. I suppose that not
> scalarizing here might hurt performance and would be frowned upon at
> the very least. If the fields bigger than the record approach is the
> standard way of doing this, perhaps SRA can detect such cases and
> produce these strange COMPONENT_REFs instead, but is it so?
You may remember that we went that way before (building a COMPONENT_REF for
bit-fields instead of fully lowering the access) so doing it again would be a
step backwards. Likewise if we refuses to scalarize. So IMO it's either low-
level fiddling in SRA or in the expander (my preference too).
--
Eric Botcazou