aarch64 AD-file / matching rule

Andrew Dinn adinn at redhat.com
Wed Apr 29 13:22:50 UTC 2015

On 29/04/15 13:50, Benedikt Wedenik wrote:
> I’m writing compiler-optimisations for the aarch64 port at the moment
> and I am using specjbb2005 for benchmarking. One of the patterns I
> want to optimise is the following:
> . . .
> My question is now how to find out why the rule does not match / if
> the rule is correct and how to find the actual rule which emits the
> code of my desired pattern.

In the long run you probably need to use gdb, placing breaks in th ead
file either in encodings or in inline code in the ins_encode section of
your rule.

One thing you could do before diving into that is to encode a comment
into the code buffer -- do this in all the rules which assemble 'and'
instructions (including your rule) e.g.

  ins_encode %{
    __ block_comment("optimised andw; cmpw; b.cc to andsw; b.cc");
    __ andsw(as_Register($src1$$reg),
        (unsigned long)($src2$$constant));
    __ br ((Assembler::Condition)$cmp$$cmpcode, *L);    __ ands(...)

When you disassemble the code you will see the comment in the
disassembly telling you where the code came from.


Andrew Dinn

More information about the hotspot-compiler-dev mailing list