Patent ID: 7694288

Claim:
A computer-implemented method of processing a sequence of operands to produce compiled code for execution by a target data processor, the method comprising the execution by a processor of steps of: (i) automatically analyzing a source code to produce a first representation of that code in single static assignment form; (ii) transforming the first representation into a second representation by unlooping Phi nodes within the single static assignment form such that each Phi node is duplicated to produce a new leaf Phi node corresponding to an internal Phi node so as to create code suitable for tree pattern matching to be performed thereon; (iii) performing tree pattern matching on the second representation of the code; (iv) re-looping the Phi nodes; (v) performing a reduction phase of directed acyclic graph pattern matching; and (vi) performing a further traversal of the second representation, wherein actions at the Phi nodes are split into a first part which computes the results of an action and which does not depend on actions at an operand and a second part which is dependent on the operands and is called after the actions at the operand have been called.