This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: coalesce SSA versions in var-tracking notes


Alexandre Oliva <aoliva@redhat.com> writes:

> +      /* Find the location part.  */
> +      low = 0;
> +      high = var->n_var_parts;
> +      while (low != high)
> +	{
> +	  pos = (low + high) / 2;
> +	  if (var->var_part[pos].offset < offset)
> +	    low = pos + 1;
> +	  else
> +	    high = pos;
> +	}
> +      pos = low;

This seems to be the third occurrence of this binary search in
var-tracking.c.  Time to move it into its own function, probably along
with the
      if (pos < var->n_var_parts && var->var_part[pos].offset == offset)

Patch is approved with that change.

Thanks.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]