Patent ID: 7493609
Filing Date: 2009-02-17
Classification: G06F

Abstract:
1. A method in a data processing system for second-order predictive commoning, the method comprising: collecting at least one induction variable reference from a software program, wherein the software program includes at least one loop, wherein the collecting comprises: determining at least one distance between a plurality of sub-expressions within the at least one loop, wherein the at least one distance is a number of iterations in the at least one loop; detecting at least one sequence from a plurality of sequences with a maximal coverage using the at least one distance, wherein the detecting comprises: maximizing at least one sub-expression from the plurality of sub-expressions in the at least one sequence using the at least one induction variable reference, wherein the maximizing comprises: eliminating a redundant sequence from the plurality of sequences to form a set of maximized sequences, wherein the eliminating comprises: determining whether to perform unrolling on the set of maximized sequence based on register pressure estimates for the at least one loop; adding at least one temporary variable to the software program, wherein the at least one temporary variable represents at least one element of a plurality of elements in the at least one sequence; inserting at least one initialization for the at least one temporary variable to the software program; inserting at least one feeder statement to the software program, wherein the feeder statement stores a result of at least one sub-expression to the at least one temporary variable; replacing the at least one sub-expression with a reference to the at least one temporary variable, wherein the replacing comprises: responsive to determining that unrolling is to be performed, rotating the reference to the at least one temporary variable to create an unrolled iteration; and responsive to determining that no unrolling is to be performed, rotating a value of the at least one temporary variable.