# HG changeset patch # User Christian Haeubl # Date 1330977782 28800 # Node ID e77a7d510c85e0399efe3900f1427e0028563c30 # Parent 8e6db1a5c5370c714e37fcf89f0d73a68344942f# Parent df0deec2af088763a8e03d634d7163d04edd862e Merge diff -r 8e6db1a5c537 -r e77a7d510c85 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/DeadCodeEliminationPhase.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/DeadCodeEliminationPhase.java Mon Mar 05 12:01:38 2012 -0800 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/DeadCodeEliminationPhase.java Mon Mar 05 12:03:02 2012 -0800 @@ -44,11 +44,7 @@ // remove chained Merges for (MergeNode merge : graph.getNodes(MergeNode.class)) { if (merge.forwardEndCount() == 1 && !(merge instanceof LoopBeginNode)) { - replacePhis(merge); - EndNode endNode = merge.forwardEndAt(0); - FixedNode next = merge.next(); - merge.safeDelete(); - endNode.replaceAndDelete(next); + graph.reduceTrivialMerge(merge); } } } @@ -96,12 +92,6 @@ } } - private static void replacePhis(MergeNode merge) { - for (PhiNode phi : merge.phis().snapshot()) { - ((StructuredGraph) merge.graph()).replaceFloating(phi, phi.valueAt(0)); - } - } - private void deleteNodes(StructuredGraph graph) { for (Node node : graph.getNodes()) { if (!flood.isMarked(node)) { diff -r 8e6db1a5c537 -r e77a7d510c85 graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/java/NewInstanceNode.java --- a/graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/java/NewInstanceNode.java Mon Mar 05 12:01:38 2012 -0800 +++ b/graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/java/NewInstanceNode.java Mon Mar 05 12:03:02 2012 -0800 @@ -25,6 +25,7 @@ import java.util.*; import com.oracle.max.cri.ri.*; +import com.oracle.max.graal.debug.*; import com.oracle.max.graal.graph.*; import com.oracle.max.graal.nodes.*; import com.oracle.max.graal.nodes.spi.*; @@ -111,14 +112,15 @@ if (current instanceof AccessFieldNode) { AccessFieldNode x = (AccessFieldNode) current; if (x.object() == node) { - int field = fieldIndex.get(((AccessFieldNode) current).field()); + int field = fieldIndex.get(x.field()); + StructuredGraph graph = (StructuredGraph) x.graph(); if (current instanceof LoadFieldNode) { - assert fieldState[field] != null : field + ", " + ((AccessFieldNode) current).field(); + assert fieldState[field] != null : field + ", " + x.field(); x.replaceAtUsages(fieldState[field]); - ((StructuredGraph) x.graph()).removeFixed(x); + graph.removeFixed(x); } else if (current instanceof StoreFieldNode) { fieldState[field] = ((StoreFieldNode) x).value(); - ((StructuredGraph) x.graph()).removeFixed(x); + graph.removeFixed(x); return field; } } diff -r 8e6db1a5c537 -r e77a7d510c85 mx/commands.py --- a/mx/commands.py Mon Mar 05 12:01:38 2012 -0800 +++ b/mx/commands.py Mon Mar 05 12:03:02 2012 -0800 @@ -46,7 +46,7 @@ This can be set via the global '--fastdebug' and '--debug' options. """ _vmbuild = 'product' -_jacoco = False +_jacoco = 'off' _jacocoExcludes = ['com.oracle.max.graal.hotspot.snippets.ArrayCopySnippets', 'com.oracle.max.graal.snippets.DoubleSnippets', @@ -54,7 +54,8 @@ 'com.oracle.max.graal.snippets.MathSnippetsX86', 'com.oracle.max.graal.snippets.NodeClassSnippets', 'com.oracle.max.graal.hotspot.snippets.SystemSnippets', - 'com.oracle.max.graal.hotspot.snippets.UnsafeSnippets'] + 'com.oracle.max.graal.hotspot.snippets.UnsafeSnippets', + 'com.oracle.max.graal.compiler.tests.*'] _copyrightTemplate = """/* * Copyright (c) {0}, Oracle and/or its affiliates. All rights reserved. @@ -485,10 +486,10 @@ mx.expand_project_in_args(args) if mx.java().debug: args = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000'] + args - if _jacoco: + if _jacoco == 'on' or _jacoco == 'append': jacocoagent = mx.library("JACOCOAGENT", True) agentOptions = { - 'append' : 'false', + 'append' : 'true' if _jacoco == 'append' else 'false', 'bootclasspath' : 'true', 'includes' : 'com.oracle.max.*', 'excludes' : ':'.join(_jacocoExcludes) @@ -864,7 +865,7 @@ 'vm': [vm, '[-options] class [args...]'] } - mx.add_argument('--jacoco', action='store_true', dest='jacoco', help='instruments com.oracle.max.* classes using JaCoCo') + mx.add_argument('--jacoco', help='instruments com.oracle.max.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) if (_vmSourcesAvailable): mx.add_argument('--vm', action='store', dest='vm', default='graal', choices=['graal', 'server', 'client'], help='the VM to build/run (default: graal)') @@ -895,6 +896,5 @@ if hasattr(opts, 'vmbuild') and opts.vmbuild is not None: global _vmbuild _vmbuild = opts.vmbuild - if opts.jacoco: - global _jacoco - _jacoco = True + global _jacoco + _jacoco = opts.jacoco diff -r 8e6db1a5c537 -r e77a7d510c85 mxtool/URLConnectionDownload.java --- a/mxtool/URLConnectionDownload.java Mon Mar 05 12:01:38 2012 -0800 +++ b/mxtool/URLConnectionDownload.java Mon Mar 05 12:03:02 2012 -0800 @@ -54,7 +54,7 @@ String proxy = System.getenv("HTTP_PROXY"); if (proxy == null) { - String proxy = System.getenv("http_proxy"); + proxy = System.getenv("http_proxy"); } String proxyMsg = "";