RFR: 8297294: compiler/c2/irTests/TestMulNodeIdealization.java failed compilation
Vicente Romero
vromero at openjdk.org
Wed Nov 30 20:01:38 UTC 2022
On Wed, 30 Nov 2022 18:20:22 GMT, Archie L. Cobbs <duke at openjdk.org> wrote:
> So just to confirm: while clearly changing `HashSet` to `LinkedHashSet` is going to eliminate some non-determinism, it also fixes the actual compiler logic bug rather than "papering over" it, correct?
>
> If not - then is more investigation warranted?
>
> If so - then doesn't that imply that the code that invokes `closure()` contains an implicit assumption about the ordering of the elements of that returned `Set`? And if so, since that's a fairly subtle and suspicious assumption about a `Set`, shouldn't that assumption least be documented in a comment somewhere (or ideally, corrected by sorting the `Set` into a `List` or something)? Otherwise it seems a variant of this bug could easily crop up again.
It is not clear that there is a compiler bug as the code is compiled sometimes and sometimes not. This patch is not claiming to fix the bug as a compiler failure can't be reproduced. All I want is to make the inference engine as deterministic as possible.
-------------
PR: https://git.openjdk.org/jdk/pull/11437
More information about the compiler-dev
mailing list