This is the mail archive of the gcc@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: Really, really const


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12419

Janis Johnson analyzed this performance regression and found this:


2003-04-07  Glen Nakamura  <glen@imodulo.com>

          PR opt/8634
          * explow.c (maybe_set_unchanging): Don't flag non-static const
          aggregate type initializers with RTX_UNCHANGING_P.

which includes the following new comment text:

       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 favour of a more reliable
       solution, perhaps based on alias sets.


IMO this is a bad performance regression.  I particularly dislike it
because it pessimizes Java method dispatch, but no doubt it pessimizes
lots of other things as well.  IMO this really ought to be fixed for
3.4.  Perhaps there is some way to fix 8634 that doesn't cause such a
performance regression.

Andrew.


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