Remove old loop optimizer
- GCC currently contains remains of the original RTL-based loop optimizer. Most of its functionality has already been replaced, and the old loop optimizer does not improve code (except for very special examples). It was also disabled completely on some development branches, without causing significant regressions. This project aims for replacing the remaining functionality and removal of the old loop optimizer. This will enable significant cleanups of the backend, especially removal of loop notes. Also, the old loop optimizer is the only remaining pass that clobbers CFG, thus its removal will make preserving the information attached to CFG simpler.
Personnel
- Zdenek Dvorak
Delivery Date
- All new optimizations are already implemented in killloop-branch. The changes need to be tested and benchmarked more thoroughly. This should be done by 2005-11-15.
Benefits
- Significant cleanups to the RTL backend. Last pass that clobbers CFG will disappear.
Dependencies
- None.
Modifications Required
- The optimizations that need to be replaced are loop reversal and array prefetching. Additionally, improvements to other optimizations are necessary: loop invariant motion on RTL needs to detect invariants with the same value and move them only once. Also, induction variable optimizations need to do better job sometimes, especially when dealing with exit conditions of loops.
Status (26-02-2005)
- Basically, replacements for all the things the old RTL loop optimizer used to do are now in place in the new RTL loop optimizer or in the tree-SSA optimizers. Benchmark results have been posted for a number of targets:
http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01789.html
- The old RTL loop optimizer has been disabled completely. Next up are about a dozen smaller and larger patches to remove [gccsource:loop.c] and to remove a lot of code that only exists because of it.