On Fri, Mar 21, 2025 at 02:00:18PM +0100, Jakub Jelinek wrote:
> I have some concerns:
> 1) I wonder if there is a guarantee that first_call_insn if non-NULL will be
>    always in between curr_insn and usage_insn when call_save_p; I'd hope
>    yes because if usage_insn is before first_call_insn in the ebb,
>    presumably it wouldn't need to find call save regs because the range
>    wouldn't cross any calls
> 2) I wonder whether it wouldn't be better instead of inserting the saves
>    before first_call_insn insert it at the start of the bb containing that
>    call (after labels of course); emitting it right before a call could
>    mislead code looking for argument slot initialization of the call

Note, if we'd insert after labels of the bb containing first_call_insn
rather than before first_call_insn, perhaps verification that 1) is
guaranteed could be done through a dominance check.  Except that ira.cc
seems to free_dominance_info (CDI_DOMINATORS) and nothing in lra* seems to
compute or do anything with CDI_DOMINATORS.  Any other way to find out
cheaply what bb is earlier and what bb later within the ebb?

        Jakub

Reply via email to