This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix reload ICE with define-split
Roman Zippel <zippel@linux-m68k.org> writes:
> On Fri, 23 Feb 2007, Nathan Sidwell wrote:
>> After discussing this with Richard Sandiford, we agreed that the
>> place to fix this was in the middle end, and not in m68k specific
>> code. To that end, this patch adds an update_reg_inc_notes_between
>> function and calls it after splitting an instruction.
>
> I have a similiar patch, which I think is a bit better. try_split()
> already tries to recreate notes, so the patch below adds the hook for
> REG_INC notes there.
There's a behavioural difference here though. Your patch copes only
with cases where the original insn had an automodified address,
whereas Nathan's copes with cases where the orignal insn didn't,
It's not unresonable to imagine a splitter that increments an
address and then decrements it again, leaving the final address the
same as the original, and AIUI it isn't the backend's responsibility
to add notes in that case. So I think Nathan's is more correct in
principle.
Richard