Patent ID: 8239843

Claim:
A method for parallelizing execution of a computer program, comprising: identifying a first code block that contains an assignment of a variable; traversing, by a computer processor, a path backwards through a control flow graph of the computer program, starting with the identified code block, wherein the path comprises a plurality of blocks; identifying, by the computer processor, all blocks along the path until the path reaches a loop header block; indicating all the identified blocks in a first set; for each block in the first set, a) determining blocks in the program that logically succeed the block and are not in the first set, and b) identifying all paths between the block and the determined blocks as failure paths; inserting, by the computer processor, code into the failure paths, wherein the inserted code comprises instructions for causing a computer to identify the corresponding path as failed at run time of the program; and storing the program including the inserted code.