On Thu, 2005-03-24 at 15:52, Steven Bosscher wrote: > I'd suggest trying -fmove-loop-invariants, and report a bug about > that instead if it does not move those loop invariants. We really > should move away from loop.c anyway.
In general, yes, but we will probably always need some RTL loop optimizations. Lowering gimple to RTL may expose target dependent loop invariants that were not present in the gimple. Hence, we still need the RTL loop pass to work. There is also the issue of the special looping branches, which is a low level target dependent issue that is probably better handled in RTL than gimple. The -fmove-loop-invariants option can't fix this problem, and this results in a few percentage points of performance loss for this testcase. We need the RTL loop pass for this. There is also the more pragmatic problem that we are suffering user visible performance losses right now, and we shouldn't force users to wait for future tree-ssa enhancements to fix them when an apparently relatively simple RTL optimizer change can fix them. -- Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com