Patent ID: 7757222

Claim:
A method comprising: performing affine partitioning on a code having statements, the affine partitioning to generate affine partitioning mapping for the statements by reorganizing computations in each processor of a multi-processor computer system; generating a parallel code based on the affine partitioning mappings, wherein generating the parallel code includes: coalescing loops in the parallel code generated from the affine partitioning mappings to generate coalesced parallel code; and optimizing the coalesced parallel code by removing a degenerative loop from the coalesced parallel code, the removing of the degenerative loop at a first loop level of a statement from the statements, wherein the statement is degenerate with respect to the first loop level, the removing comprising: solving an expression serving as a guard on the statement for the first loop level; replacing the degenerative loop with the solution for the expression; and adding the guard to a solution for the expression; and executing the optimized coalesced parallel code concurrently on each processor of the multi-processor computer system.