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: 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



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