On 06/26/2014 02:15 PM, Uros Bizjak wrote:
>     * except.c (emit_note_eh_region_end): New helper function.
>     (convert_to_eh_region_ranges): Use emit_note_eh_region_end to
>     emit EH_REGION_END note.

This bit looks good.


>    rtx insn, next, prev;
> -  for (insn = get_insns (); insn; insn = next)
> +  for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
>      {
> -      next = NEXT_INSN (insn);
>        if (BARRIER_P (insn))
>       {
>         prev = prev_nonnote_insn (insn);
>         if (!prev)
>           continue;
> +
> +       /* Make sure we do not split a call and its corresponding
> +          CALL_ARG_LOCATION note.  */
> +       next = NEXT_INSN (prev);
> +       if (next == NULL)
> +         continue;
> +       if (NOTE_P (next)
> +           && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
> +         prev = next;
> +

This bit looks more complicated than it needs to be.
It would also be helpful for legibility to move the
declarations from the top to the first uses.

The next == NULL test can never be true, since we've
already searched backward from insn.


r~

Reply via email to