Patent ID: 6077314
Filing Date: 2000-06-20
Classification: G06F

Abstract:
A method of optimizing a computer program by performing code motion and code redundancy removal, said method comprising the steps of:identifying an expression as a partially redundant expression using extended global value numbering, before moving the identified partially redundant expression;moving the partially redundant expression to a location in a basic block preceding a definition of a phi-function of the partially redundant expression, said moving of the partially redundant expression being performed:if the partially redundant expression dominates a source operand of the phi-function of the partially redundant expression, said domination meaning that the partially redundant expression comes before the source operand on all paths through the computer program, andif a phi-function below the partially redundant expression has all source operands receiving the same value number;determining if the moved partially redundant expression is still partially redundant in the location; andrepeating the moving step and determining step until the expression is not partially redundant.