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: [patch] Disable old loop optimizer


Zdenek Dvorak wrote:


as far as I know, there are the following optimizations or optimization enhancements that are only handled by the old loop optimizer:

1) array prefetching: We now have speculative prefetching, which
   partially replaces the functionality, but it is a bit cumbersome
   to use (needs profile feedback).  Also, there are several possible
   replacement patches:

I would certainly think that this could -- and should --be done at the tree level.


2) loop reversal (i.e. replacing "for (i = 0; i < n; i++) a[i]=i;" with
   "for (i = n - 1; i >= 0; i--) a[i]=i;", thus causing us to compare with
   zero instead of arbitrary bound, and possibly shorten the life range
   of n).  Should be trivial within linear-transform framework, the major
   problem is to decide when it is really useful.

Likewise.


3) ivopts do not handle induction variables with nonconstant step,
whereas the old loop optimizer does (PR 18316, patch
http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00142.html needs
updating).

Likewise.


So, that's good -- the things that are missing seem like things that we can add at the tree level.

My immediate reaction, however, is that we should add them first, before removing or disabling the RTL optimizer. Otherwise, the risk is that we don't get the tree-level work done before GCC 4.1 gets close, and then we have performance regressions. Meanwhile, the RTL code has not been receiving testing.

My reason for proposing disabling of the old loop optimizer is that I
would like to get some testing in this situation.

Then I'd suggest we add an option to enable the new code in lieu of the new, and ask people to test with that option turned on.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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