This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Init df for split pass since some target use REG_NOTE in split pattern


On 07/25/2016 12:35 PM, Richard Biener wrote:
On July 25, 2016 5:56:29 PM GMT+02:00, Jeff Law <law@redhat.com> wrote:
On 07/25/2016 12:36 AM, Kito Cheng wrote:
Hi all:

Some target(for example i386, sh and h8300) use find_regno_note in
split pattern but df infrastructure seem not initialize at split
pass,
so it may got wrong note since it's out-of-date.

ChangeLog
2016-07-25  Kito Cheng <kito.cheng@gmail.com>

        * gcc/recog.c (split_all_insns): Initialize df for split
pass.
        (split_all_insns_noflow): Likewise.

Patch was not included/attached to your message.  Please resend with
the
patch and hopefully a testcase which exhibits the problem.

And maybe back ends shouldn't look at notes in their splitters?
It's certainly not ideal. But I'm not sure what alternatives we have and it's bee supported for a very long time.

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.

Jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]