openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

X: implement general case multianewarrayEvaluator for 2D arrays

Open Spencer-Comin opened this issue 3 months ago • 15 comments

Currently multianewarray is only implemented on x86 for 2D arrays with zero first or second dimension, otherwise calling out to a VM helper. This PR adds logic to do allocation and initialisation inline for nonzero 2D arrays.

Spencer-Comin avatar Sep 06 '25 00:09 Spencer-Comin

@ehsankianifar @luke-li-2003 @zl-wang could I get your review since you've looked at multianewarray for Z & P?

Spencer-Comin avatar Sep 09 '25 02:09 Spencer-Comin

Internal sanity testing: https://hyc-runtimes-jenkins.swg-devops.com/job/Pipeline-Build-Test-Personal/29776/

Spencer-Comin avatar Sep 09 '25 02:09 Spencer-Comin

I haven't added support for off-heap in this PR. I will need to add logic to special case the zero length arrays for that, so I am planning on doing that in a future change.

Spencer-Comin avatar Sep 09 '25 02:09 Spencer-Comin

Benchmarking with this change is showing a regression in the dacapo graphchi benchmark, reverting to draft while I investigate that

Spencer-Comin avatar Sep 09 '25 16:09 Spencer-Comin

Did you run 32-bit testing?

BradleyWood avatar Sep 10 '25 13:09 BradleyWood

I haven't run 32-bit testing, but I'm assuming multianewarrayEvaluator is only supported on 64-bit based on https://github.com/eclipse-openj9/openj9/blob/bbd11673d4f8f34489254feb9aa687e32fce6159/runtime/compiler/x/codegen/J9TreeEvaluator.cpp#L1762

Spencer-Comin avatar Sep 10 '25 16:09 Spencer-Comin

No great rush, but can the reviews for this keep moving forward ? It would be nice to have it in a nightly build and do a fresh batch of DaCapo runs (with several other changes already merged now).

vijaysun-omr avatar Sep 17 '25 12:09 vijaysun-omr

Just a reminder to keep the next code complete date (3 weeks or so away I think) in mind, and aim to get this in well before that date, to avoid missing the next release.

vijaysun-omr avatar Oct 21 '25 22:10 vijaysun-omr

what is the latest on this ? will it make the next release ?

vijaysun-omr avatar Nov 04 '25 14:11 vijaysun-omr

@Spencer-Comin @hzongaro : who owns the next step on this PR? Our goal is to have this in for the 0.57 code split on Nov. 14. Thank you.

0xdaryl avatar Nov 10 '25 17:11 0xdaryl

I am addressing testing failures, unless I get those resolved tomorrow unfortunately it is not likely this will make the 0.57 split

Spencer-Comin avatar Nov 12 '25 03:11 Spencer-Comin

Any update on merging this into dev ?

vijaysun-omr avatar Dec 01 '25 17:12 vijaysun-omr

I am working on fixing register dependency issues between the OOL helper call and the mainline. I've gotten access to Bob, so hopefully that provides some new insights, but Bob has told me "This is extremely frustrating".

Spencer-Comin avatar Dec 01 '25 17:12 Spencer-Comin

Can you share what problems you're seeing? I suspect "Daryl" might do a better job than "Bob" for this kind of problem.

0xdaryl avatar Dec 01 '25 18:12 0xdaryl

@0xdaryl my last attempt at resolving the problem hasn't failed local testing yet. I'll update this PR to reflect my development branch in a few minutes once that completes, and point out where I'm seeing problems.

Spencer-Comin avatar Dec 01 '25 18:12 Spencer-Comin