On Sun, Oct 14, 2012 at 9:02 AM, Paolo Bonzini wrote: > Can we just simulate liveness for web, and drop REG_EQUAL/REG_EQUIV > notes that refer to a dead pseudo?
I don't think we want to do that. A REG_EQUAL/REG_EQUIV note can use a pseudo that isn't live and still be valid. Consider a simple example like this: a = b + 3 // b dies here c = a {REG_EQUAL b+3} The REG_EQUAL note is valid and may help optimization. Removing it just because b is dead at that point would be unnecessarily pessimistic. I also don't want to compute DF_LR taking EQ_USES into account as real uses for liveness, because that involves recomputing and enlarging the DF_LR sets (all of them, both globally and locally) before LR&RD and after LR&RD. That's why I implemented the quick-and-dirty liveness computation for the notes: It's non-intrusive on DF_LR and it's cheap. Ciao! Steven