This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][sched-deps] Remove needless check for modified_in_p when trying to fuse two non-conditional jump insns
- From: Jeff Law <law at redhat dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 13 Nov 2014 22:17:39 -0700
- Subject: Re: [PATCH][sched-deps] Remove needless check for modified_in_p when trying to fuse two non-conditional jump insns
- Authentication-results: sourceware.org; auth=none
- References: <54638967 dot 7070409 at arm dot com> <5463EACF dot 9080504 at redhat dot com> <5464BBA3 dot 1050503 at arm dot com>
On 11/13/14 07:09, Kyrill Tkachov wrote:
I've updated the documentation for the hook.
The testcase I was looking at involves fusing the AArch64 adrp+add
instructions and depends on the backend implementation of the matching
code, under review currently at
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg01263.html.
I'm attaching a reduced testcase that generates an adrp and an add and
due to the restriction addressed in this patch it doesn't call the
backend hook for a pair of adrp and add instructions, causing them to be
scheduled apart.
I don't think it's a good candidate for the testsuite though because
it's not easy to scan for consequent assembly instructions from Dejagnu
and the instruction pair may end up scheduled together for some tuning
parameters even though the macro fusion hook does not trigger for them
as it should.
It's painful, but certainly possible to check for consecutive assembly
instructions. You just have to match the first instruction, its
operands, a newline, then the 2nd instruction & operands. The
difficulty is in getting all the escape sequences right!
There are some examples of this. For example mips/umips-branch-1.c
/* { dg-final { scan-assembler "\tjr?\t\\\$31\n\tmove\t\\\$2,\\\$0" } } */
Which looks for a jr instruction, some operands, then a move instruction
on the next line.
As for instability, that's an inherent problem in some of this kind of
stuff. Just run it for the target you care about, possibly giving
explicit tuning parameters that are known to make it trigger.
OK with a testcase.
jeff