×

Optimizing compiler using templates corresponding to portions of an intermediate language graph to determine an order of evaluation and to allocate lifetimes to temporary names for variables

  • US 5,613,117 A
  • Filed: 04/20/1994
  • Issued: 03/18/1997
  • Est. Priority Date: 02/27/1991
  • Status: Expired due to Term
First Claim
Patent Images

1. A method of performing code generation executed in a computer system comprising the steps of:

  • matching a portion of an intermediate language graph with a code template, said portion of said intermediate language graph comprising a plurality of tuples and being a representation of a first source program in an intermediate language, each tuple representing a single operation to be performed in said first source program, said code template including a predetermined intermediate language pattern which corresponds to said portion of said intermediate language graph to guide in generating a part of a first object module that corresponds to said first source program;

    analyzing said portion of said intermediate language graph to determine an order of evaluation of an expression in said portion of said intermediate language graph using actions which are included in said code template and which indicate said order of evaluation;

    allocating, using said actions in accordance with said order of evaluation, a temporary name for a variable and assigning an allocation lifetime to said temporary name, said allocation lifetime indicating the extent to which the temporary name and the storage of the temporary name are associated with said variable in said intermediate language graph;

    updating at least one of said plurality of tuples in said portion of said intermediate language graph as needed to perform said analyzing and said allocating steps as indicated by said actions; and

    generating machine language instructions that are included in said part of said object module by using said actions and said intermediate language graph having at least one updated tuple.

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