This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Dropping of old loop optimizer
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc at gcc dot gnu dot org
- Cc: m dot hayes at elec dot canterbury dot ac dot nz, rth at redhat dot com, law at redhat dot com,dan at dberlin dot org, jh at suse dot cz
- Date: Thu, 27 Feb 2003 01:23:49 +0100
- Subject: 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