changeset 21873:13c8dfb0ff22

Merge
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 09 Jun 2015 11:56:04 +0200
parents fe0d57a9b79b (diff) 12dcf5ba8b34 (current diff)
children f79218584d37
files
diffstat 7 files changed, 62 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java	Tue Jun 09 11:54:04 2015 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java	Tue Jun 09 11:56:04 2015 +0200
@@ -67,16 +67,12 @@
 
         appendPhase(new CleanTypeProfileProxyPhase(canonicalizer));
 
-        if (FullUnroll.getValue()) {
-            appendPhase(new LoopFullUnrollPhase(canonicalizer));
+        if (OptConvertDeoptsToGuards.getValue()) {
+            appendPhase(new ConvertDeoptimizeToGuardPhase());
         }
 
-        if (PartialEscapeAnalysis.getValue()) {
-            appendPhase(new PartialEscapePhase(true, canonicalizer));
-        }
-
-        if (OptConvertDeoptsToGuards.getValue()) {
-            appendPhase(new ConvertDeoptimizeToGuardPhase());
+        if (FullUnroll.getValue()) {
+            appendPhase(new LoopFullUnrollPhase(canonicalizer));
         }
 
         if (OptLoopTransform.getValue()) {
@@ -87,12 +83,16 @@
                 appendPhase(new LoopUnswitchingPhase());
             }
         }
-        appendPhase(new RemoveValueProxyPhase());
 
         if (OptCanonicalizer.getValue()) {
             appendPhase(canonicalizer);
         }
 
+        if (PartialEscapeAnalysis.getValue()) {
+            appendPhase(new PartialEscapePhase(true, canonicalizer));
+        }
+        appendPhase(new RemoveValueProxyPhase());
+
         appendPhase(new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER));
     }
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java	Tue Jun 09 11:54:04 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java	Tue Jun 09 11:56:04 2015 +0200
@@ -327,7 +327,7 @@
         }
     }
 
-    private static void lowerLoadMethodNode(LoadMethodNode loadMethodNode) {
+    private void lowerLoadMethodNode(LoadMethodNode loadMethodNode) {
         StructuredGraph graph = loadMethodNode.graph();
         HotSpotResolvedJavaMethod method = (HotSpotResolvedJavaMethod) loadMethodNode.getMethod();
         ReadNode metaspaceMethod = createReadVirtualMethod(graph, loadMethodNode.getHub(), method, loadMethodNode.getReceiverType());
@@ -446,11 +446,11 @@
         return false;
     }
 
-    private static ReadNode createReadVirtualMethod(StructuredGraph graph, ValueNode hub, HotSpotResolvedJavaMethod method, ResolvedJavaType receiverType) {
+    private ReadNode createReadVirtualMethod(StructuredGraph graph, ValueNode hub, HotSpotResolvedJavaMethod method, ResolvedJavaType receiverType) {
         return createReadVirtualMethod(graph, hub, method.vtableEntryOffset(receiverType));
     }
 
-    private static ReadNode createReadVirtualMethod(StructuredGraph graph, ValueNode hub, int vtableEntryOffset) {
+    private ReadNode createReadVirtualMethod(StructuredGraph graph, ValueNode hub, int vtableEntryOffset) {
         assert vtableEntryOffset > 0;
         // We use LocationNode.ANY_LOCATION for the reads that access the vtable
         // entry as HotSpot does not guarantee that this is a final value.
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java	Tue Jun 09 11:54:04 2015 +0200
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java	Tue Jun 09 11:56:04 2015 +0200
@@ -127,8 +127,8 @@
         GraphUtil.removeFixedWithUnusedInputs(n);
     }
 
-    protected static AddressNode createOffsetAddress(StructuredGraph graph, ValueNode object, long offset) {
-        ValueNode o = ConstantNode.forLong(offset, graph);
+    protected AddressNode createOffsetAddress(StructuredGraph graph, ValueNode object, long offset) {
+        ValueNode o = ConstantNode.forIntegerKind(target.wordKind, offset, graph);
         return graph.unique(new OffsetAddressNode(object, o));
     }
 
@@ -188,13 +188,19 @@
     }
 
     public AddressNode createArrayAddress(StructuredGraph graph, ValueNode array, Kind elementKind, ValueNode index) {
-        ValueNode longIndex = graph.unique(new SignExtendNode(index, 64));
+        ValueNode wordIndex;
+        if (target.wordSize > 4) {
+            wordIndex = graph.unique(new SignExtendNode(index, target.wordSize * 8));
+        } else {
+            assert target.wordSize == 4 : "unsupported word size";
+            wordIndex = index;
+        }
 
         int shift = CodeUtil.log2(arrayScalingFactor(elementKind));
-        ValueNode scaledIndex = graph.unique(new LeftShiftNode(longIndex, ConstantNode.forInt(shift, graph)));
+        ValueNode scaledIndex = graph.unique(new LeftShiftNode(wordIndex, ConstantNode.forInt(shift, graph)));
 
         int base = arrayBaseOffset(elementKind);
-        ValueNode offset = graph.unique(new AddNode(scaledIndex, ConstantNode.forLong(base, graph)));
+        ValueNode offset = graph.unique(new AddNode(scaledIndex, ConstantNode.forIntegerKind(target.wordKind, base, graph)));
 
         return graph.unique(new OffsetAddressNode(array, offset));
     }
--- a/make/jvmci.make	Tue Jun 09 11:54:04 2015 +0200
+++ b/make/jvmci.make	Tue Jun 09 11:56:04 2015 +0200
@@ -1,5 +1,5 @@
 # This Makefile is generated automatically, do not edit
-# This file was built with the command: mx.sh makefile -o make/jvmci.make
+# This file was built with the command: mx.sh makefile -o ./make/jvmci.make
 
 TARGET=.
 # Bootstrap JDK to be used (for javac and jar)
@@ -57,34 +57,34 @@
 
 JDK_BOOTCLASSPATH = $(ABS_BOOTDIR)/jre/lib/resources.jar:$(ABS_BOOTDIR)/jre/lib/rt.jar:$(ABS_BOOTDIR)/jre/lib/jsse.jar:$(ABS_BOOTDIR)/jre/lib/jce.jar:$(ABS_BOOTDIR)/jre/lib/charsets.jar:$(ABS_BOOTDIR)/jre/lib/jfr.jar
 
-JVMCI_OPTIONS_PROCESSOR_SRC = $(shell find jvmci/com.oracle.jvmci.options/src -type f -name *.java 2> /dev/null)
-JVMCI_OPTIONS_PROCESSOR_SRC += $(shell find jvmci/com.oracle.jvmci.options.processor/src -type f -name *.java 2> /dev/null)
+JVMCI_OPTIONS_PROCESSOR_SRC = $(shell find jvmci/com.oracle.jvmci.options/src -type f -name '*.java' 2> /dev/null)
+JVMCI_OPTIONS_PROCESSOR_SRC += $(shell find jvmci/com.oracle.jvmci.options.processor/src -type f -name '*.java' 2> /dev/null)
 
 JVMCI_OPTIONS_PROCESSOR_JAR = $(TARGET)/jvmci/com.oracle.jvmci.options.processor/ap/com.oracle.jvmci.options.processor.jar
 
-JVMCI_HOTSPOTVMCONFIG_PROCESSOR_SRC = $(shell find jvmci/com.oracle.jvmci.hotspotvmconfig/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOTVMCONFIG_PROCESSOR_SRC += $(shell find jvmci/com.oracle.jvmci.common/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOTVMCONFIG_PROCESSOR_SRC += $(shell find jvmci/com.oracle.jvmci.hotspotvmconfig.processor/src -type f -name *.java 2> /dev/null)
+JVMCI_HOTSPOTVMCONFIG_PROCESSOR_SRC = $(shell find jvmci/com.oracle.jvmci.hotspotvmconfig/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOTVMCONFIG_PROCESSOR_SRC += $(shell find jvmci/com.oracle.jvmci.common/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOTVMCONFIG_PROCESSOR_SRC += $(shell find jvmci/com.oracle.jvmci.hotspotvmconfig.processor/src -type f -name '*.java' 2> /dev/null)
 
 JVMCI_HOTSPOTVMCONFIG_PROCESSOR_JAR = $(TARGET)/jvmci/com.oracle.jvmci.hotspotvmconfig.processor/ap/com.oracle.jvmci.hotspotvmconfig.processor.jar
 
-JVMCI_SERVICE_PROCESSOR_SRC = $(shell find jvmci/com.oracle.jvmci.service/src -type f -name *.java 2> /dev/null)
-JVMCI_SERVICE_PROCESSOR_SRC += $(shell find jvmci/com.oracle.jvmci.service.processor/src -type f -name *.java 2> /dev/null)
+JVMCI_SERVICE_PROCESSOR_SRC = $(shell find jvmci/com.oracle.jvmci.service/src -type f -name '*.java' 2> /dev/null)
+JVMCI_SERVICE_PROCESSOR_SRC += $(shell find jvmci/com.oracle.jvmci.service.processor/src -type f -name '*.java' 2> /dev/null)
 
 JVMCI_SERVICE_PROCESSOR_JAR = $(TARGET)/jvmci/com.oracle.jvmci.service.processor/ap/com.oracle.jvmci.service.processor.jar
 
-JVMCI_API_SRC = $(shell find jvmci/com.oracle.jvmci.meta/src -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.meta/jvmci/com.oracle.jvmci.meta/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.code/src -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.code/jvmci/com.oracle.jvmci.code/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.runtime/src -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.runtime/jvmci/com.oracle.jvmci.runtime/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.options/src -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.options/jvmci/com.oracle.jvmci.options/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.common/src -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.common/jvmci/com.oracle.jvmci.common/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.debug/src -type f -name *.java 2> /dev/null)
-JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.debug/jvmci/com.oracle.jvmci.debug/src_gen -type f -name *.java 2> /dev/null)
+JVMCI_API_SRC = $(shell find jvmci/com.oracle.jvmci.meta/src -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.meta/jvmci/com.oracle.jvmci.meta/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.code/src -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.code/jvmci/com.oracle.jvmci.code/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.runtime/src -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.runtime/jvmci/com.oracle.jvmci.runtime/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.options/src -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.options/jvmci/com.oracle.jvmci.options/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.common/src -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.common/jvmci/com.oracle.jvmci.common/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.debug/src -type f -name '*.java' 2> /dev/null)
+JVMCI_API_SRC += $(shell find jvmci/com.oracle.jvmci.debug/jvmci/com.oracle.jvmci.debug/src_gen -type f -name '*.java' 2> /dev/null)
 
 JVMCI_API_JAR = $(TARGET)/build/jvmci-api.jar
 
@@ -92,7 +92,7 @@
 
 EXPORTED_FILES += $(JVMCI_API_JAR)
 
-JVMCI_SERVICE_SRC = $(shell find jvmci/com.oracle.jvmci.service/src -type f -name *.java 2> /dev/null)
+JVMCI_SERVICE_SRC = $(shell find jvmci/com.oracle.jvmci.service/src -type f -name '*.java' 2> /dev/null)
 
 JVMCI_SERVICE_JAR = $(TARGET)/build/jvmci-service.jar
 
@@ -100,22 +100,22 @@
 
 EXPORTED_FILES += $(JVMCI_SERVICE_JAR)
 
-JVMCI_HOTSPOT_SRC = $(shell find jvmci/com.oracle.jvmci.hotspotvmconfig/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspotvmconfig/jvmci/com.oracle.jvmci.hotspotvmconfig/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.amd64/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.amd64/jvmci/com.oracle.jvmci.amd64/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.compiler/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.compiler/jvmci/com.oracle.jvmci.compiler/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot/jvmci/com.oracle.jvmci.hotspot/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.amd64/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.amd64/jvmci/com.oracle.jvmci.hotspot.amd64/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.sparc/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.sparc/jvmci/com.oracle.jvmci.sparc/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.sparc/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.sparc/jvmci/com.oracle.jvmci.hotspot.sparc/src_gen -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.jfr/src -type f -name *.java 2> /dev/null)
-JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.jfr/jvmci/com.oracle.jvmci.hotspot.jfr/src_gen -type f -name *.java 2> /dev/null)
+JVMCI_HOTSPOT_SRC = $(shell find jvmci/com.oracle.jvmci.hotspotvmconfig/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspotvmconfig/jvmci/com.oracle.jvmci.hotspotvmconfig/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.amd64/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.amd64/jvmci/com.oracle.jvmci.amd64/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.compiler/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.compiler/jvmci/com.oracle.jvmci.compiler/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot/jvmci/com.oracle.jvmci.hotspot/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.amd64/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.amd64/jvmci/com.oracle.jvmci.hotspot.amd64/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.sparc/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.sparc/jvmci/com.oracle.jvmci.sparc/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.sparc/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.sparc/jvmci/com.oracle.jvmci.hotspot.sparc/src_gen -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.jfr/src -type f -name '*.java' 2> /dev/null)
+JVMCI_HOTSPOT_SRC += $(shell find jvmci/com.oracle.jvmci.hotspot.jfr/jvmci/com.oracle.jvmci.hotspot.jfr/src_gen -type f -name '*.java' 2> /dev/null)
 
 JVMCI_HOTSPOT_JAR = $(TARGET)/build/jvmci-hotspot.jar
 
--- a/mx/mx_graal_makefile.py	Tue Jun 09 11:54:04 2015 +0200
+++ b/mx/mx_graal_makefile.py	Tue Jun 09 11:56:04 2015 +0200
@@ -113,7 +113,7 @@
 
             for d in p.srcDirs + generatedSource:
                 src = projectDir + os.path.sep + d
-                sources.append("$(shell find {} -type f -name *.java 2> /dev/null)".format(src))
+                sources.append("$(shell find {} -type f -name '*.java' 2> /dev/null)".format(src))
                 metaInf = src + os.path.sep + "META-INF"
                 if os.path.exists(metaInf):
                     resources.append(metaInf)
--- a/mx/suite.py	Tue Jun 09 11:54:04 2015 +0200
+++ b/mx/suite.py	Tue Jun 09 11:56:04 2015 +0200
@@ -1020,6 +1020,7 @@
         "com.oracle.graal.java",
         "com.oracle.graal.compiler",
       ],
+      "annotationProcessors" : ["com.oracle.jvmci.service.processor"],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : "1.8",
       "workingSets" : "Graal,Graph",
--- a/mxtool/mx.py	Tue Jun 09 11:54:04 2015 +0200
+++ b/mxtool/mx.py	Tue Jun 09 11:56:04 2015 +0200
@@ -651,7 +651,6 @@
         if canSymlink and 'symlink' in dir(os):
             if exists(path):
                 os.unlink(path)
-            print 'Path ' + cachePath + ' path: ' + path
             os.symlink(cachePath, path)
         else:
             shutil.copy(cachePath, path)