openj9
openj9 copied to clipboard
Fold calls to Invokers.checkVarHandleGenericType into its result
When the VarHandle object and the AccessDescriptor objects are known, we can perform a compile-time lookup of the corresponding entry in the VarHandle's MethodHandle table. This commit enables such a transformation through the following:
- Add recognized fields from which the MethodHandle table gets loaded, accounting for the differences different JDK versions
- Add checkVarHandleGenericType to the list of non-inlinable methods
- Add new function in MethodHandleTransformer to be triggered when visiting checkVarHandleGenericType call node that generates the trees and transforms the call node.
Furthermore, visitStoreToLocalVariable can now be triggered for cases of direct stores of nodes anchored by PassThrough nodes, which would result from calls that have been transformed into PassThrough. PassThrough nodes do not have type info, and therefore this has to be accounted for. Once inside visitStoreToLocalVariable, it would have to recognize cases of stores of child nodes of PassThrough, and set the actual node to use as the RHS of the store.
@jdmpapin I'd appreciate your review of this.
@vijaysun-omr FYI, this will improve performance in VarHandle and MemorySegment-heavy workloads.
@jdmpapin I have addressed your review comments. Requesting another review.
~Jenkins build sanity all jdk17,jdk21~
Jenkins test sanity all jdk17,jdk21
Jenkins test sanity.openjdk zlinux jdk21
Jenkins test sanity xlinuxjit,plinuxjit,zlinuxjit jdk17,jdk21
The JITServer sanity.openjdk failures are #20995 (and timeouts in the same vector tests, which I'm guessing are probably caused by the same underlying problem)
The other failure is #17270
So the checks are OK, but now there is a merge conflict
@jdmpapin The merge conflict is now resolved.
Running some minimal additional testing since the previous checks were done a month ago
Jenkins test sanity xlinux jdk17