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: CSE optimization question


  > I have been investigating some optimization issues with GCC and ran into
  > an issue with PATHLENGTH in cse.c.  On one particular program I was
  > testing I found that a small source change could have a big impact by
  > making a particular path through my program greater or smaller then
  > PATHLENGTH, thus either doing or not doing some CSE optimizations.
Right.

  > It looks like there is no method for overriding or changing this value
  > other then editing cse.c and it seems like it might be useful to do so,
  > at least in order to try different values in order to see what effect it
  > has.  So I was thinking of making this a settable parameter using
  > params.def to give it a name (max-cse-path) and default value (10).
  > Does this seem reasonable?
Short-term, probably.  Assuming you properly document it and the default
setting stays the same.

Long term all the CSE path following cap should be zapped.  It's horrible
code with dreadful compile-time performance characteristics.  We can get
the same optimizations (in fact more optimizations) by doing value
numbering on expressions as we convert into SSA -- the cost for doing this
during the translation into SSA is unmeasurable.

The problem (of course) is that we need the generic RTL stuff in place
before we can really make the commitment to SSA based RTL optimizers.


jeff


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