IVOPT performance tuning patch.
authorXinliang David Li <davidxl@google.com>
Wed, 28 Jul 2010 19:13:11 +0000 (19:13 +0000)
committerXinliang David Li <davidxl@gcc.gnu.org>
Wed, 28 Jul 2010 19:13:11 +0000 (19:13 +0000)
commit18081149255f8a116512c3e28bf3469ed66d496e
treea565fa6fb23aca1951c811e6fa17593d1d4ca811
parent3c5273a96ba8dbf98c40bc6d9d0a1587b4cfedb2
IVOPT performance tuning patch.

IVOPT performance tuning patch. The main problem is a variant of maximal weight
bipartite matching/assignment problem -- i.e., there is an additional global
cost function. The complexity of the algorighm to find the optimial solution
> O(n^2). The existing algorithm in gcc tries to find the solution in 3 stages:
1) Find the initial solution set (dynamic programing style)
2) Extend the solution set
3) Prune the soultion set.

The problem is that in step 1, the initial set tends to be too large so that
the final solution is very likely local optimal.

This patch addresses the problem and sees very large SPEC improvements.

Another area of problem is that ivopts often creates loop invariant expressions, and
such expressions increase register pressure which is not counted. This is addressed
in this patch.

The third main problem is the profile data is not considered in cost computation

The forth problem is that loop invariant comptuation's cost is not properly adjusted.

There are more tuning opportuties, namely:

1) Do not check ivs dependency during ivs set pruning (this improves deallII 8% on core2)
2) Unconditionally consider all important candidates in partial set expansion (in addition
to the extended solutino based on selected candidates)
3) revisit the two stage initial set computation.

From-SVN: r162653
13 files changed:
gcc/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ivopts-3.c
gcc/tree-ssa-loop-ivopts.c