×

Method of constructing a constant-folding mechanism in a multilanguage optimizing compiler

  • US 5,836,014 A
  • Filed: 05/16/1994
  • Issued: 11/10/1998
  • Est. Priority Date: 02/27/1991
  • Status: Expired due to Term
First Claim
Patent Images

1. A method executed in a computer system for producing an object module comprising a constant-folding routine, said method comprising the steps of:

  • generating a flow graph that represents a constant-folding routine in an intermediate language using a compiler front end and an intermediate language input, said intermediate language being a universal language used by a plurality of compiler front ends to represent source code and including operators and data types used to describe said source code, each compiler front end corresponding to a different programming language, said intermediate language input describing said intermediate language and comprising said operators and said data types of said intermediate language, said constant-folding routine included in a code optimizer to evaluate a constant expression and to replace said constant expression with an equivalent expression yielding a same result as said constant expression, said constant expression being comprised of at least one of said operators or said data types; and

    producing an object module that contains machine instructions of said constant-folding routine using said flow graph as an input to a code generator, said code generator being a common code generator used by each of said plurality of front ends to generate an object module using a flow graph.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×