This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: delete LIBCALL note after split
Sa Liu <SALIU@de.ibm.com> writes:
> I have added a piece of code in try_split to handle the links. Not sure
> whether this is O.K. for the other platforms.
Thanks. The general idea looks right, but the implementation is
incorrect.
> + case REG_LIBCALL:
> + /* Relink the insns with REG_LIBCALL note and with REG_RETVAL note
>
> + after split. */
> + note_libcall
> + = find_reg_note (trial, REG_LIBCALL, NULL);
You don't need to look up the note again in TRIAL, you already have it
in the NOTE variable.
> + REG_NOTES (insn_last) = note_libcall;
Notes are a linked list, so this will 1) move the whole linked list to
INSN_LAST; 2) clobber the existing notes on INSN_LAST. You need to do
something like
REG_NOTES (insn_last) = gen_rtx_EXPR_LIST (REG_LIBCALL,
XEXP (note_libcall, 0),
REG_NOTES (insn_last));
Ian