[trunk][patch] fix another invalid sharing in see
Paolo Bonzini
bonzini@gnu.org
Tue May 27 16:41:00 GMT 2008
Rafael Espindola wrote:
>> Don't trust me too much, I used the parameters of validate_replace_rtx_1. I
>> had in mind something like this:
>> - if (rtx_equal_p (PATTERN (ref), PATTERN (ref_copy))
>> - || insn_invalid_p (ref_copy))
>> + if (!apply_change_group ()
>> + || rtx_equal_p (PATTERN (ref), PATTERN (ref_copy)))
>> {
>
> Why do you need this?
Because validate_replace_rtx_1 does not make the changes, it only saves
them so that they're applied later. Apply_change_group then does
insn_invalid_p check (and other attempts if the check fails, which is
why the current see.c code is bogus...).
>> The complete patch would also make validate_replace_rtx_1 public from
>> recog.c
>
> Should I work on it or is my last patch OK?
As you wish -- see.c is full of problems like this one, so improving it
a little at a time is not a bad thing to do. If you plan other work to
bring it up-to-date with current practices, cleanups like this one will
pay off.
I would have done it myself but I'm too swamped now. :-(
Paolo
More information about the Gcc-patches
mailing list