RFR: 8189107 - AARCH64: create intrinsic for pow

Andrew Dinn adinn at redhat.com
Sun Sep 9 08:08:12 UTC 2018


Hi Dmitrij

On 07/09/18 17:42, Dmitrij Pochepko wrote:
> Thank you again for looking into it in such details. It will take me
> some time to review your draft with comments related to original code.
> Looking forward to work on improving the code and algorithm description
> after that.

You are welcome. However, thanks are not needed. This is simply what I
am required to do as a reviewer.

> Small note though: since you're adding documentation to original code,
> it probably would make sense to update it in original location as well
> at src/hotspot/share/runtime/sharedRuntimeTrans.cpp
I agree that it would be better if comments in that shared code were
also updated. However, I recommend we pursue that task as a follow-up
once we have fixed the intrinsic.

Also, it's important to note that the omission in the above file are, to
a degree, mitigated by the /slightly/ more complete documentation in
file src/java.base/share/classes/java/lang/FdLibm.java. Comments in the
methods for computing log(x) and exp(x) in the latter file include some
of same details of the maths/algorithms that I described (I only found
these comments after deriving the relevant maths myself :-).

So, we might consider upgrading the comments in the Java source and
adding a cross-reference to that file from the C source. The code itself
is almost identical so one commented version should work for both.

I'd still like my comments to remain in your generator code. This is the
most complex implementation version and has the greatest divergence from
the original. So, it will be the focus of any nasty bugs that arise.
Having an explanation of the maths and algorithm right there in the
generator source is going to ensure whoever has to fix any such bug is
best prepared to do so. Also, it will pin down the version of the shared
code from which the generator was derived. The shared code ought not to
be updated without changing the generator code but keeping the C
template in with the generator is safer.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the hotspot-compiler-dev mailing list