This is the mail archive of the 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: Help w/ CFG/loop optimization problem?

On Tuesday, September 10, 2002, at 04:21 PM, Roger Sayle wrote:

The core issue is that GCC's loop optimization pass is currently based
upon notes placed in the RTL stream by the front-ends. Hence, the loop
optimizations are only applied to lexical loops in the source code.
Jan, Dan and the other folks working on the CFG-branch are working on
replacing loop.c with a CFG-based loop optimizer, that does its own loop
discovery (probably based upon DJ-trees), so should be able to optimize
loops other than the usual C idioms, and perhaps even irreducible loops.
However this isn't scheduled before 3.5 at the earliest.

An appropriate fix to both my problems and your example might be to
teach cfg_optimize to move loop notes around when it forwards edges,
but (i) this is tricky
Yep, found that out.

and (ii) it won't be necessary once loop.c
is CFG-based.
Thanks for the explanation.  OK, it looks like you're right, modifying
the FEs is the way to go for now.

"Death to loop notes!"

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