RFR: 8252219: C2: Randomize IGVN worklist for stress testing [v3]
Christian Hagedorn
chagedorn at openjdk.java.net
Wed Sep 23 16:51:04 UTC 2020
On Wed, 23 Sep 2020 14:17:25 GMT, Roberto Castañeda Lozano <github.com+8792647+robcasloz at openjdk.org> wrote:
>> src/hotspot/share/opto/compile.cpp line 4462:
>>
>>> 4460: void Compile::shuffle(Unique_Node_List* l) {
>>> 4461: if (l->size() < 2) return;
>>> 4462: for (uint i = l->size() - 1; i >= 1; i--) {
>>
>> You can remove the if-check as the loop check already covers it (loop is only executed if size >= 2).
>
> Note that `size()` could be 0, leading `l->size() - 1` to underflow.
You're right, it's `uint` and not `int` - then you can leave it as it is.
-------------
PR: https://git.openjdk.java.net/jdk/pull/242
More information about the hotspot-compiler-dev
mailing list