On Wed, 26 Apr 2023 17:42:23 GMT, Vladimir Ivanov <vliva...@openjdk.org> wrote:

> Is it possible for an ObjectValue to be shared between multiple merges?

When I posted my previous comment I thought that could happen. But now I 
realize that in the current implementation that won't happen: an ObjectValue is 
created for a combination of Phi x SafePointNode.

However, one situation would _require_ sharing the ObjectValue in multiple 
merges: when different merges share at least one SR input are used as debug 
info _in the same_ SafePointNode. It's required because in the same 
SafePointNode all ObjectValues coming from same Allocate needs to have the same 
value. I think the example below will trigger that - I'll check and patch the 
current implementation to not RAM in that case.


Point p = new Point();
Point q = new Point();
Point r = new Point();
if (cond_one) p = q;
if (cond_two) r = q;
trap(p, q, r);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12897#discussion_r1178259628

Reply via email to