Allow try_split to split RTX_FRAME_RELATED_P insns
authorSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>
Thu, 13 Aug 2020 07:49:26 +0000 (13:19 +0530)
committerSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>
Fri, 21 Aug 2020 12:29:40 +0000 (17:59 +0530)
commite7d55c6b81733335d81e35f7c0116bbdffccb682
tree6e580a14c242d86acc268077652207657f7dcf5a
parent988fb2f597d67cdf3603654372c020c28448441f
Allow try_split to split RTX_FRAME_RELATED_P insns

Instead of rejecting RTX_FRAME_RELATED_P insns, allow try_split to split
such insns, provided the split is after reload, and the result of the split
is a single insn.

recog.c:peep2_attempt already splits an RTX_FRAME_RELATED_P insn splitting
to a single insn. This patch refactors existing code copying frame related
info to a separate function (copy_frame_info_to_split_insn) and calls it
from both peep2_attempt and try_split.

2020-08-21  Senthil Kumar Selvaraj  <saaadhu@gcc.gnu.org>

gcc/ChangeLog:

* emit-rtl.c (try_split): Call copy_frame_info_to_split_insn
to split certain RTX_FRAME_RELATED_P insns.
* recog.c (copy_frame_info_to_split_insn): New function.
(peep2_attempt): Split copying of frame related info of
RTX_FRAME_RELATED_P insns into above function and call it.
* recog.h (copy_frame_info_to_split_insn): Declare it.
gcc/emit-rtl.c
gcc/recog.c
gcc/recog.h