在 2024/6/14 16:36, Richard Sandiford 写道:
> Ah, ok. If the problem is stale recog_data information, I think we
> should instead make recog.cc:swap_change conditionally invalidate it.
> I.e. change:
>
> if (changes[num].object && !MEM_P (changes[num].object))
> std::swap (INSN_CODE (changes[num].object), changes[num].old_code);
>
> to something like:
>
> if (changes[num].object && !MEM_P (changes[num].object))
> {
> std::swap (INSN_CODE (changes[num].object), changes[num].old_code);
> if (recog_data.insn == changes[num].object)
> recot_data.insn = nullptr;
> }
>
> (untested). IMO this is better then resetting the INSN_CODE, since the
> INSN_CODE should be correct and is relatively expensive to recompute.
It's better. I will modify the patch and test it.
Thanks
Gui Haochen