[lworld] RFR: 8352647: [lworld] Remove larval InlineTypeNode in Unsafe intrinsics [v3]

Tobias Hartmann thartmann at openjdk.org
Thu Apr 3 12:11:07 UTC 2025


On Tue, 1 Apr 2025 17:50:00 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Hi,
>> 
>> As a step of #1405, I would like to remove the usage of larval value objects in `Unsafe` intrinsics. This patch also tries to make sure that `Unsafe::makePrivateBuffer` and `Unsafe::finishPrivateBuffer` are always inlined, so that larval objects do not cross call boundaries except for invoking object constructors.
>> 
>> Please take a look and review this PR, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add test

`compiler/valhalla/inlinetypes/TestIntrinsics.java` fails with `-XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -XX:+StressArrayCopyMacroNode -XX:+StressCallingConvention -XX:+StressLCM -XX:+StressGCM -XX:+StressCCP -XX:+StressIGVN -XX:+StressReflectiveCode -XX:+StressMethodHandleLinkerInlining -XX:+StressCompiledExceptionHandlers -XX:MaxNodeLimit=100000` in all scenarios due to:

Custom Run Test: @Run: test22_verifier - @Test: test22:
compiler.lib.ir_framework.shared.TestRunException: Method public void compiler.valhalla.inlinetypes.TestIntrinsics.test22(compiler.valhalla.inlinetypes.MyValue1) not compilable (anymore) at level C2
	at compiler.lib.ir_framework.shared.TestRun.check(TestRun.java:32)
	at compiler.lib.ir_framework.test.AbstractTest.enqueueMethodForCompilation(AbstractTest.java:156)
	at compiler.lib.ir_framework.test.AbstractTest.compileMethod(AbstractTest.java:131)
	at compiler.lib.ir_framework.test.CustomRunTest.compileSingleTest(CustomRunTest.java:113)
	at compiler.lib.ir_framework.test.CustomRunTest.compileTest(CustomRunTest.java:101)
	at compiler.lib.ir_framework.test.AbstractTest.run(AbstractTest.java:101)
	at compiler.lib.ir_framework.test.CustomRunTest.run(CustomRunTest.java:89)
	at compiler.lib.ir_framework.test.TestVM.runTests(TestVM.java:867)
	at compiler.lib.ir_framework.test.TestVM.start(TestVM.java:255)
	at compiler.lib.ir_framework.test.TestVM.main(TestVM.java:168)


Custom Run Test: @Run: test39_verifier - @Test: test39:
compiler.lib.ir_framework.shared.TestRunException: Method public compiler.valhalla.inlinetypes.MyValue1 compiler.valhalla.inlinetypes.TestIntrinsics.test39(compiler.valhalla.inlinetypes.MyValue1) not compilable (anymore) at level C2
	at compiler.lib.ir_framework.shared.TestRun.check(TestRun.java:32)
	at compiler.lib.ir_framework.test.AbstractTest.enqueueMethodForCompilation(AbstractTest.java:156)
	at compiler.lib.ir_framework.test.AbstractTest.compileMethod(AbstractTest.java:131)
	at compiler.lib.ir_framework.test.CustomRunTest.compileSingleTest(CustomRunTest.java:113)
	at compiler.lib.ir_framework.test.CustomRunTest.compileTest(CustomRunTest.java:101)
	at compiler.lib.ir_framework.test.AbstractTest.run(AbstractTest.java:101)
	at compiler.lib.ir_framework.test.CustomRunTest.run(CustomRunTest.java:89)
	at compiler.lib.ir_framework.test.TestVM.runTests(TestVM.java:867)
	at compiler.lib.ir_framework.test.TestVM.start(TestVM.java:255)
	at compiler.lib.ir_framework.test.TestVM.main(TestVM.java:168)


	at compiler.lib.ir_framework.test.TestVM.runTests(TestVM.java:903)
	at compiler.lib.ir_framework.test.TestVM.start(TestVM.java:255)
	at compiler.lib.ir_framework.test.TestVM.main(TestVM.java:168)

Otherwise, testing looks good!

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/1406#issuecomment-2775582742
PR Comment: https://git.openjdk.org/valhalla/pull/1406#issuecomment-2775583243


More information about the valhalla-dev mailing list