New tree reassociation pass
- The current tree-level reassocation pass in GCC has a number of issues, and doesn't do a particularly good job of reassociation. It is a simple single-statement reassociation pass that has no concept of inter-statement reordering or reassociation. The new reassociation pass does a significantly better job of reassociation, and does inter-statement reassociation. It also performs simplifiation of binary operators according to identity rules that no current tree pass performs.
- Daniel Berlin
- This optimization has been ready since August, 2005, and was posted on the mailing list.
- Better reassociation promotes better code motion, and in fact, simply applying the patch causes even simple loop invariant code motion and PRE testcases in the testsuite to perform better.
- The change replaces tree-ssa-reassoc.c with a new file, and updates the tree-ssa testsuite for the new results.