Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT does not generate arraytranslate nodes #20658

Open
knn-k opened this issue Nov 21, 2024 · 3 comments
Open

JIT does not generate arraytranslate nodes #20658

knn-k opened this issue Nov 21, 2024 · 3 comments
Labels

Comments

@knn-k
Copy link
Contributor

knn-k commented Nov 21, 2024

JIT compiler generates arraytranslate nodes for char[] to byte[] cases, but I haven't been able to make it generate arraytranslate nodes for byte[] to char[] cases.

I used the following binary on plinux for testing, because JIT codegen for Power has an environment variable that shows verbose output in the arraytranslate evaluator:

$ jdk-17.0.13+11/bin/java -version
openjdk version "17.0.13" 2024-10-15
IBM Semeru Runtime Open Edition 17.0.13.11 (build 17.0.13+11)
Eclipse OpenJ9 VM 17.0.13.11 (build openj9-0.48.0, JRE 17 Linux ppc64le-64-Bit Compressed References 20241015_861 (JIT enabled, AOT enabled)
OpenJ9   - 1d5831436e
OMR      - d10a4d553
JCL      - d17dd58f8d7 based on jdk-17.0.13+11)

See the following output:

[ arraytranslateTRTO: char[] to byte[] ] -- An arraytranslate node was generated

$ TR_verbosePPCTRTOOT=y jdk-17.0.13+11/bin/java -Xjit:limit=arrayTranslateTRTO,count=0,optlevel=scorching ArrayTranslateTRTOTest
JIT: env var TR_verbosePPCTRTOOT is set to y
ArrayTranslateTRTOTest.arrayTranslateTRTO([CI[BII)I @ scorching [isSourceByte: 0] [isOT: 0] [0 && 1 && 0]: arraytranslate
Done

[ arraytranslateTROT: byte[] to char[] ] -- No output from arraytranslate evaluator

$ TR_verbosePPCTRTOOT=y jdk-17.0.13+11/bin/java -Xjit:limit=arrayTranslateTROT,count=0,optlevel=scorching ArrayTranslateTROTTest
Done

Power codegen supports arraytranslateTROT.

This issue is common across platforms, except that AArch64 codegen does not support arraytranslateTROT at the moment. I found this issue when I was trying to add the support on AArch64.

@knn-k knn-k added the comp:jit label Nov 21, 2024
Copy link

Issue Number: 20658
Status: Open
Recommended Components: comp:vm, comp:gc, comp:test

@knn-k
Copy link
Contributor Author

knn-k commented Nov 21, 2024

These testcases do not depend on method recognition.
ArrayTranslateTests.zip

@knn-k
Copy link
Contributor Author

knn-k commented Nov 21, 2024

I haven't been able to make JIT generate arraytranslateTROTNoBreak nodes, either.

[ arraytranslateTROTNoBreak: byte[] to char[] ] -- No output from arraytranslate evaluator

$ TR_verbosePPCTRTOOT=y jdk-17.0.13+11/bin/java -Xjit:limit=arrayTranslateTROTNB,count=0,optlevel=scorching ArrayTranslateTROTNBTest
Done

ArrayTranslateTROTNBTest.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant