RFR: 8212818: Allow deferred writes in deoptimization debug info

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Nov 1 18:38:47 UTC 2018

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.

And in which case reg_map could be NULL?


On 11/1/18 3:18 AM, Doug Simon wrote:
> Hi,
> 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.
> https://bugs.openjdk.java.net/browse/JDK-8212818
> http://cr.openjdk.java.net/~dnsimon/8212818
> -Doug

More information about the hotspot-compiler-dev mailing list