https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81601

--- Comment #16 from Jeffrey A. Law <law at redhat dot com> ---
Well, my understanding of how other compilers have handled bitfields would
indicate that deferring optimization of them until later is advisable.

Essentially they pretended bitfields had word precision though most of the
early optimization passes, then lowered things to their actual size later.

I'm not entirely sure how to interpret Richi's c#7.  He could be saying that
optimize_bit_field is premature optimization and if so, deferring it until a
suitable point in gimple would be a good thing.

Or he could be saying that he doesn't think that's the real issue, just a red
herring.  Though your experiments tend to indicate that it is a real issue
here.

ISTM that either we defer bitfield optimization (which may have fallout) or we
try to teach FRE to recognize that the COMPONENT_REF and the BIT_FIELD_REF are
the same.

I'd say experiment with the former and see how bad the fallout looks.

I wonder if this BZ argues that we ought to have a canonical form when a
COMPONENT_REF and BIT_FIELD_REF express the same thing -- and if so, which
ought to be the canonical form?

Reply via email to