Mercurial > hg > graal-jvmci-8
changeset 12446:4811a78ced14
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 16 Oct 2013 03:03:34 +0200 |
parents | 66efe95dd46b (diff) 43e004461248 (current diff) |
children | 97fe8342a90f |
files | graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/ForEachToGraal.java graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/HSAILBackend.java graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/HSAILCompilationResult.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRuntime.java graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotRuntime.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRuntime.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java |
diffstat | 11 files changed, 38 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Wed Oct 16 03:03:34 2013 +0200 @@ -194,7 +194,7 @@ ServiceLoader<ReplacementsProvider> serviceLoader = ServiceLoader.loadInstalled(ReplacementsProvider.class); TargetDescription target = providers.getCodeCache().getTarget(); for (ReplacementsProvider provider : serviceLoader) { - provider.registerReplacements(metaAccess, replacements, target); + provider.registerReplacements(metaAccess, providers.getLowerer(), replacements, target); } providers.getForeignCalls().initialize(providers); HotSpotLoweringProvider lowerer = (HotSpotLoweringProvider) providers.getLowerer();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CallSiteSubstitutions.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CallSiteSubstitutions.java Wed Oct 16 03:03:34 2013 +0200 @@ -34,7 +34,7 @@ public class CallSiteSubstitutions implements ReplacementsProvider { @Override - public void registerReplacements(MetaAccessProvider metaAccess, Replacements replacements, TargetDescription target) { + public void registerReplacements(MetaAccessProvider metaAccess, LoweringProvider loweringProvider, Replacements replacements, TargetDescription target) { replacements.registerSubstitutions(ConstantCallSiteSubstitutions.class); replacements.registerSubstitutions(MutableCallSiteSubstitutions.class); replacements.registerSubstitutions(VolatileCallSiteSubstitutions.class);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java Wed Oct 16 03:03:34 2013 +0200 @@ -75,7 +75,9 @@ } public static ConstantNode forConstant(Constant constant, MetaAccessProvider metaAccess, Graph graph) { - if (constant.getKind() == Kind.Object) { + if (constant.getKind().getStackKind() == Kind.Int && constant.getKind() != Kind.Int) { + return forInt(constant.asInt(), graph); + } else if (constant.getKind() == Kind.Object) { return graph.unique(new ConstantNode(constant, metaAccess)); } else { return graph.unique(new ConstantNode(constant)); @@ -142,7 +144,7 @@ * @return a node representing the boolean */ public static ConstantNode forBoolean(boolean i, Graph graph) { - return graph.unique(new ConstantNode(Constant.forBoolean(i))); + return graph.unique(new ConstantNode(Constant.forInt(i ? 1 : 0))); } /** @@ -153,7 +155,7 @@ * @return a node representing the byte */ public static ConstantNode forByte(byte i, Graph graph) { - return graph.unique(new ConstantNode(Constant.forByte(i))); + return graph.unique(new ConstantNode(Constant.forInt(i))); } /** @@ -164,7 +166,7 @@ * @return a node representing the char */ public static ConstantNode forChar(char i, Graph graph) { - return graph.unique(new ConstantNode(Constant.forChar(i))); + return graph.unique(new ConstantNode(Constant.forInt(i))); } /** @@ -175,7 +177,7 @@ * @return a node representing the short */ public static ConstantNode forShort(short i, Graph graph) { - return graph.unique(new ConstantNode(Constant.forShort(i))); + return graph.unique(new ConstantNode(Constant.forInt(i))); } /** @@ -217,7 +219,6 @@ public static ConstantNode defaultForKind(Kind kind, Graph graph) { switch (kind) { case Boolean: - return ConstantNode.forBoolean(false, graph); case Byte: case Char: case Short:
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java Wed Oct 16 03:03:34 2013 +0200 @@ -65,7 +65,7 @@ int entryIndex = state.getVirtualObject().entryIndexForOffset(offset); if (entryIndex != -1) { ValueNode entry = state.getEntry(entryIndex); - if (entry.kind() == accessKind() || state.getVirtualObject().entryKind(entryIndex) == accessKind()) { + if (entry.kind() == kind() || state.getVirtualObject().entryKind(entryIndex) == accessKind()) { tool.replaceWith(entry); } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java Wed Oct 16 03:03:34 2013 +0200 @@ -82,7 +82,7 @@ int entryIndex = state.getVirtualObject().entryIndexForOffset(offset); if (entryIndex != -1) { ValueNode entry = state.getEntry(entryIndex); - if (entry.kind() == this.accessKind() || state.getVirtualObject().entryKind(entryIndex) == this.accessKind()) { + if (entry.kind() == value.kind() || state.getVirtualObject().entryKind(entryIndex) == accessKind()) { tool.setVirtualEntry(state, entryIndex, value()); tool.delete(); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/ReplacementsProvider.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/ReplacementsProvider.java Wed Oct 16 03:03:34 2013 +0200 @@ -30,5 +30,5 @@ */ public interface ReplacementsProvider { - void registerReplacements(MetaAccessProvider metaAccess, Replacements replacements, TargetDescription target); + void registerReplacements(MetaAccessProvider metaAccess, LoweringProvider lowerer, Replacements replacements, TargetDescription target); }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraalMethodSubstitutions.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraalMethodSubstitutions.java Wed Oct 16 03:03:34 2013 +0200 @@ -35,7 +35,7 @@ @ServiceProvider(ReplacementsProvider.class) public class GraalMethodSubstitutions implements ReplacementsProvider { - public void registerReplacements(MetaAccessProvider metaAccess, Replacements replacements, TargetDescription target) { + public void registerReplacements(MetaAccessProvider metaAccess, LoweringProvider loweringProvider, Replacements replacements, TargetDescription target) { for (Class<?> clazz : BoxingSubstitutions.getClasses()) { replacements.registerSubstitutions(clazz); }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Wed Oct 16 03:03:34 2013 +0200 @@ -56,7 +56,7 @@ @Option(help = "") public static final OptionValue<Boolean> TruffleFunctionInlining = new OptionValue<>(true); @Option(help = "") - public static final OptionValue<Integer> TruffleGraphMaxNodes = new OptionValue<>(20000); + public static final OptionValue<Integer> TruffleGraphMaxNodes = new OptionValue<>(25000); @Option(help = "") public static final OptionValue<Integer> TruffleInliningMaxRecursiveDepth = new OptionValue<>(2); @Option(help = "")
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/NewFrameNode.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/NewFrameNode.java Wed Oct 16 03:03:34 2013 +0200 @@ -186,8 +186,14 @@ } private ValueNode initialValue(FrameSlotKind kind) { - Kind graalKind = Kind.Long; + Kind graalKind = null; switch (kind) { + case Boolean: + graalKind = Kind.Boolean; + break; + case Byte: + graalKind = Kind.Byte; + break; case Int: graalKind = Kind.Int; break; @@ -197,9 +203,17 @@ case Float: graalKind = Kind.Float; break; - case Boolean: - graalKind = Kind.Boolean; + case Long: + graalKind = Kind.Long; + break; + case Object: + graalKind = Kind.Object; break; + case Illegal: + graalKind = Kind.Long; + break; + default: + throw new IllegalStateException("Unexpected frame slot kind: " + kind); } return ConstantNode.defaultForKind(graalKind, graph());
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomizedUnsafeLoadMacroNode.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomizedUnsafeLoadMacroNode.java Wed Oct 16 03:03:34 2013 +0200 @@ -61,9 +61,11 @@ } else { locationIdentity = ObjectLocationIdentity.create(locationIdentityObject); } - return graph().add( - new UnsafeLoadNode(objectArgument, offsetArgument, this.stamp().kind(), locationIdentity, CompareNode.createCompareNode(Condition.EQ, conditionArgument, - ConstantNode.forBoolean(true, graph())))); + Node result = graph().add( + new UnsafeLoadNode(objectArgument, offsetArgument, this.getTargetMethod().getSignature().getReturnKind(), locationIdentity, CompareNode.createCompareNode(Condition.EQ, + conditionArgument, ConstantNode.forBoolean(true, graph())))); + + return result; } return this; }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomizedUnsafeStoreMacroNode.java Wed Oct 16 01:12:47 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomizedUnsafeStoreMacroNode.java Wed Oct 16 03:03:34 2013 +0200 @@ -61,7 +61,8 @@ locationIdentity = ObjectLocationIdentity.create(locationIdentityObject); } - UnsafeStoreNode unsafeStoreNode = graph().add(new UnsafeStoreNode(objectArgument, offsetArgument, valueArgument, valueArgument.kind(), locationIdentity)); + UnsafeStoreNode unsafeStoreNode = graph().add( + new UnsafeStoreNode(objectArgument, offsetArgument, valueArgument, this.getTargetMethod().getSignature().getParameterKind(VALUE_ARGUMENT_INDEX), locationIdentity)); unsafeStoreNode.setStateAfter(this.stateAfter()); return unsafeStoreNode; }