[13] 8221592: C2 compilation failed with assert(!q->is_MergeMem())
Tobias Hartmann
tobias.hartmann at oracle.com
Mon Apr 29 09:08:15 UTC 2019
Hi Vladimir,
Sorry, I've already pushed this patch before you've sent the email (but for some reason, the
hgupdater didn't pick it up yet - maybe it's still down for maintenance).
On 29.04.19 09:15, Vladimir Ivanov wrote:
> src/hotspot/share/opto/parse1.cpp:
>
> + _gvn.transform(_exits.merged_memory());
>
> I'm curious why the node isn't put on worklist when it is created/modified. It seems it should have
> solved the problem.
The 41744 Phi (see IR below) is created in Parse::build_exits() and intentionally not transformed
until do_exits() as this comment suggests:
http://hg.openjdk.java.net/jdk/jdk/file/2f4393ec54d4/src/hotspot/share/opto/parse1.cpp#l771
The MergeMem input is then added in return_current():
http://hg.openjdk.java.net/jdk/jdk/file/2f4393ec54d4/src/hotspot/share/opto/parse1.cpp#l2196
Putting the _exits.merged_memory() node on the igvn worklist during creation wouldn't help because
we don't execute a round of igvn between parsing of the inlined callee (where build_exits() creates
the node) and parsing of the caller (where the assert happens).
> Also, the code around usually does it a bit differently. For example, Parse::do_all_blocks():
>
> Node* result = _gvn.transform_no_reclaim(control());
> ...
> if (result != top()) {
> record_for_igvn(result);
Do you mean that I should record the transformed _exits.merged_memory() for igvn in do_exits()? I
don't think that's necessary.
Thanks,
Tobias
37057 MergeMem === _ 1 37093 37094 1 1 37095 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
37096 1 1 37097 1 1 1 1 1 37098 37099 37100 37101 37102 37103 37104 37105 [[ 37058
37064 37070 37077 37083 19776 19759 19760 4968 4968 18862 41708 41716 41718 41726
41730 41738 41740 41748 41744 ]] ...
41744 Phi === 41742 37057 [[ 41745 ]] #memory Memory: @BotPTR *+bot, idx=Bot; ...
41745 MergeMem === _ 1 41744 41751 1 1 41752 1 1 1 1 1 1 1 41753 1 1 1 1 1 1 1
1 1 1 1 41754 [[ 41741 ]] ...
More information about the hotspot-compiler-dev
mailing list