[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on Value vs. ValueBox
"James C. Corbett" wrote:
>
> I'm looking at example 3 (copy propagaton) in the Soot distribution.
> I understand the basic logic, but I'm a little confused by the
> representation. What is the difference between a Value and a
> ValueBox? What do each represent?
Yeah this is one of the things that sorely needs documentation. A Value
is an object in the grammar, whereas a ValueBox is an object which
contains a Value. It's basically an abstraction which represents a
pointer to a value. It is useful when performing analyses so that you
can get the ValueBox's for all the uses or definitions in a statement
and modify them without knowing where they are exactly. (which is a
technique used for copy/constant propagation)
Raja