GCC Status Report (2004-03-09)

Eric Botcazou ebotcazou@libertysurf.fr
Fri Mar 19 14:31:00 GMT 2004


> 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



More information about the Gcc mailing list