Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Virtual Operands

IP.com Disclosure Number: IPCOM000088774D
Original Publication Date: 1977-Jul-01
Included in the Prior Art Database: 2005-Mar-04
Document File: 2 page(s) / 13K

Publishing Venue

IBM

Related People

Kim, J: AUTHOR [+5]

Abstract

In compilers that involve intermediate texts with expansions between text levels, suitable code patterns have to be selected and variables have to be bound to target machine registers at some stage. Some of the code patterns may require additional working registers other than those to be bound to explicit operands. A technique is disclosed for optimizing he use of target machine registers for compilers having such invisible register requirements.

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

Page 1 of 2

Virtual Operands

In compilers that involve intermediate texts with expansions between text levels, suitable code patterns have to be selected and variables have to be bound to target machine registers at some stage. Some of the code patterns may require additional working registers other than those to be bound to explicit operands. A technique is disclosed for optimizing he use of target machine registers for compilers having such invisible register requirements.

At some stage of a compilation process, a text that consists of generic operators and operands is generated. The operands are either the sources for the operation or the target of the operation. Each operator is replaced by a code pattern, selected from a predetermined set of code patterns, and operand variables are bound to registers. Unfortunately, some of the code patterns require registers in addition to those that will be assigned to operands. "Long Branch" and software multiply are good examples. In many small machines with 16-bit address and 8-bit ALU, a Long Branch may need a register to develop the branch address, but the text unit does not contain a corresponding operand because the address value (content of the register) is developed locally and never referenced again outside of the branch instruction itself. The problem becomes more acute in compilers with a register allocation/ assignment strategy.

To avoid the wastefulness in the conventional method of reserving registers throughout the whole program, the concept of virtual operands is proposed. Virtual operands are attached to each code pattern and, unlike real operands, describe the additional register requirements that are characteristic of that code pattern. Virtual operands are used locally within the given code pattern, but are referenced nowhere else in the program.

Consider an architectu...