On Tue, Apr 19, 2011 at 5:08 AM, Michael Matz <m...@suse.de> wrote: > Hi, > > On Mon, 18 Apr 2011, Easwaran Raman wrote: > >> > > @@ -596,7 +581,7 @@ >> > > if (vb->conflicts) >> > > { >> > > EXECUTE_IF_SET_IN_BITMAP (vb->conflicts, 0, u, bi) >> > > - add_stack_var_conflict (a, stack_vars[u].representative); >> > > + add_stack_var_conflict (a, u); >> > >> > Please don't. This uselessly bloats the conflict bitmaps. >> >> It is sufficient to add the conflicts of a variable only when it is >> not merged into some group. > > That is correct but is also what the use of stack_vars[u].representative > achieves alone, ... > >> I am adding a check to that effect. > > ... without any check. > > @@ -596,7 +581,8 @@ > if (vb->conflicts) > { > EXECUTE_IF_SET_IN_BITMAP (vb->conflicts, 0, u, bi) > - add_stack_var_conflict (a, stack_vars[u].representative); > + if (stack_vars[u].next == EOC && stack_vars[u].representative == u) > + add_stack_var_conflict (a, u); > BITMAP_FREE (vb->conflicts); > } > } > > What's your objective with this change? I find the original code clearer.
Let us say we try to merge 'a' to 'b' and 'a' has conflicts with many members of an existing partition C. It is not necessary to add all those conflicts to 'b' since they will be never considered in the call to union_stack_vars. I was motivated by your comment on bit-vector bloat to try this, but if this affects readability I'll happily revert back to what it was before. -Easwaran > > > Ciao, > Michael.