Skip to content

Check flattenable value types and if Q signature is supported - #17447

Merged
hzongaro merged 2 commits into
eclipse-openj9:masterfrom
a7ehuo:separate-nullRestricted-remove-q-2
Jun 7, 2023
Merged

Check flattenable value types and if Q signature is supported#17447
hzongaro merged 2 commits into
eclipse-openj9:masterfrom
a7ehuo:separate-nullRestricted-remove-q-2

Conversation

@a7ehuo

@a7ehuo a7ehuo commented May 23, 2023

Copy link
Copy Markdown
Contributor
  • Check areFlattenableValueTypesEnabled before checking if element is flattened
  • Check if Q signature is supported or not before using Q signature to determine if the element is a value type
    • This change is intended to lay the foundation to support the two cases: Q signature is supported and Q signature is not supported. This change does not handle the case where Q signature is not supported. At the moment as long as flattenable value types are enabled, Q signature is still supported
  • Remove special handling on checking primitive value type in genCheckcast and disable testCheckCastValueTypeOnNull since the latest spec doesn't require special handling on null restricted value types.

@a7ehuo
a7ehuo requested a review from hzongaro May 23, 2023 14:38
Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
@a7ehuo

a7ehuo commented May 23, 2023

Copy link
Copy Markdown
Contributor Author

@hzongaro May I ask you to review this change? Thank you!

WIP for now since I'm running regression test on this change

@a7ehuo

a7ehuo commented May 23, 2023

Copy link
Copy Markdown
Contributor Author

Just a heads up. I found a few more places in the following files that require the checking on if Q signature is supported or not. However, any change in the current commit b39fe6e is still good for review

 runtime/compiler/env/J9ClassEnv.cpp
 runtime/compiler/env/VMJ9.cpp
 runtime/compiler/runtime/JITClientSession.cpp

Comment thread runtime/compiler/ilgen/Walker.cpp Outdated
@a7ehuo
a7ehuo force-pushed the separate-nullRestricted-remove-q-2 branch from b39fe6e to 857d60f Compare May 24, 2023 16:41
@a7ehuo a7ehuo changed the title WIP: Check flattenable value types and if Q signature is supported Check flattenable value types and if Q signature is supported May 24, 2023

@hzongaro hzongaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor comments, possibly for discussion

Comment thread runtime/compiler/env/J9ObjectModel.cpp Outdated
Comment thread runtime/compiler/ilgen/IlGenerator.cpp Outdated
Comment thread runtime/compiler/ilgen/Walker.cpp Outdated
Comment thread runtime/compiler/env/J9ClassEnv.cpp Outdated
Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
@a7ehuo a7ehuo added comp:jit project:valhalla Used to track Project Valhalla related work labels May 30, 2023
- `areFlattenableValueTypesEnabled`: Whether or not
flattenable value object (aka null restricted) type
is enabled

- `isQDescriptorForValueTypesSupported`: Whether
or not `Q` signature is supported

- Update `isValueTypeArrayFlatteningEnabled` to check
`areFlattenableValueTypesEnabled` first

Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
@a7ehuo
a7ehuo force-pushed the separate-nullRestricted-remove-q-2 branch from 857d60f to c4346cc Compare June 5, 2023 12:48
@a7ehuo

a7ehuo commented Jun 5, 2023

Copy link
Copy Markdown
Contributor Author

@hzongaro all comments are addressed. Ready for another review. Thanks!

Comment thread test/functional/Valhalla/src/org/openj9/test/lworld/ValueTypeTests.java Outdated
Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
- Check `areFlattenableValueTypesEnabled` before checking
  if element is flattened

- Check if Q signature is supported or not before using Q
  signature to determine if the element is a value type.

- Remove special handling on checking primitive value type
  in `genCheckcast` and disable `testCheckCastValueTypeOnNull`
  since the latest spec doesn't require special handling on null
  restricted value types.

Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
@a7ehuo
a7ehuo force-pushed the separate-nullRestricted-remove-q-2 branch from c4346cc to 156b344 Compare June 6, 2023 01:59
@a7ehuo

a7ehuo commented Jun 6, 2023

Copy link
Copy Markdown
Contributor Author

@hzongaro all comments are addressed. Ready for another review. Thanks!

@hzongaro hzongaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@hzongaro hzongaro self-assigned this Jun 6, 2023
@hzongaro

hzongaro commented Jun 6, 2023

Copy link
Copy Markdown
Member

Jenkins test sanity all jdk11,jdk17

@hzongaro

hzongaro commented Jun 6, 2023

Copy link
Copy Markdown
Member

Jenkins test sanity,extended xlinuxval jdknext

@a7ehuo

a7ehuo commented Jun 7, 2023

Copy link
Copy Markdown
Contributor Author

JDK17 x86-64_mac build failed: IOException caught during compilation: Resource deadlock avoided. Not sure how it'd be related to my change. @hzongaro Could you help relaunch test on JDK17 x86-64_mac again and see how it goes? Thank you!

[2023-06-06T14:39:00.417Z] Compiling 16 files for java.management.rmi
[2023-06-06T14:39:00.417Z] Compiling 220 files for java.security.jgss
[2023-06-06T14:39:01.984Z] IOException caught during compilation: Resource deadlock avoided
[2023-06-06T14:39:01.984Z] CompileJavaModules.gmk:94: recipe for target '/Users/jenkins/workspace/Build_JDK17_x86-64_mac_Personal/build/macosx-x86_64-server-release/jdk/modules/java.management.rmi/_the.java.management.rmi_batch' failed
[2023-06-06T14:39:01.984Z] make[3]: *** [/Users/jenkins/workspace/Build_JDK17_x86-64_mac_Personal/build/macosx-x86_64-server-release/jdk/modules/java.management.rmi/_the.java.management.rmi_batch] Error 1
[2023-06-06T14:39:01.984Z] make/Main.gmk:197: recipe for target 'java.management.rmi-java' failed
[2023-06-06T14:39:01.984Z] make[2]: *** [java.management.rmi-java] Error 2
[2023-06-06T14:39:01.984Z] make[2]: *** Waiting for unfinished jobs....

@hzongaro

hzongaro commented Jun 7, 2023

Copy link
Copy Markdown
Member

Jenkins test sanity osx jdk17

@hzongaro

hzongaro commented Jun 7, 2023

Copy link
Copy Markdown
Member

Testing has passed, and review was completed. Merging.

@hzongaro
hzongaro merged commit 50019a8 into eclipse-openj9:master Jun 7, 2023
@a7ehuo
a7ehuo deleted the separate-nullRestricted-remove-q-2 branch March 6, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:jit project:valhalla Used to track Project Valhalla related work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants