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]

Dropping of old loop optimizer


Hello,

I would like to know your opinion on this subject. Why I believe old
loop optimizer should be dropped as soon as possible:
1) It destroys CFG, and thus profile feedback/estimation must be run
   after it. It would be cool to have it available at least in gcse,
   and perhaps other earlier passes too.  This could probably be solved
   by just dropping the part that manipulates CFG (the unroller) and
   relatively simple modification of the rest.
2) It requires the loop notes. The need to preserve them limits and
   complicates some pre-loop passes (cfg_cleanups, copy_loop_headers,
   ...) and enables the loop optimizer to work only for a limited class
   of loops. This does not seem to be fixable without radical rewrite
   of the optimizer.

What the loop optimizer consists of:
-- unroller -- already replaced by new one.
-- doloop optimalization -- can be trivially converted to use the new loop
   infrastructure
-- loop invariant motion -- should be unnecessary with gcse; I am
   currently working on improving gcse so that it indeed is
-- prefetching, strength reduction, induction variable elimination --
   this is a problem. They are way too magic for me to be able to
   just modify them somehow; I would basically have to rewrite them from
   scratch (of course some parts could be used, but anyway it would be
   quite a lot of work)

Any ideas?

Zdenek


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