Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotReferenceMap.java @ 21731:df9d2375512a
Track max live register value in reference map
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Wed, 03 Jun 2015 20:24:05 -0700 |
parents | b9f9b8af17ff |
children |
line wrap: on
line diff
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotReferenceMap.java Wed Jun 03 19:57:38 2015 -0700 +++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotReferenceMap.java Wed Jun 03 20:24:05 2015 -0700 @@ -33,6 +33,7 @@ private Value[] objects; private int[] bytesPerElement; + private int maxRegisterSize; private ArrayList<Value> objectValues; private final TargetDescription target; @@ -47,6 +48,7 @@ objectValues = new ArrayList<>(); objects = Value.NO_VALUES; bytesPerElement = null; + maxRegisterSize = 0; } @Override @@ -58,6 +60,12 @@ if (!lirKind.isValue()) { objectValues.add(v); } + if (isRegister(v)) { + int size = target.getSizeInBytes(lirKind.getPlatformKind()); + if (size > maxRegisterSize) { + maxRegisterSize = size; + } + } } @Override