RFR: 8323582: C2 SuperWord AlignVector: misaligned vector memory access with unaligned native memory
Emanuel Peter
epeter at openjdk.org
Tue Feb 18 10:07:18 UTC 2025
On Tue, 18 Feb 2025 09:53:14 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> @rwestrel I only see `if (!C->too_many_traps(reason)) {` in `PhaseIdealLoop::add_parse_predicate`. And as the comment I put here that only checks the `reason` per `method`, and not per `bci`. Do you see anything else?
>
> Seems like it's a bug that `PhaseIdealLoop::add_parse_predicate` doesn't check the `bci` too. Could you fix it?
@rwestrel So we would check both, right? But is that what we want for all predicates?
`C->too_many_traps(reason)` checks against `PerMethodTrapLimit`:
if (trap_count(reason) >= Deoptimization::per_method_trap_limit(reason)) {
But the `bci` check works with `PerBytecodeTrapLimit`, and it actually has a comment like this:
if (md->has_trap_at(bci, m, reason) != 0) {
// Assume PerBytecodeTrapLimit==0, for a more conservative heuristic.
// Also, if there are multiple reasons, or if there is no per-BCI record,
// assume the worst.
So the `bci` check fails if there has been even a single trapping recorded.
So it seems that such a change would affect the behavior in ways I cannot yet predict.
What do you think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22016#discussion_r1959431345
More information about the hotspot-dev
mailing list