hg: valhalla/valhalla: 8216270: [lworld] C2 compilation fails with Error mixing types: NULL and valuetype[3]

Tobias Hartmann tobias.hartmann at oracle.com
Tue Jan 8 16:14:07 UTC 2019


We attempt to return a ValueTypeNode from an inlined method that also returns NULL (on another
path). We should use a ValueTypePtrNode in this case:
http://cr.openjdk.java.net/~thartmann/8216270/webrev.00/

With the fix, I've noticed that we sometimes fail to scalarize value types at safepoints because we
aggressively link oops of already allocated value types which may keep otherwise unused allocations
alive. I've changed the code to only do this for constant oops to give value type allocations a
better chance to get optimized out.

Thanks,
Tobias

On 08.01.19 17:10, tobias.hartmann at oracle.com wrote:
> Changeset: 530ea41023b2
> Author:    thartmann
> Date:      2019-01-08 17:09 +0100
> URL:       http://hg.openjdk.java.net/valhalla/valhalla/rev/530ea41023b2
> 
> 8216270: [lworld] C2 compilation fails with Error mixing types: NULL and valuetype[3]
> 
> ! src/hotspot/share/opto/callnode.cpp
> ! src/hotspot/share/opto/compile.cpp
> ! src/hotspot/share/opto/macro.cpp
> ! src/hotspot/share/opto/parse1.cpp
> ! src/hotspot/share/opto/valuetypenode.cpp
> ! src/hotspot/share/opto/valuetypenode.hpp
> ! test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConvention.java
> 



More information about the valhalla-dev mailing list