Each variable in a program fragment has a range of times during which its value must be
Fantastic news! We've Found the answer you've been seeking!
Question:
Each variable in a program fragment has a range of times during which its value must be stored in register, particularly after it is initialized and before its final use. Any two variables whose life spans intersect cannot be placed in the same register. In the below graph, each vertex corresponds to a variable, with an edge between any two vertices whose variable life spans intersect.
Develop an algorithm and identify all the variables that can be assigned to the same register and the minimum number of registers required.
Related Book For
Data Analysis and Decision Making
ISBN: 978-0538476126
4th edition
Authors: Christian Albright, Wayne Winston, Christopher Zappe
Posted Date: