changeset 13204:ffa3d2d26cc2

Ommit G1 Pre barrier in init writes of instance objects
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Mon, 02 Dec 2013 12:44:53 +0100
parents f9f4503a4ab5
children bef512e42262
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java	Thu Nov 21 15:04:54 2013 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java	Mon Dec 02 12:44:53 2013 +0100
@@ -98,7 +98,9 @@
             }
         } else if (barrierType == BarrierType.IMPRECISE) {
             if (useG1GC()) {
-                addG1PreWriteBarrier(node, node.object(), null, node.location(), true, node.getNullCheck(), graph);
+                if (!node.isInitialization()) {
+                    addG1PreWriteBarrier(node, node.object(), null, node.location(), true, node.getNullCheck(), graph);
+                }
                 addG1PostWriteBarrier(node, node.object(), node.value(), node.location(), false, graph);
             } else {
                 addSerialPostWriteBarrier(node, node.object(), node.value(), node.location(), false, graph);