This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC/RFA: patch for PR 22156: improve SRA for bit-fields


> > 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?

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]