This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dropping of old loop optimizer
- From: <tm_gccmail at mail dot kloo dot net>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc at gcc dot gnu dot org, 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: Wed, 26 Feb 2003 17:36:32 -0800 (PST)
- Subject: Re: Dropping of old loop optimizer
On Thu, 27 Feb 2003, Zdenek Dvorak wrote:
> 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)
The "old" loop optimizer does BIV-to-GIV flattening which is important on
processors without double-register addressing modes such as the SH,
MIPS16, Thumb, and a few others.
Does the new loop optimizer support this feature?
> Any ideas?
>
> Zdenek
Toshi