Basically, when we process an assignment to a non-local variable
or a reference parameter it is not enough to change the value
number in the descriptor of the target of the assignment.
In addition, we have to change the value numbers associated with
all variables that might be aliases of the assignment's target.
- In a simple compiler like ours, we must assume that any
var parameter may be aliased with any non-local
variable, array element, record component or other var
parameter. Basically, it can be aliased with anything
other than a local variable.
- In a compiler that was willing
to do some interprocedural analysis we might gather
information about parameter passing that would allow
us to predict aliasing relationships.
- We must also assume that any non-local variable, array element
or record component may be aliased with any var parameter.
Since we can't be sure that an alias relations exists, we must set
the value numbers of possible aliases of the target of an assignment
to the "unknown" value number rather than to the value number
of the right hand side.