Added missing cast_not_null() in intrinsics + support for Unsafe.copyMemory() in AddPNode::Ideal()
Roman Kennke
rkennke at redhat.com
Fri Jul 8 09:17:29 UTC 2016
Very good!
I couldn't find a non-array use of vectorizedMismatch() either.
Please commit!
Am Freitag, den 08.07.2016, 10:42 +0200 schrieb Roland Westrelin:
> http://cr.openjdk.java.net/~roland/shenandoah-intrinsic-cast-nonnull/
> webrev.00/
>
> A number of intrinsics know their inputs are non null but the
> compiler
> is not aware of it. I added some cast_not_null() to these. The
> benefits
> are that:
> 1) the check for null in the barriers is not needed.
> 2) the compiler doesn't expect memory accesses with a NULL+offset but
> the compiler can see one if the memory access is pushed in the null
> branch of the barrier. This change removes the null branches.
> 3) AddPNode::Ideal() has logic to handle 2) in the case of unsafe
> accesses but is confused if it sees anything it doesn't expect
>
> AddPNode::Ideal() is extended to support the Unsafe.copyMemory()
> intrinsic that can take null+offset inputs.
>
> vectorizedMismatch() is another intrinsic that can be passed
> null+offset
> inputs but LibraryCallKit::inline_vectorizedMismatch() checks that
> inputs are arrays and for
> arrays LibraryCallKit::make_unsafe_address()
> generates a null check so that intrinsic shouldn't cause a problem.
> Actually, in the library code I found no use of vectorizedMismatch()
> with null inputs.
>
> Roland.
>
More information about the shenandoah-dev
mailing list