This is the mail archive of the
mailing list for the GCC project.
Re: Init df for split pass since some target use REG_NOTE in split pattern
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Kito Cheng <kito dot cheng at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 25 Jul 2016 13:48:13 -0600
- Subject: Re: Init df for split pass since some target use REG_NOTE in split pattern
- Authentication-results: sourceware.org; auth=none
- References: <CA+yXCZBAiG8ckW692_dxWjicb1w8WX3LwVnnBB0Ew1aL=NXe4A@mail.gmail.com> <firstname.lastname@example.org> <AD418761-C4FB-4E58-8244-06CA26DF40E9@gmail.com>
On 07/25/2016 12:35 PM, Richard Biener wrote:
It's certainly not ideal. But I'm not sure what alternatives we have
and it's bee supported for a very long time.
On July 25, 2016 5:56:29 PM GMT+02:00, Jeff Law <email@example.com> wrote:
On 07/25/2016 12:36 AM, Kito Cheng wrote:
Some target(for example i386, sh and h8300) use find_regno_note in
split pattern but df infrastructure seem not initialize at split
so it may got wrong note since it's out-of-date.
2016-07-25 Kito Cheng <firstname.lastname@example.org>
* gcc/recog.c (split_all_insns): Initialize df for split
Patch was not included/attached to your message. Please resend with
patch and hopefully a testcase which exhibits the problem.
And maybe back ends shouldn't look at notes in their splitters?
For example on the H8, there is no shift-by-a-variable-amount. Instead
you have to emit it as a loop. However, we don't expose the loop until
late in the RTL pipeline (via a splitter). When we split a variable
shift into a loop, one of the things we want to know is whether or not
the register holding the shift count dies or not. If it does not die,
we'll just use it rather than copying it elsewhere.
Similarly we can generate a more efficient split for something like
(ior (ashift (X) (const_int)) for certain integers when we know the
input dies. Or for some (add (mult)) expressions.