Browse Prior Art Database

A whole program register promotion method for global variables

IP.com Disclosure Number: IPCOM000012694D
Original Publication Date: 2003-May-21
Included in the Prior Art Database: 2003-May-21
Document File: 1 page(s) / 7K

Publishing Venue

IBM

Abstract

This is a method to allocate registers to global variables through the entire program.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

A whole program register promotion method for global variables

This method allocates registers to global variables through the entire program. This requires interference graphs of local and global variables for all functions. It first simplify each graph using Briggs' coloring heuristic. It removes a node from the interferenfe graph and push it onto the stack.While removing and pushing nodes, it deffers processing global variable nodes as late as possible. By doing so, register-assignable global variables are pushed at the top of the stack. Next this method collects such stack-top global variables for each function and build another interference graph of such collected variables. Coloring this graph then determines which color goes which global variable. Next coloring for local variables in each method is attempted function by function. While popping a node and assigning a color to it, if the popped node is a stack-top global variable, the pre-determined color is used, otherwise a color is chosen by the original Briggs' heuristic and used for assignment.

Disclosed by International Business Machines Corporation

1