×

Method and apparatus for compiling computer programs with interproceduural register allocation

  • US 5,428,793 A
  • Filed: 11/13/1989
  • Issued: 06/27/1995
  • Est. Priority Date: 11/13/1989
  • Status: Expired due to Term
First Claim
Patent Images

1. A method of operating a general purpose data processor having a plurality of machine registers, a sub-set thereof being assigned for use as interprocedural registers, so as to allow more efficient allocation of said interprocedural registers when said data processor is executing a computer program comprising a plurality of procedures, at least one of said procedures operating on a global variable, said method comprising the steps of:

  • building a program call graph, said program call graph comprising a set of nodes, each said node representing a procedure, interconnected by directional edges to other said nodes, each said edge representing a call from a first procedure to a second procedure, the node representing said first procedure being the ancestor of the node representing said second procedure and the node representing said second node being the descendent of the node representing said first procedure;

    defining webs corresponding to global variables, each said web corresponding to a global variable, each said web comprising a collection of program call graph nodes such that said corresponding global variable is accessed in at least one node in said web and such that, for each node in said web, said corresponding global variable is not accessed in any ancestor node not in said web, and said global variable is not accessed by any descendant node not in said web;

    determining an order for said webs; and

    assigning said global variables to interprocedural machine registers according to the order of said webs corresponding to said global variables in said determined order.

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