This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][sched-deps] Remove needless check for modified_in_p when trying to fuse two non-conditional jump insns


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]