This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Finding insns to reorder using dataflow
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 13 Aug 2015 12:06:43 +0100
- Subject: Finding insns to reorder using dataflow
- Authentication-results: sourceware.org; auth=none
Hi all,
I'm implementing a target-specific reorg pass, and one thing that I want to do
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 dependencies.
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 the dataflow
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
of arguments.
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.
Thanks,
Kyrill