Skip to content
Permalink
Browse files

8235927: Update Graal

Reviewed-by: kvn
  • Loading branch information
Igor Veresov
Igor Veresov committed Dec 19, 2019
1 parent cfddf53 commit 261f4bffae802c19cec6332f00d1a70b78e5400f
Showing with 1,131 additions and 167 deletions.
  1. +16 −0 ...dk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/BinaryContainer.java
  2. +6 −3 src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/MarkProcessor.java
  3. +4 −7 ...iler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java
  4. +5 −8 ....directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java
  5. +4 −7 ...ompiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java
  6. +311 −0 ....aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64LoadStoreMergingAssemblerTest.java
  7. +24 −5 ...asses/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java
  8. +189 −2 .../org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java
  9. +87 −0 ...mpiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64PairLoadStoreTest.java
  10. +5 −0 ...graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java
  11. +9 −0 ...asses/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java
  12. +2 −4 ...graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java
  13. +2 −3 ...re/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java
  14. +13 −7 .../classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java
  15. +2 −4 ...ses/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java
  16. +9 −1 ...lasses/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java
  17. +1 −1 ...are/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SubprocessTest.java
  18. +1 −1 ...e/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsage.java
  19. +4 −7 ...asses/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java
  20. +13 −0 ...ompiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugContext.java
  21. +6 −2 ....compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java
  22. +12 −3 ...raalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java
  23. +1 −1 ...iler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/BenchmarkCounterOverflowTest.java
  24. +4 −4 ...m.compiler.hotspot.sparc.test/src/org/graalvm/compiler/hotspot/sparc/test/SPARCAllocatorTest.java
  25. +16 −3 ...raalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java
  26. +15 −23 ...g.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompilationWrapperTest.java
  27. +2 −1 ....graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ReservedStackAccessTest.java
  28. +1 −0 ...e/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
  29. +3 −0 .../org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigVersioned.java
  30. +6 −9 ...sses/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java
  31. +21 −3 ...re/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java
  32. +14 −4 ...e/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Unary.java
  33. +11 −0 ...e/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java
  34. +247 −43 ...ompiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java
  35. +1 −1 ...replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java
  36. +1 −1 .../org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java
  37. +63 −9 ...ompiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java
@@ -31,6 +31,7 @@
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -43,6 +44,7 @@
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.serviceprovider.JavaVersionUtil;

/**
* A format-agnostic container class that holds various components of a binary.
@@ -67,6 +69,8 @@

private final int codeEntryAlignment;

private final boolean threadLocalHandshakes;

/**
* Container holding code bits and any other related information.
*/
@@ -292,6 +296,8 @@ public BinaryContainer(OptionValues graalOptions, GraalHotSpotVMConfig graalHotS

this.codeEntryAlignment = graalHotSpotVMConfig.codeEntryAlignment;

this.threadLocalHandshakes = graalHotSpotVMConfig.threadLocalHandshakes;

// Section unique name is limited to 8 characters due to limitation on Windows.
// Name could be longer but only first 8 characters are stored on Windows.

@@ -350,6 +356,12 @@ private void recordConfiguration(GraalHotSpotVMConfig graalHotSpotVMConfig, Grap
// @formatter:on
// @Checkstyle: resume

if (JavaVersionUtil.JAVA_SPEC < 14) {
// See JDK-8220049. Thread local handshakes are on by default since JDK14, the command line option has been removed.
booleanFlags = Arrays.copyOf(booleanFlags, booleanFlags.length + 1);
booleanFlags[booleanFlags.length - 1] = graalHotSpotVMConfig.threadLocalHandshakes;
}

byte[] booleanFlagsAsBytes = flagsToByteArray(booleanFlags);
int size0 = configContainer.getByteStreamSize();

@@ -449,6 +461,10 @@ public int getCodeEntryAlignment() {
return codeEntryAlignment;
}

public boolean getThreadLocalHandshakes() {
return threadLocalHandshakes;
}

/**
* Gets the global AOT symbol associated with the function name.
*
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -56,8 +56,11 @@ void process(CompiledMethodInfo methodInfo, Mark mark) {
break;
case POLL_FAR:
case POLL_RETURN_FAR:
// skip relocation
break;
if (binaryContainer.getThreadLocalHandshakes()) {
// skip relocation
break;
}
// fallthrough
case CARD_TABLE_ADDRESS:
case HEAP_TOP_ADDRESS:
case HEAP_END_ADDRESS:
@@ -29,16 +29,13 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.junit.Assert;
import org.junit.Test;

import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.core.test.GraalCompilerTest;
import org.graalvm.compiler.nodes.ParameterNode;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.graalvm.compiler.phases.OptimisticOptimizations.Optimization;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Assert;
import org.junit.Test;

/**
* Tests for {@link GraalDirectives#blackhole}.
@@ -134,8 +131,8 @@ public void testObject() {
}

@Override
protected HighTierContext getDefaultHighTierContext() {
return new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL.remove(Optimization.RemoveNeverExecutedCode));
protected OptimisticOptimizations getOptimisticOptimizations() {
return OptimisticOptimizations.ALL.remove(OptimisticOptimizations.Optimization.RemoveNeverExecutedCode);
}

@Override
@@ -33,9 +33,6 @@
import java.util.Collections;
import java.util.List;

import org.junit.Assert;
import org.junit.Test;

import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.core.test.GraalCompilerTest;
import org.graalvm.compiler.graph.Node;
@@ -46,11 +43,11 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.debug.ControlFlowAnchorNode;
import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.junit.Assert;
import org.junit.Test;

import jdk.vm.ci.meta.ResolvedJavaMethod;
import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.graalvm.compiler.phases.OptimisticOptimizations.Optimization;
import org.graalvm.compiler.phases.tiers.HighTierContext;

public class ControlFlowAnchorDirectiveTest extends GraalCompilerTest {

@@ -244,8 +241,8 @@ public void testClone() {
}

@Override
protected HighTierContext getDefaultHighTierContext() {
return new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL.remove(Optimization.RemoveNeverExecutedCode));
protected OptimisticOptimizations getOptimisticOptimizations() {
return OptimisticOptimizations.ALL.remove(OptimisticOptimizations.Optimization.RemoveNeverExecutedCode);
}

@Override
@@ -29,9 +29,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.junit.Assert;
import org.junit.Test;

import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.core.test.GraalCompilerTest;
import org.graalvm.compiler.nodes.ConstantNode;
@@ -40,8 +37,8 @@
import org.graalvm.compiler.nodes.calc.AddNode;
import org.graalvm.compiler.nodes.calc.ConditionalNode;
import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.graalvm.compiler.phases.OptimisticOptimizations.Optimization;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Assert;
import org.junit.Test;

/**
* Tests for {@link GraalDirectives#opaque}.
@@ -133,8 +130,8 @@ public void testObject() {
}

@Override
protected HighTierContext getDefaultHighTierContext() {
return new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL.remove(Optimization.RemoveNeverExecutedCode));
protected OptimisticOptimizations getOptimisticOptimizations() {
return OptimisticOptimizations.ALL.remove(OptimisticOptimizations.Optimization.RemoveNeverExecutedCode);
}

@Override

0 comments on commit 261f4bf

Please sign in to comment.
You can’t perform that action at this time.