This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC/RFA: patch for PR 22156: improve SRA for bit-fields
On May 8, 2007, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> > In the testcase, the structure contains exactly 2 fields, which are both
>> > words. How does this relate to what you're saying?
>>
>> Two SImode fields that are laid out in such a way that they can be
>> accessed with a single DImode access. The first patch used to
>> consider it profitable to create a single variable for them.
> That would have been fine if it didn't immediately need to split it up!
> SR.8_6 = BIT_FIELD_REF <VIEW_CONVERT_EXPR<struct
gnat__strings__string_access> (D.746), 64, 0>;
> lib_opts$P_BOUNDS_7 = BIT_FIELD_REF <SR.8_6, 32, 32>;
> lib_opts$P_ARRAY_8 = BIT_FIELD_REF <SR.8_6, 32, 0>;
> What's the point in turning 2 COMPONENT_REFs into 3 BIT_FIELD_REFs? Can't we
> take that into account to prevent the transformation?
You mean this is still happening with the latest patch? It shouldn't.
You shouldn't get bit-field refs wider than word size, unless a field
straddles across words.
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}