This is the mail archive of the
mailing list for the GCC project.
Re: Finding insns to reorder using dataflow
- From: Jeff Law <law at redhat dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 13 Aug 2015 10:20:50 -0600
- Subject: Re: Finding insns to reorder using dataflow
- Authentication-results: sourceware.org; auth=none
- References: <55CC7A43 dot 5010209 at arm dot com>
On 08/13/2015 05:06 AM, Kyrill Tkachov wrote:
I'm implementing a target-specific reorg pass, and one thing that I want
is for a given insn in the stream to find an instruction
in the stream that I can swap it with, without violating any dataflow
The candidate instruction could be earlier or later in the stream.
I'm stuck on finding an approach to do this. It seems that using some of
infrastructure is the right way to go, but I can't figure out the details.
can_move_insns_across looks like relevant, but it looks too heavyweight
with quite a lot
I suppose somehow constructing regions of interchangeable instructions
would be the way
to go, but I'm not sure how clean/cheap that would be outside the scheduler
Any ideas would be appreciated.
I think you want all the dependency analysis done by the scheduler.
Which leads to the question, can you model what you're trying to do in
the various scheduler hooks -- in particular walking through the ready
list seems appropriate.