RFR: 8265132 : C2 compilation fails with assert "missing precedence edge" [v4]
Jamsheed Mohammed C M
jcm at openjdk.java.net
Fri Jun 18 04:50:29 UTC 2021
On Fri, 18 Jun 2021 02:42:14 GMT, Dean Long <dlong at openjdk.org> wrote:
>> LCA was schedule late location for the load after gcm schedule late and that is null block for the store.I tried improving the fix
>> saying if null block for the store dominates load block then ignore the case.
>
> Can you think of a case where store_null_check != NULL, and the following are not true?
>> LCA == store_null_block
>> get_block_for_node(null_block_region)->dominates(get_block_for_node(load))
>
> It sounds like you expect LCA == store_null_block to always be true. Do you have an example where the dominates check would not be true? If both are are preconditions that are always true, then how about making them asserts?
>
>> assert(null_block_region != NULL, "null check without null region");
>> assert(LCA == store_null_block, "wrong LCA");
>> assert(get_block_for_node(null_block_region)->dominates(get_block_for_node(load)), "does not dominate");
>> return true;
if LCA is above null block(ie. null_check block itself or above it) means it has uses in other places . for null_check block anti dependency will be taken care in implicit null logic. above it doesn't actually matter for our considering case i guess.
i kept dominate logic as it is more broad than equating with LCA (that means even if there are multiple basic blocks in null path the assert holds good)
-------------
PR: https://git.openjdk.java.net/jdk/pull/4200
More information about the hotspot-compiler-dev
mailing list