Senthil Kumar via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> Hi,
>
>   I'm working on converting the AVR backend to MODE_CC, following
>   the steps described for case #2 in the CC0 transition wiki page,
>   and I've implemented the first three bullet
>   points (https://github.com/saaadhu/gcc-avr-cc0/tree/avr-cc0-squashed). With
>   the below patch, there are zero regressions (for mega and xmega
>   subarchs) compared to the current mainline, as of yesterday.
>
>   The wiki suggests using post-reload splitters, so that's the
>   direction I took, but I ran into an issue where split_insn
>   bails out early if RTX_FRAME_RELATED_P is true - this means
>   that splits for REG_CC clobbering insns with
>   RTX_FRAME_RELATED_P will never execute, resulting in a
>   could-not-split insn ICE in the final stage.
>
>   I see that the recog.c:peep2_attempt allows splitting of a
>   RTX_FRAME_RELATED_P insn, provided the result of the split is a
>   single insn. Would it be ok to modify try_split also to
>   allow those kinds of insns (tentative patch attached, code
>   copied over from peep2_attempt, only setting old and new_insn)? Or is there
>   a different approach to fix this?

I agree there's no obvious reason why splitting to a single insn
should be rejected but a peephole2 to a single instruction should be OK.
And reusing the existing, tried-and-tested code is the way to go.

But could you split the code out of peep2_attempt into a subroutine
(probably still in recog.c) and reuse it in try_split?

BTW, just to check: is your email address in MAINTAINERS still correct?

Thanks,
Richard

Reply via email to