IVOPT performance tuning patch. The main problem is a variant of maximal weight
commit66368bf4bc95af685d7ce30ef5833f4e6079c81b
authordavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jul 2010 19:13:11 +0000 (28 19:13 +0000)
committerdavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jul 2010 19:13:11 +0000 (28 19:13 +0000)
treea565fa6fb23aca1951c811e6fa17593d1d4ca811
parent8637d6a214e5baf0867c1fa7906f7c3f43c15ac8
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162653 138bc75d-0d04-0410-961f-82ee72b054a4
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