This is the mail archive of the
mailing list for the GCC project.
add_branch_dependences in sched-rgn.c
- 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>
- Cc: Vladimir Makarov <vmakarov at redhat dot com>
- Date: Tue, 08 Apr 2014 17:15:51 +0100
- Subject: add_branch_dependences in sched-rgn.c
- Authentication-results: sourceware.org; auth=none
I'm looking at some curious pre-reload scheduling behaviour and I noticed this:
At the add_branch_dependences function sched-rgn.c there is a comment that says
"branches, calls, uses, clobbers, cc0 setters, and instructions that can throw
exceptions" should be scheduled at the end of the basic block.
However right below it the code that detects this kind of insns seems to only
look for these insns that are directly adjacent to the end of the block
(implemented with a while loop that ends as soon as the current insn is not one
of the aforementioned).
Shouldn't the code look through the whole basic block, gather all of the
branches, clobbers etc. and schedule them at the end?