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: GCC Status Report (2004-03-09)


> Can't we at least detect the case where either the whole aggregate
> is const or all its fields are const?  Then we don't need any blockage.

Guess what?  The constness is not propagated to the RTL in the former case, 
because of the pessimization recently introduced in maybe_set_unchanging:

     We cannot do this for non-static aggregates, because of the double
     writes that can be generated by store_constructor, depending on the
     contents of the initializer.  Yes, this does eliminate a good fraction
     of the number of uses of RTX_UNCHANGING_P for a language like Ada.
     It also eliminates a good quantity of bugs.  Let this be incentive to
     eliminate RTX_UNCHANGING_P entirely in favor of a more reliable
     solution, perhaps based on alias sets.  */

This means that const automatic aggregates would take a double pessimization 
with the blockage scheme.

-- 
Eric Botcazou


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