On Tue, Feb 7, 2012 at 2:31 PM, Amker.Cheng <amker.ch...@gmail.com> wrote:
> On Mon, Feb 6, 2012 at 7:28 PM, Richard Guenther
> <richard.guent...@gmail.com> wrote:
>> It's probably to have the SET in some canonical form - the resulting
> I am wondering how the canonical form is maintained, since according
> to the paper:
> For an antileader set, it does not matter which expression represents
> a value, as long as that value is live.
> Could you show me where is the code maintaining such attributes?
>
>> values are simply re-computed from the expression subtraction
>> (multiple expressions may have the same value, so in
>> { a, b } { 0 } - { a } { 0 } you need to either compute { } { } or { b } { 0 
>> }
>> neither which you can reach by simply subtracting both bitmaps.
> Take this example, Shouldn't the expected result be:
>   {b}{0} if a is defined by some known expr;
>   {} {} if a is defined by some unknown expr;
> which not as in gcc now. Following words are from the paper:
>
> A temporary potentially in ANTIC_IN becomes dead if it is assigned to.
> For an antileader set, it does not matter which expression represents a value,
>  so long as that value is live. A temporary potentially in ANTIC_IN becomes
>  dead if it is assigned to. If the assignment is from something we can make an
>  expression for (as opposed to ?), that expression replaces the
> temporary as the
>  antileader. If the assignment is from ?, then the value is no longer
> represented
>  at all. Furthermore, any other expression that has that (no longer
> represented)
>  value as an operand also becomes dead.
>
> In the previous expression subtraction, I don't see value depending on
> tmp which is defined by unknown operation like tmp<-? is handled.

I think it is not "handled" in the subtraction but by adding EXP_GEN to
the antic set (expressions we "set from" are in EXP_GEN, expressions
"assigned to" in TMP_GEN).

In that light doing subtracting based on expressions (instead of values)
makes sense as if there is an expression left that has value, value
stays in the set.  Thus, { a, b } { 0 } - { a } { 0 } == { b} { 0 } (assuming
both a and b have value 0).

But I neither have access to the paper nor tried to understand all the
very details ;)  (note that the implementation does not exactly match
the paper AFAIK, it has some further optimizations and corrections
for errors)

Richard.

> Still confused and most likely I have missed something important.
> Please help, thanks very much.
>
> --
> Best Regards.

Reply via email to