RFR(M): 8146612: C2: Precedence edges specification violated
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Jan 7 22:07:34 UTC 2016
// Avoid spec violation: multiple prec edge.
I think should be:
// Avoid spec violation: duplicated prec edge.
Should we add assert to rm_prec()?:
assert(j >= _cnt, "not a precedence edge");
Also we may need to check that input index is < _max in set_prec() and rm_prec().
Next access will be outside _in array if j == _max-1 (in rm_prec()):
_in[i] = NULL; // NULL out last element
unless we guarantee that there is always NULL at the end. Which I don't see because set_prec() may set the last prec
edge to not NULL.
Please factor out similar code (search for last non-NULL prec edge) in del_req(), del_req_ordered() and rm_prec() into
separate method.
Thanks,
Vladimir
On 1/7/16 5:45 AM, Doerr, Martin wrote:
> Hi,
>
> some time ago, we found out, that C2 doesn’t treat precedence edges as specified.
>
> The description of precedence edges in node.hpp says:
>
> "They are unordered and not duplicated; they have no embedded NULLs."
>
> Some functions in the current implementation violate this specification.
>
> I have fixed this in the following webrev:
>
> http://cr.openjdk.java.net/~mdoerr/8146612_C2_prec_edges/webrev.00/
>
> Please review. I will need a sponsor, please.
>
> Best regards,
>
> Martin
>
More information about the hotspot-compiler-dev
mailing list