On Wed, Jan 11, 2012 at 10:06:55AM +0100, Eric Botcazou wrote:
> > You're right. So how about this patch (untested so far) instead?
> > In the combiner it still needs to handle the case where REG_NORETURN note
> > hasn't been placed yet, because then fixup_args_size_notes doesn't consider
> > it being a noret call.
>
> Still too much work for the combiner in my opinion. :-) Can't we arrange for
> the REG_NORETURN and REG_ARGS_SIZE notes to be originally placed so that the
> combiner first puts back the former and second the latter? And why can't the
IMHO reordering the notes in the chain would be even more work than this.
> latter note be put back by fixup_args_size_notes directly?
fixup_args_size_notes does that if the REG_NORETURN note is already there.
The
if (noret_call
&& find_reg_note (i3, REG_ARGS_SIZE, NULL_RTX) == NULL_RTX)
place = i3;
is all that is needed to add it if it wasn't already there. The rest
of the patch is needed also for the assert checking.
Jakub