[lworld] Integrated: 8325417: [lworld] Incorrect re-execution state at uncommon traps emitted by acmp
Tobias Hartmann
thartmann at openjdk.org
Thu Feb 8 15:38:11 UTC 2024
On Thu, 8 Feb 2024 13:29:10 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> The `acmp` implementation in C2 uses `Parse::do_if` for pointer comparison and other checks. That method then adds traps to (unstable) if branches that are never taken based on profiling. `OptimizeUnstableIf` would set an incorrect re-execution state because it assumes that there is a 1-1 mapping between the if and the acmp branches and that hitting a trap means that we will take the corresponding acmp branch on re-execution. That is not correct and will lead to pruning of supposedly dead locals and thus incorrect re-execution.
>
> I also had to adjust some tests that incorrectly assumed that we should skip the substitutability test if acmp profiling suggested that the operands are always equal and only keep the pointer comparison. That's not correct because two value objects can be equal/substitutable even if the pointer comparison is false.
>
> Thanks,
> Tobias
This pull request has now been integrated.
Changeset: 2298d933
Author: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/2298d9339eb332a2053bf633d8e710194cacbb06
Stats: 179 lines in 6 files changed: 157 ins; 5 del; 17 mod
8325417: [lworld] Incorrect re-execution state at uncommon traps emitted by acmp
-------------
PR: https://git.openjdk.org/valhalla/pull/1000
More information about the valhalla-dev
mailing list