This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: scheduling conditional branches after stores
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Mike Stump <mikestump at comcast dot net>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Oct 2015 12:11:36 +0100
- Subject: Re: scheduling conditional branches after stores
- Authentication-results: sourceware.org; auth=none
- References: <BCD7D45B-CD86-4D0D-B85C-2B3DF6E86DED at comcast dot net>
On 10/09/2015 11:36 PM, Mike Stump wrote:
So, I keep on seeing inaccurate schedule time on the conditional
branches after a store, and tracked it down to this type of solution.
On my machine, I can run these two in the same cycle, but with a
REG_DEP_OUTPUT dependency it was moving the branch to the next cycle.
I kinda wanted a control dependency of some sort, but those seem only
to be used for predicated instructions, which doesn’t apply to the
case at hand. For the instructions, from my view, there are no data
dependencies at all. What dependencies exists is the dependency that
one cannot interchange:
mem[$r1] = 1
if ($r2) jump L5
This last case being the one that I’m interested in. So, the
question is, is the below patch the right way to fix this?
I'd recommend trying to fix this with the adjust_cost hook instead.
Bernd