The C2 loop unrolling heuristic takes into account the size of the loop body (in number of Ideal nodes) to decide whether to unroll it or not. In the late barrier expansion model used by ZGC, the size of LoadP, StoreP, and atomic nodes requiring barrier code is underestimated because barriers are hidden from C2. This can lead to over-unrolling.
This RFE proposes extending the C2 Access API to provide C2 with an estimation of the number of Ideal nodes corresponding to each memory access barrier.
This RFE proposes extending the C2 Access API to provide C2 with an estimation of the number of Ideal nodes corresponding to each memory access barrier.