Induction variable optimizations cleanups
- Induction variable optimizations (strength reduction, induction variable elimination, induction variable merging, etc.) in GCC are currently implemented by a single pass that is able to take into account the interactions between all the transformations. This is achieved by incorporating all of them to a unified framework, providing a cost function that is able to estimate cost of a given selection of optimizations, and then finding the best choice of optimizations in order to minimize this cost. This approach is superior to considering each of the optimizations separately, but this advantage only shows on very special testcases. It also turns out to be quite slow (the need to estimate the cost makes its time complexity at least quadratic in the size of the optimized loop) and sensitive to the precision of the cost function. This project aims for replacing it by series of simpler heuristics, more closely resembling the traditional approaches that consider each of the optimizations separately.
- Zdenek Dvorak
- The changes will be ready by 2005-12-01.
- Compile time and memory savings. Simplification of the induction variable optimizations code.
- The decision phase of the ivopts pass needs to be replaced by series of simpler heuristics. Also, the scope of the optimizations ivopts perform will be reduced. This in turn will enable simplification of some of the iv optimizations infrastructure provided, in particular the cost estimation framework that queries the target descriptions will be much reduced.