[PATCH] 8217561 : X86: Add floating-point Math.min/max intrinsics
B. Blaser
bsrbnd at gmail.com
Mon Feb 4 14:30:55 UTC 2019
Hi Jatin,
On Mon, 4 Feb 2019 at 13:53, Bhateja, Jatin <jatin.bhateja at intel.com> wrote:
>
> Hi Blaser,
>
> Please see response embedded in following mail.
>
> Best Regards,
> Jatin
>
> > -----Original Message-----
> > From: B. Blaser [mailto:bsrbnd at gmail.com]
> > Sent: Monday, February 4, 2019 5:13 PM
> >
> > Yes, of course, but I meant:
> >
> > http://cr.openjdk.java.net/~sviswanathan/Jatin/8217561/webrev.01/test/ho
> > tspot/jtreg/compiler/intrinsics/math/TestFpMinMaxIntrinsics.java.html
> >
> > I believe '-XX:CompileOnly=java/lang/Math' induce the compilation of
> > 'Math.max()' but not its intrinsification which occurs when the call is inlined,
> > see:
> >
> > http://hg.openjdk.java.net/jdk/jdk/rev/f15af1e2c683#l9.29
> >
>
> I can see that if a method is a candidate for intrinsification (which is decided during initialization as we create explicit vmSymbols for them) then during initial graph creation
> itself a specialized node is created for the call site (refer to processing of invoke* bytecodes done in Parse::do_call()). Thus intrinsification in this case will implicitly do the inlining.
>
> > http://hg.openjdk.java.net/jdk/jdk/file/d997c227e968/src/hotspot/share/op
> > to/library_call.cpp#l6611
> >
> > But this would be good if someone knowledgeable in this area could confirm
> > this?
> An experienced hand could comment more on this.
I think this is what Nils meant here:
http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-January/032528.html
>>> Allow compilation of the methods in the test:
>>>
>>> "-XX:CompileCommand=compileonly,compiler.intrinsics.math.TestFpMinMaxIntrinsics*"
>>>
>>> And add a loop in the main method, so the test case is run multiple times
This is also what I observed in my example; you have to enable
compilation of the caller '-XX:CompileOnly=MinMax::test' and run it
multiple times to trigger inlining of the intrinsic (I'm not sure that
100 iterations as you added in 'TestFpMinMaxIntrinsics' are enough
though).
Bernard
More information about the hotspot-compiler-dev
mailing list