RFR: 8212818: Allow deferred writes in deoptimization debug info
doug.simon at oracle.com
Mon Nov 5 16:49:49 UTC 2018
> On 1 Nov 2018, at 19:38, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
> Few clarifications need to be done here.
> This optimization is for Graal EA which want to move object reference outside loop so that in loop it look like scalarized object which needs to be reallocated during deoptimization and store a value which is moved from a loop.
> For C2 it should be NOP during code generation and deoptimization.
> I looked only on Hotspot part. I am concern about changes in Deoptimization::realloc_objects(). Method create_stack_value() call is executed unconditionally. You already have check for NULL constant when you check register map. May be it should be general guard check for this new code - to skip this code for C2.
Yes, I'll add such a guard.
> And in which case reg_map could be NULL?
Good question. I'm revising the webrev to be clearer about when/if that can happen. Please hold off further reviewing for now.
> On 11/1/18 3:18 AM, Doug Simon wrote:
>> Can I please get a review for this change that adds support for moving writes into deoptimization code. From the JBS issue:
>> "It can be advantageous to allow certain object field or array element writes to be moved across deoptimization points. For example, a loop may contain a write that is only ever read by code after the loop. Currently, a safepoint at the end of the loop is a deoptimization point that forces the write to be performed within the loop. The write could be moved outside the loop if there was support for the write to be done during deoptimization."
>> This bug adds the VM support for writes to be deferred to deoptimization as well as a Graal-based test for this support.
More information about the hotspot-compiler-dev