Validity and Preserving Registers
Original Publication Date: 1985-Nov-01
Included in the Prior Art Database: 2005-Feb-19
A method is disclosed for optimizing the length of intermediate text produced by an executing multiple-pass compiler converting source to object code. The method briefly comprises the following steps: (a) in a first pass assigning symbolic registers to each canonical expression (opcode and operands) of qualifying source code instructions, (b) assuring that each symbolic register holds the most current value of the canonical expression, and (c) replacing a computation with a register- to-register load at selected points in load, store, and add sequences. More specifically, an intermediate language, as produced by the front end, uses two types of variables: memory operands, which correspond to the original variables declared by the user in his source program, and compiler temporaries, referred to as symbolic registers.