Patent ID: 8296748

Claim:
A method to provide effective control and data flow information in an Intermediate Representation (IR) form comprising: converting received source code into the IR form, wherein the IR form is a Static Single Assignment (SSA) IR form in which a versioned variable originally defined by a phi function is defined by a gamma function of the versioned variable from an entry node of a Control Flow Graph (CFG) of the IR form or by a mu function of the versioned variable, and the gamma function of the versioned variable keeps control path information for the versioned variable; generating, by a computing device, a list of nodes of a the CFG in topological order; selecting, by the computing device, a first node in the list of nodes as a current node; determining, by the computing device, that the current node has a plurality of predecessor nodes; merging, by the computing device in accordance with a set of merging rules, a gamma function of each of the plurality of predecessor nodes to obtain a merged gamma function responsive to the determination, wherein the gamma functions of the plurality of predecessor nodes keep control path information for versioned variables at the plurality of predecessor nodes and the merged gamma function omits one or more pieces of control path information kept by the gamma functions of the plurality of predecessor nodes that are defined as redundant or unnecessary by the merging rules; and propagating, by the computing device, the merged gamma function to all successor nodes of the current node.