RFR: 8252505: C1/C2 compiler support for blackholes [v11]

Aleksey Shipilev shade at redhat.com
Thu Dec 3 11:45:06 UTC 2020


On 12/2/20 6:21 PM, Vladimir Ivanov wrote:
> 
>> So where do we go from here? Somehow recording the operands of
>> MachCallBlackhole?
> 
> Have you tried `PhaseRegAlloc::dump_register(const Node *n, char *buf)`
> on argument inputs?

Yes, new commit has it. For the sample method like:

     public void test_08(Blackhole bh) {
         bh.consume(x + y);
         bh.consume(x + y);
         ...

-XX:+PrintOptoAssembly finally looks like this:

02c     movl    R11, [RSI + #16 (8-bit)]        # int ! Field: org/openjdk/jmh/samples/XplusY.y
030     addl    R11, [RSI + #12 (8-bit)]        # int
034     blackhole RDX, R11

034     movl    R11, [RSI + #16 (8-bit)]        # int ! Field: org/openjdk/jmh/samples/XplusY.y
038     addl    R11, [RSI + #12 (8-bit)]        # int
03c     blackhole RDX, R11

RDX is receiver ("bh"), and R11 is "x + y".

-- 
Thanks,
-Aleksey



More information about the hotspot-dev mailing list