8182557: Update Graal

Reviewed-by: kvn
This commit is contained in:
Igor Veresov 2017-06-19 16:31:43 -07:00
parent 6dc481d296
commit bd203875c4
171 changed files with 777 additions and 322 deletions

View File

@ -47,7 +47,7 @@ ifeq ($(INCLUDE_GRAAL), true)
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_MATCH_PROCESSOR, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := \
$(SRC_DIR)/org.graalvm.api.word/src \
$(SRC_DIR)/org.graalvm.word/src \
$(SRC_DIR)/org.graalvm.compiler.core/src \
$(SRC_DIR)/org.graalvm.compiler.core.common/src \
$(SRC_DIR)/org.graalvm.compiler.core.match.processor/src \
@ -115,7 +115,7 @@ ifeq ($(INCLUDE_GRAAL), true)
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_REPLACEMENTS_VERIFIER, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := \
$(SRC_DIR)/org.graalvm.api.word/src \
$(SRC_DIR)/org.graalvm.word/src \
$(SRC_DIR)/org.graalvm.compiler.replacements.verifier/src \
$(SRC_DIR)/org.graalvm.compiler.api.replacements/src \
$(SRC_DIR)/org.graalvm.compiler.code/src \

View File

@ -34,7 +34,6 @@ import jdk.vm.ci.meta.MetaAccessProvider;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import jdk.vm.ci.meta.ResolvedJavaType;
import org.graalvm.api.word.WordBase;
import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.api.replacements.ClassSubstitution;
import org.graalvm.compiler.api.replacements.MethodSubstitution;
@ -44,6 +43,7 @@ import org.graalvm.compiler.graph.Node.NodeIntrinsic;
import org.graalvm.compiler.hotspot.replacements.HotSpotClassSubstitutions;
import org.graalvm.compiler.hotspot.word.MetaspacePointer;
import org.graalvm.compiler.replacements.Snippets;
import org.graalvm.word.WordBase;
public class GraalFilters {
private List<ResolvedJavaType> specialClasses;

View File

@ -42,7 +42,6 @@ module jdk.internal.vm.compiler {
uses org.graalvm.compiler.options.OptionValuesAccess;
uses org.graalvm.compiler.nodes.graphbuilderconf.NodeIntrinsicPluginFactory;
exports org.graalvm.api.word to jdk.aot;
exports org.graalvm.compiler.api.directives to jdk.aot;
exports org.graalvm.compiler.api.runtime to jdk.aot;
exports org.graalvm.compiler.api.replacements to jdk.aot;
@ -71,4 +70,5 @@ module jdk.internal.vm.compiler {
exports org.graalvm.compiler.runtime to jdk.aot;
exports org.graalvm.compiler.replacements to jdk.aot;
exports org.graalvm.compiler.word to jdk.aot;
exports org.graalvm.word to jdk.aot;
}

View File

@ -94,6 +94,8 @@ import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.Instruction.STR;
import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.Instruction.STXR;
import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.Instruction.SUB;
import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.Instruction.SUBS;
import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.Instruction.TBZ;
import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.Instruction.TBNZ;
import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.Instruction.UBFM;
import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.Instruction.UDIV;
import static org.graalvm.compiler.asm.aarch64.AArch64Assembler.InstructionType.FP32;
@ -475,6 +477,8 @@ public abstract class AArch64Assembler extends Assembler {
BCOND(0x54000000),
CBNZ(0x01000000),
CBZ(0x00000000),
TBZ(0x36000000),
TBNZ(0x37000000),
B(0x00000000),
BL(0x80000000),
@ -808,6 +812,82 @@ public abstract class AArch64Assembler extends Assembler {
conditionalBranchInstruction(reg, imm21, generalFromSize(size), Instruction.CBZ, pos);
}
/**
* Test a single bit and branch if the bit is nonzero.
*
* @param reg general purpose register. May not be null, zero-register or stackpointer.
* @param uimm6 Unsigned 6-bit bit index.
* @param imm16 signed 16 bit offset
*/
protected void tbnz(Register reg, int uimm6, int imm16) {
tbnz(reg, uimm6, imm16, -1);
}
/**
* Test a single bit and branch if the bit is zero.
*
* @param reg general purpose register. May not be null, zero-register or stackpointer.
* @param uimm6 Unsigned 6-bit bit index.
* @param imm16 signed 16 bit offset
*/
protected void tbz(Register reg, int uimm6, int imm16) {
tbz(reg, uimm6, imm16, -1);
}
/**
* Test a single bit and branch if the bit is nonzero.
*
* @param reg general purpose register. May not be null, zero-register or stackpointer.
* @param uimm6 Unsigned 6-bit bit index.
* @param imm16 signed 16 bit offset
* @param pos Position at which instruction is inserted into buffer. -1 means insert at end.
*/
protected void tbnz(Register reg, int uimm6, int imm16, int pos) {
assert reg.getRegisterCategory().equals(CPU);
assert NumUtil.isUnsignedNbit(6, uimm6);
assert NumUtil.isSignedNbit(18, imm16);
assert (imm16 & 3) == 0;
// size bit is overloaded as top bit of uimm6 bit index
int size = (((uimm6 >> 5) & 1) == 0 ? 32 : 64);
// remaining 5 bits are encoded lower down
int uimm5 = uimm6 >> 1;
int offset = (imm16 & NumUtil.getNbitNumberInt(16)) >> 2;
InstructionType type = generalFromSize(size);
int encoding = type.encoding | TBNZ.encoding | (uimm5 << 19) | (offset << 5) | rd(reg);
if (pos == -1) {
emitInt(encoding);
} else {
emitInt(encoding, pos);
}
}
/**
* Test a single bit and branch if the bit is zero.
*
* @param reg general purpose register. May not be null, zero-register or stackpointer.
* @param uimm6 Unsigned 6-bit bit index.
* @param imm16 signed 16 bit offset
* @param pos Position at which instruction is inserted into buffer. -1 means insert at end.
*/
protected void tbz(Register reg, int uimm6, int imm16, int pos) {
assert reg.getRegisterCategory().equals(CPU);
assert NumUtil.isUnsignedNbit(6, uimm6);
assert NumUtil.isSignedNbit(18, imm16);
assert (imm16 & 3) == 0;
// size bit is overloaded as top bit of uimm6 bit index
int size = (((uimm6 >> 5) & 1) == 0 ? 32 : 64);
// remaining 5 bits are encoded lower down
int uimm5 = uimm6 >> 1;
int offset = (imm16 & NumUtil.getNbitNumberInt(16)) >> 2;
InstructionType type = generalFromSize(size);
int encoding = type.encoding | TBZ.encoding | (uimm5 << 19) | (offset << 5) | rd(reg);
if (pos == -1) {
emitInt(encoding);
} else {
emitInt(encoding, pos);
}
}
private void conditionalBranchInstruction(Register reg, int imm21, InstructionType type, Instruction instr, int pos) {
assert reg.getRegisterCategory().equals(CPU);
int instrEncoding = instr.encoding | CompareBranchOp;

View File

@ -1216,8 +1216,10 @@ public class AArch64MacroAssembler extends AArch64Assembler {
BRANCH_UNCONDITIONALLY(0x1),
BRANCH_NONZERO(0x2),
BRANCH_ZERO(0x3),
JUMP_ADDRESS(0x4),
ADR(0x5);
BRANCH_BIT_NONZERO(0x4),
BRANCH_BIT_ZERO(0x5),
JUMP_ADDRESS(0x6),
ADR(0x7);
/**
* Offset by which additional information for branch conditionally, branch zero and branch
@ -1294,6 +1296,46 @@ public class AArch64MacroAssembler extends AArch64Assembler {
}
}
/**
* Test a single bit and branch if the bit is nonzero.
*
* @param cmp general purpose register. May not be null, zero-register or stackpointer.
* @param uimm6 Unsigned 6-bit bit index.
* @param label Can only handle 21-bit word-aligned offsets for now. May be unbound. Non null.
*/
public void tbnz(Register cmp, int uimm6, Label label) {
assert NumUtil.isUnsignedNbit(6, uimm6);
if (label.isBound()) {
int offset = label.position() - position();
super.tbnz(cmp, uimm6, offset);
} else {
label.addPatchAt(position());
int indexEncoding = uimm6 << PatchLabelKind.INFORMATION_OFFSET;
int regEncoding = cmp.encoding << (PatchLabelKind.INFORMATION_OFFSET + 6);
emitInt(PatchLabelKind.BRANCH_BIT_NONZERO.encoding | indexEncoding | regEncoding);
}
}
/**
* Test a single bit and branch if the bit is zero.
*
* @param cmp general purpose register. May not be null, zero-register or stackpointer.
* @param uimm6 Unsigned 6-bit bit index.
* @param label Can only handle 21-bit word-aligned offsets for now. May be unbound. Non null.
*/
public void tbz(Register cmp, int uimm6, Label label) {
assert NumUtil.isUnsignedNbit(6, uimm6);
if (label.isBound()) {
int offset = label.position() - position();
super.tbz(cmp, uimm6, offset);
} else {
label.addPatchAt(position());
int indexEncoding = uimm6 << PatchLabelKind.INFORMATION_OFFSET;
int regEncoding = cmp.encoding << (PatchLabelKind.INFORMATION_OFFSET + 6);
emitInt(PatchLabelKind.BRANCH_BIT_ZERO.encoding | indexEncoding | regEncoding);
}
}
/**
* Branches to label if condition is true.
*
@ -1474,6 +1516,22 @@ public class AArch64MacroAssembler extends AArch64Assembler {
}
break;
}
case BRANCH_BIT_NONZERO:
case BRANCH_BIT_ZERO: {
int information = instruction >>> PatchLabelKind.INFORMATION_OFFSET;
int sizeEncoding = information & NumUtil.getNbitNumberInt(6);
int regEncoding = information >>> 6;
Register reg = AArch64.cpuRegisters.get(regEncoding);
switch (type) {
case BRANCH_BIT_NONZERO:
super.tbnz(reg, sizeEncoding, branchOffset, branch);
break;
case BRANCH_BIT_ZERO:
super.tbz(reg, sizeEncoding, branchOffset, branch);
break;
}
break;
}
case ADR: {
int information = instruction >>> PatchLabelKind.INFORMATION_OFFSET;
int regEncoding = information;

View File

@ -3492,6 +3492,14 @@ public class AMD64Assembler extends Assembler {
emitByte(0xC0 | encode);
}
public final void btrq(Register src, int imm8) {
int encode = prefixqAndEncode(src.encoding);
emitByte(0x0F);
emitByte(0xBA);
emitByte(0xF0 | encode);
emitByte(imm8);
}
public final void xaddl(AMD64Address dst, Register src) {
prefix(dst, src);
emitByte(0x0F);

View File

@ -81,6 +81,10 @@ public class SPARCMacroAssembler extends SPARCAssembler {
nop(); // delay slot
}
public void bz(Label l) {
BPCC.emit(this, Xcc, ConditionFlag.Zero, NOT_ANNUL, PREDICT_NOT_TAKEN, l);
}
@Override
protected final void patchJumpTarget(int branch, int branchTarget) {
final int disp = (branchTarget - branch) / 4;

View File

@ -300,7 +300,6 @@ public class CompilationResult {
* Sets the assumptions made during compilation.
*/
public void setAssumptions(Assumption[] assumptions) {
checkOpen();
this.assumptions = assumptions;
}

View File

@ -76,7 +76,9 @@ public class AArch64AddressNode extends AddressNode implements LIRLowerable {
AllocatableValue baseReference = LIRKind.derivedBaseFromValue(baseValue);
AllocatableValue indexReference;
if (addressingMode.equals(AddressingMode.IMMEDIATE_UNSCALED)) {
if (index == null) {
indexReference = null;
} else if (addressingMode.equals(AddressingMode.IMMEDIATE_UNSCALED)) {
indexReference = LIRKind.derivedBaseFromValue(indexValue);
} else {
if (LIRKind.isValue(indexValue.getValueKind())) {

View File

@ -73,7 +73,9 @@ public class AMD64AddressNode extends AddressNode implements LIRLowerable {
AllocatableValue baseReference = LIRKind.derivedBaseFromValue(baseValue);
AllocatableValue indexReference;
if (scale.equals(Scale.Times1)) {
if (index == null) {
indexReference = null;
} else if (scale.equals(Scale.Times1)) {
indexReference = LIRKind.derivedBaseFromValue(indexValue);
} else {
if (LIRKind.isValue(indexValue)) {

View File

@ -22,8 +22,8 @@
*/
package org.graalvm.compiler.core.common.spi;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.ValueKindFactory;

View File

@ -41,7 +41,6 @@ import java.util.concurrent.TimeUnit;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter;
import org.graalvm.compiler.api.replacements.Snippet.NonNullParameter;
@ -84,6 +83,7 @@ import org.graalvm.compiler.phases.verify.VerifyUpdateUsages;
import org.graalvm.compiler.phases.verify.VerifyUsageWithEquals;
import org.graalvm.compiler.phases.verify.VerifyVirtualizableUsage;
import org.graalvm.compiler.runtime.RuntimeProvider;
import org.graalvm.word.LocationIdentity;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Test;

View File

@ -31,6 +31,8 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Constructor;
import java.lang.reflect.Executable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
@ -655,7 +657,8 @@ public abstract class GraalCompilerTest extends GraalTest {
}
}
protected Object referenceInvoke(ResolvedJavaMethod method, Object receiver, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
protected Object referenceInvoke(ResolvedJavaMethod method, Object receiver, Object... args)
throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {
return invoke(method, receiver, args);
}
@ -1053,12 +1056,12 @@ public abstract class GraalCompilerTest extends GraalTest {
return backend.createDefaultInstalledCode(method, compilationResult);
}
private final Map<ResolvedJavaMethod, Method> methodMap = new HashMap<>();
private final Map<ResolvedJavaMethod, Executable> methodMap = new HashMap<>();
/**
* Converts a reflection {@link Method} to a {@link ResolvedJavaMethod}.
*/
protected ResolvedJavaMethod asResolvedJavaMethod(Method method) {
protected ResolvedJavaMethod asResolvedJavaMethod(Executable method) {
ResolvedJavaMethod javaMethod = getMetaAccess().lookupJavaMethod(method);
methodMap.put(javaMethod, method);
return javaMethod;
@ -1080,17 +1083,21 @@ public abstract class GraalCompilerTest extends GraalTest {
* Gets the reflection {@link Method} from which a given {@link ResolvedJavaMethod} was created
* or null if {@code javaMethod} does not correspond to a reflection method.
*/
protected Method lookupMethod(ResolvedJavaMethod javaMethod) {
protected Executable lookupMethod(ResolvedJavaMethod javaMethod) {
return methodMap.get(javaMethod);
}
protected Object invoke(ResolvedJavaMethod javaMethod, Object receiver, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method method = lookupMethod(javaMethod);
protected Object invoke(ResolvedJavaMethod javaMethod, Object receiver, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {
Executable method = lookupMethod(javaMethod);
Assert.assertTrue(method != null);
if (!method.isAccessible()) {
method.setAccessible(true);
}
return method.invoke(receiver, applyArgSuppliers(args));
if (method instanceof Method) {
return ((Method) method).invoke(receiver, applyArgSuppliers(args));
}
assert receiver == null : "no receiver for constructor invokes";
return ((Constructor<?>) method).newInstance(applyArgSuppliers(args));
}
/**

View File

@ -27,13 +27,13 @@ import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import org.junit.Test;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.loop.LoopEx;
import org.graalvm.compiler.loop.LoopsData;
import org.graalvm.compiler.nodes.FieldLocationIdentity;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.memory.Access;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.ResolvedJavaField;

View File

@ -22,14 +22,12 @@
*/
package org.graalvm.compiler.core.test.tutorial;
import org.junit.Assert;
import org.junit.Test;
import java.lang.reflect.Method;
import java.util.regex.Pattern;
import org.graalvm.compiler.bytecode.Bytecode;
import org.graalvm.compiler.bytecode.BytecodeDisassembler;
import org.graalvm.compiler.bytecode.ResolvedJavaMethodBytecode;
import org.junit.Assert;
import org.junit.Test;
import jdk.vm.ci.code.InstalledCode;
import jdk.vm.ci.code.InvalidInstalledCodeException;
@ -51,18 +49,31 @@ public class GraalTutorial extends InvokeGraal {
*/
@Test
public void testPrintBytecodes() {
ResolvedJavaMethod method = findMethod(String.class, "hashCode");
Bytecode bytecode = new ResolvedJavaMethodBytecode(method);
public void testGetBytecodes() throws NoSuchMethodException {
Method reflectionMethod = String.class.getDeclaredMethod("hashCode");
ResolvedJavaMethod method = metaAccess.lookupJavaMethod(reflectionMethod);
byte[] bytecodes = bytecode.getCode();
Assert.assertNotNull(bytecodes);
/*
* ResolvedJavaMethod provides all information that you want about a method, for example,
* the bytecodes.
*/
byte[] bytecodes = method.getCode();
/*
* BytecodeDisassembler shows you how to iterate bytecodes, how to access type information,
* and more.
*/
String disassembly = new BytecodeDisassembler().disassemble(method);
/*
* We don't want test cases to print any output, so we check the validity of the output
* instead.
*/
Pattern disassemblyLineRE = Pattern.compile(" *\\d+: [a-z][\\w_]+");
String disassembly = new BytecodeDisassembler().disassemble(bytecode);
for (String line : disassembly.split("\\n")) {
Assert.assertTrue(line, disassemblyLineRE.matcher(line).find());
}
Assert.assertTrue(bytecodes.length > 0);
}
/*
@ -137,6 +148,21 @@ public class GraalTutorial extends InvokeGraal {
* Tutorial example for snippets and lowering.
*/
public static int identityHashCodeUsage(Object obj) {
return System.identityHashCode(obj);
}
@Test
public void testIdentityHashCodeUsage() throws InvalidInstalledCodeException {
Object a = new Object();
int expectedResult = identityHashCodeUsage(a);
InstalledCode compiledMethod = compileAndInstallMethod(findMethod(GraalTutorial.class, "identityHashCodeUsage"));
int result = (int) compiledMethod.executeVarargs(a);
Assert.assertEquals(expectedResult, result);
}
static class A {
}
@ -179,17 +205,18 @@ public class GraalTutorial extends InvokeGraal {
* Tutorial example for intrinsic methods.
*/
public static double intrinsicUsage(double val) {
return Math.sin(val);
public static int intrinsicIntegerReverseBytes(int val) {
return Integer.reverseBytes(val);
}
@Test
public void testIntrinsicUsage() throws InvalidInstalledCodeException {
double expectedResult = intrinsicUsage(42d);
public void testIntrinsicIntegerReverseBytes() throws InvalidInstalledCodeException {
int input = 0x12345678;
int expected = intrinsicIntegerReverseBytes(input);
InstalledCode compiledMethod = compileAndInstallMethod(findMethod(GraalTutorial.class, "intrinsicUsage"));
InstalledCode compiledMethod = compileAndInstallMethod(findMethod(GraalTutorial.class, "intrinsicIntegerReverseBytes"));
double result = (double) compiledMethod.executeVarargs(42d);
Assert.assertEquals(expectedResult, result, 0);
int actual = (int) compiledMethod.executeVarargs(input);
Assert.assertEquals(expected, actual);
}
}

View File

@ -60,18 +60,26 @@ import jdk.vm.ci.meta.MetaAccessProvider;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import jdk.vm.ci.meta.SpeculationLog;
import java.util.ArrayList;
/**
* Represents a compiler backend for Graal.
*/
public abstract class Backend implements TargetProvider, ValueKindFactory<LIRKind> {
private final Providers providers;
private final ArrayList<CodeInstallationTaskFactory> codeInstallationTaskFactories;
public static final ForeignCallDescriptor ARITHMETIC_FREM = new ForeignCallDescriptor("arithmeticFrem", float.class, float.class, float.class);
public static final ForeignCallDescriptor ARITHMETIC_DREM = new ForeignCallDescriptor("arithmeticDrem", double.class, double.class, double.class);
protected Backend(Providers providers) {
this.providers = providers;
this.codeInstallationTaskFactories = new ArrayList<>();
}
public synchronized void addCodeInstallationTask(CodeInstallationTaskFactory factory) {
this.codeInstallationTaskFactories.add(factory);
}
public Providers getProviders() {
@ -155,6 +163,16 @@ public abstract class Backend implements TargetProvider, ValueKindFactory<LIRKin
return createInstalledCode(method, null, compilationResult, speculationLog, predefinedInstalledCode, isDefault);
}
/**
* @see #createInstalledCode(ResolvedJavaMethod, CompilationRequest, CompilationResult,
* SpeculationLog, InstalledCode, boolean, Object[])
*/
@SuppressWarnings("try")
public InstalledCode createInstalledCode(ResolvedJavaMethod method, CompilationRequest compilationRequest, CompilationResult compilationResult,
SpeculationLog speculationLog, InstalledCode predefinedInstalledCode, boolean isDefault) {
return createInstalledCode(method, compilationRequest, compilationResult, speculationLog, predefinedInstalledCode, isDefault, null);
}
/**
* Installs code based on a given compilation result.
*
@ -170,15 +188,39 @@ public abstract class Backend implements TargetProvider, ValueKindFactory<LIRKin
* {@code compRequest.getMethod()}. The default implementation for a method is the
* code executed for standard calls to the method. This argument is ignored if
* {@code compRequest == null}.
* @param context a custom debug context to use for the code installation.
* @return a reference to the compiled and ready-to-run installed code
* @throws BailoutException if the code installation failed
*/
@SuppressWarnings("try")
public InstalledCode createInstalledCode(ResolvedJavaMethod method, CompilationRequest compilationRequest, CompilationResult compilationResult,
SpeculationLog speculationLog, InstalledCode predefinedInstalledCode, boolean isDefault) {
try (Scope s2 = Debug.scope("CodeInstall", getProviders().getCodeCache(), compilationResult)) {
SpeculationLog speculationLog, InstalledCode predefinedInstalledCode, boolean isDefault, Object[] context) {
Object[] debugContext = context != null ? context : new Object[]{getProviders().getCodeCache(), method, compilationResult};
CodeInstallationTask[] tasks = new CodeInstallationTask[codeInstallationTaskFactories.size()];
for (int i = 0; i < codeInstallationTaskFactories.size(); i++) {
tasks[i] = codeInstallationTaskFactories.get(i).create();
}
try (Scope s = Debug.scope("CodeInstall", debugContext)) {
for (CodeInstallationTask task : tasks) {
task.preProcess(compilationResult);
}
CompiledCode compiledCode = createCompiledCode(method, compilationRequest, compilationResult);
return getProviders().getCodeCache().installCode(method, compiledCode, predefinedInstalledCode, speculationLog, isDefault);
InstalledCode installedCode = getProviders().getCodeCache().installCode(method, compiledCode, predefinedInstalledCode, speculationLog, isDefault);
// Run post-code installation tasks.
try {
for (CodeInstallationTask task : tasks) {
task.postProcess(installedCode);
}
for (CodeInstallationTask task : tasks) {
task.releaseInstallation(installedCode);
}
} catch (Throwable t) {
installedCode.invalidate();
throw t;
}
return installedCode;
} catch (Throwable e) {
throw Debug.handle(e);
}
@ -236,4 +278,38 @@ public abstract class Backend implements TargetProvider, ValueKindFactory<LIRKin
public CompilationIdentifier getCompilationIdentifier(ResolvedJavaMethod resolvedJavaMethod) {
return CompilationIdentifier.INVALID_COMPILATION_ID;
}
/**
* Encapsulates custom tasks done before and after code installation.
*/
public abstract static class CodeInstallationTask {
/**
* Task to run before code installation.
*/
@SuppressWarnings("unused")
public void preProcess(CompilationResult compilationResult) {
}
/**
* Task to run after the code is installed.
*/
@SuppressWarnings("unused")
public void postProcess(InstalledCode installedCode) {
}
/**
* Task to run after all the post-code installation tasks are complete, used to release the
* installed code.
*/
@SuppressWarnings("unused")
public void releaseInstallation(InstalledCode installedCode) {
}
}
/**
* Creates code installation tasks.
*/
public abstract static class CodeInstallationTaskFactory {
public abstract CodeInstallationTask create();
}
}

View File

@ -36,9 +36,15 @@ public class NodeSourcePosition extends BytecodePosition {
* The receiver of the method this frame refers to.
*/
private final JavaConstant receiver;
private final int hashCode;
public NodeSourcePosition(JavaConstant receiver, NodeSourcePosition caller, ResolvedJavaMethod method, int bci) {
super(caller, method, bci);
if (caller == null) {
this.hashCode = 31 * bci + method.hashCode();
} else {
this.hashCode = caller.hashCode * 7 + 31 * bci + method.hashCode();
}
this.receiver = receiver;
assert receiver == null || method.getDeclaringClass().isInstance(receiver);
}
@ -50,6 +56,9 @@ public class NodeSourcePosition extends BytecodePosition {
}
if (obj != null && getClass() == obj.getClass()) {
NodeSourcePosition that = (NodeSourcePosition) obj;
if (hashCode != that.hashCode) {
return false;
}
if (this.getBCI() == that.getBCI() && Objects.equals(this.getMethod(), that.getMethod()) && Objects.equals(this.getCaller(), that.getCaller()) &&
Objects.equals(this.receiver, that.receiver)) {
return true;
@ -58,6 +67,11 @@ public class NodeSourcePosition extends BytecodePosition {
return false;
}
@Override
public int hashCode() {
return hashCode;
}
public JavaConstant getReceiver() {
return receiver;
}

View File

@ -26,11 +26,11 @@ import static jdk.vm.ci.aarch64.AArch64.r0;
import static jdk.vm.ci.aarch64.AArch64.r3;
import static jdk.vm.ci.hotspot.HotSpotCallingConventionType.NativeCall;
import static jdk.vm.ci.meta.Value.ILLEGAL;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.JUMP_ADDRESS;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEffect.PRESERVES_REGISTERS;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.LEAF;
import static org.graalvm.compiler.hotspot.replacements.CRC32Substitutions.UPDATE_BYTES_CRC32;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;

View File

@ -26,7 +26,6 @@ import static jdk.vm.ci.amd64.AMD64.rax;
import static jdk.vm.ci.amd64.AMD64.rdx;
import static jdk.vm.ci.hotspot.HotSpotCallingConventionType.NativeCall;
import static jdk.vm.ci.meta.Value.ILLEGAL;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.compiler.hotspot.HotSpotBackend.EXCEPTION_HANDLER;
import static org.graalvm.compiler.hotspot.HotSpotBackend.EXCEPTION_HANDLER_IN_CALLER;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.JUMP_ADDRESS;
@ -34,6 +33,7 @@ import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEff
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.LEAF;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.LEAF_NOFP;
import static org.graalvm.compiler.hotspot.replacements.CRC32Substitutions.UPDATE_BYTES_CRC32;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;

View File

@ -28,13 +28,13 @@ import static jdk.vm.ci.sparc.SPARC.i0;
import static jdk.vm.ci.sparc.SPARC.i1;
import static jdk.vm.ci.sparc.SPARC.o0;
import static jdk.vm.ci.sparc.SPARC.o1;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.compiler.hotspot.HotSpotBackend.EXCEPTION_HANDLER;
import static org.graalvm.compiler.hotspot.HotSpotBackend.EXCEPTION_HANDLER_IN_CALLER;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.JUMP_ADDRESS;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEffect.PRESERVES_REGISTERS;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.LEAF_NOFP;
import static org.graalvm.compiler.hotspot.replacements.CRC32Substitutions.UPDATE_BYTES_CRC32;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.hotspot.test;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.debug.Debug;
import org.graalvm.compiler.debug.Debug.Scope;
import org.graalvm.compiler.debug.DebugConfig;
@ -64,6 +63,7 @@ import org.graalvm.compiler.phases.graph.ReentrantNodeIterator.NodeIteratorClosu
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.graalvm.compiler.phases.tiers.MidTierContext;
import org.graalvm.util.EconomicMap;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.ResolvedJavaField;

View File

@ -54,7 +54,6 @@ import jdk.vm.ci.code.CodeCacheProvider;
import jdk.vm.ci.hotspot.EventProvider;
import jdk.vm.ci.hotspot.HotSpotCompilationRequest;
import jdk.vm.ci.hotspot.HotSpotCompilationRequestResult;
import jdk.vm.ci.hotspot.HotSpotCompiledCode;
import jdk.vm.ci.hotspot.HotSpotInstalledCode;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider;
import jdk.vm.ci.hotspot.HotSpotNmethod;
@ -414,14 +413,11 @@ public class CompilationTask {
@SuppressWarnings("try")
private void installMethod(final CompilationResult compResult) {
final CodeCacheProvider codeCache = jvmciRuntime.getHostJVMCIBackend().getCodeCache();
HotSpotBackend backend = compiler.getGraalRuntime().getHostBackend();
installedCode = null;
Object[] context = {new DebugDumpScope(getIdString(), true), codeCache, getMethod(), compResult};
try (Scope s = Debug.scope("CodeInstall", context)) {
HotSpotCompiledCode compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(codeCache, getRequest().getMethod(), getRequest(), compResult);
installedCode = (HotSpotInstalledCode) codeCache.installCode(getRequest().getMethod(), compiledCode, null, getRequest().getMethod().getSpeculationLog(), installAsDefault);
} catch (Throwable e) {
throw Debug.handle(e);
}
installedCode = (HotSpotInstalledCode) backend.createInstalledCode(getRequest().getMethod(), getRequest(), compResult,
getRequest().getMethod().getSpeculationLog(), null, installAsDefault, context);
}
@Override

View File

@ -24,7 +24,6 @@ package org.graalvm.compiler.hotspot;
import java.util.EnumSet;
import org.graalvm.api.word.Pointer;
import org.graalvm.compiler.code.CompilationResult;
import org.graalvm.compiler.core.common.CompilationIdentifier;
import org.graalvm.compiler.core.common.cfg.AbstractBlockBase;
@ -69,6 +68,7 @@ import org.graalvm.util.Equivalence;
import org.graalvm.util.EconomicMap;
import org.graalvm.util.EconomicSet;
import org.graalvm.util.MapCursor;
import org.graalvm.word.Pointer;
import jdk.vm.ci.code.CompilationRequest;
import jdk.vm.ci.code.CompiledCode;

View File

@ -24,10 +24,10 @@ package org.graalvm.compiler.hotspot;
import jdk.vm.ci.meta.InvokeTarget;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
import org.graalvm.compiler.core.target.Backend;
import org.graalvm.compiler.hotspot.stubs.Stub;
import org.graalvm.word.LocationIdentity;
/**
* The details required to link a HotSpot runtime or stub call.

View File

@ -23,9 +23,6 @@
package org.graalvm.compiler.hotspot;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEffect.DESTROYS_REGISTERS;
import org.graalvm.api.word.LocationIdentity;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
@ -34,6 +31,7 @@ import org.graalvm.compiler.hotspot.meta.HotSpotForeignCallsProvider;
import org.graalvm.compiler.hotspot.stubs.Stub;
import org.graalvm.compiler.word.WordTypes;
import org.graalvm.util.EconomicSet;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.CallingConvention;
import jdk.vm.ci.code.CallingConvention.Type;

View File

@ -23,7 +23,6 @@
package org.graalvm.compiler.hotspot.meta;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.compiler.core.common.GraalOptions.AlwaysInlineVTableStubs;
import static org.graalvm.compiler.core.common.GraalOptions.GeneratePIC;
import static org.graalvm.compiler.core.common.GraalOptions.InlineVTableStubs;
@ -38,10 +37,10 @@ import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.HUB_WRITE_LOCATION;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.KLASS_LAYOUT_HELPER_LOCATION;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.OBJ_ARRAY_KLASS_ELEMENT_KLASS_LOCATION;
import static org.graalvm.word.LocationIdentity.any;
import java.lang.ref.Reference;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.core.common.GraalOptions;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
@ -155,6 +154,7 @@ import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.replacements.DefaultJavaLoweringProvider;
import org.graalvm.compiler.replacements.nodes.AssertionNode;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.hotspot.HotSpotCallingConventionType;

View File

@ -30,7 +30,6 @@ import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.
import java.util.ArrayList;
import java.util.List;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
import org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage;
@ -44,6 +43,7 @@ import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.word.Word;
import org.graalvm.compiler.word.WordTypes;
import org.graalvm.util.EconomicMap;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.CallingConvention;
import jdk.vm.ci.code.CodeCacheProvider;

View File

@ -38,7 +38,6 @@ import java.lang.reflect.Modifier;
import java.math.BigInteger;
import java.util.zip.CRC32;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.api.replacements.SnippetReflectionProvider;
import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
@ -100,6 +99,7 @@ import org.graalvm.compiler.serviceprovider.GraalServices;
import org.graalvm.compiler.serviceprovider.JDK9Method;
import org.graalvm.compiler.word.WordOperationPlugin;
import org.graalvm.compiler.word.WordTypes;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.CodeUtil;
import jdk.vm.ci.hotspot.HotSpotObjectConstant;

View File

@ -98,7 +98,6 @@ import static org.graalvm.compiler.replacements.nodes.UnaryMathIntrinsicNode.Una
import java.util.EnumMap;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
import org.graalvm.compiler.debug.GraalError;
@ -122,6 +121,7 @@ import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.word.Word;
import org.graalvm.compiler.word.WordTypes;
import org.graalvm.util.EconomicMap;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.CodeCacheProvider;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;

View File

@ -22,12 +22,11 @@
*/
package org.graalvm.compiler.hotspot.meta;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.POINTER_EQ;
import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.POINTER_NE;
import static org.graalvm.compiler.nodes.ConstantNode.forBoolean;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.api.replacements.SnippetReflectionProvider;
import org.graalvm.compiler.bytecode.BridgeMethodUtils;
import org.graalvm.compiler.core.common.type.Stamp;
@ -53,6 +52,7 @@ import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.type.StampTool;
import org.graalvm.compiler.word.WordOperationPlugin;
import org.graalvm.compiler.word.WordTypes;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.ResolvedJavaMethod;

View File

@ -26,7 +26,6 @@ import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.hotspot.HotSpotLIRGenerator;
@ -39,6 +38,7 @@ import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.compiler.word.Word;
import org.graalvm.compiler.word.WordTypes;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.Value;

View File

@ -26,7 +26,6 @@ import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_0;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_0;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
@ -35,6 +34,7 @@ import org.graalvm.compiler.nodes.memory.AbstractMemoryCheckpoint;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.word.LocationIdentity;
/**
* Intrinsic for closing a {@linkplain BeginLockScopeNode scope} binding a stack-based lock with an

View File

@ -28,7 +28,6 @@ import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_UNKNOWN;
import java.util.Arrays;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
@ -43,6 +42,7 @@ import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.Value;

View File

@ -26,7 +26,6 @@ import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_4;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_16;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.DeoptimizingFixedWithNextNode;
@ -34,6 +33,7 @@ import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
@NodeInfo(cycles = CYCLES_4, size = SIZE_16, allowedUsageTypes = {Memory})
public class InitializeKlassNode extends DeoptimizingFixedWithNextNode implements Lowerable, MemoryCheckpoint.Single {

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.hotspot.nodes.aot;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_UNKNOWN;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_16;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.graph.spi.Canonicalizable;
@ -43,6 +42,7 @@ import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant;
import jdk.vm.ci.meta.Constant;

View File

@ -29,9 +29,6 @@ import static org.graalvm.compiler.hotspot.HotSpotBackend.ENCRYPT_BLOCK;
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.VERY_SLOW_PATH_PROBABILITY;
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.probability;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.Pointer;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.ClassSubstitution;
import org.graalvm.compiler.api.replacements.MethodSubstitution;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
@ -44,6 +41,9 @@ import org.graalvm.compiler.nodes.PiNode;
import org.graalvm.compiler.nodes.extended.ForeignCallNode;
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.Pointer;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.meta.DeoptimizationAction;
import jdk.vm.ci.meta.DeoptimizationReason;

View File

@ -26,9 +26,6 @@ import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.
import java.util.zip.CRC32;
import org.graalvm.api.word.Pointer;
import org.graalvm.api.word.WordBase;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.ClassSubstitution;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Fold.InjectedParameter;
@ -41,6 +38,9 @@ import org.graalvm.compiler.hotspot.nodes.ComputeObjectAddressNode;
import org.graalvm.compiler.hotspot.nodes.GraalHotSpotVMConfigNode;
import org.graalvm.compiler.nodes.extended.ForeignCallNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.Pointer;
import org.graalvm.word.WordBase;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.meta.JavaKind;

View File

@ -26,11 +26,6 @@ import static org.graalvm.compiler.hotspot.HotSpotBackend.DECRYPT;
import static org.graalvm.compiler.hotspot.HotSpotBackend.DECRYPT_WITH_ORIGINAL_KEY;
import static org.graalvm.compiler.hotspot.HotSpotBackend.ENCRYPT;
import static org.graalvm.compiler.hotspot.replacements.UnsafeAccess.UNSAFE;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.Pointer;
import org.graalvm.api.word.WordFactory;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
import org.graalvm.compiler.api.replacements.ClassSubstitution;
@ -45,6 +40,9 @@ import org.graalvm.compiler.nodes.PiNode;
import org.graalvm.compiler.nodes.extended.ForeignCallNode;
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.Pointer;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,8 +25,6 @@ package org.graalvm.compiler.hotspot.replacements;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_1;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
import org.graalvm.api.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.ResolvedJavaMethod;
@ -52,6 +50,7 @@ import org.graalvm.compiler.nodes.memory.ReadNode;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.Constant;
import jdk.vm.ci.meta.ConstantReflectionProvider;

View File

@ -35,7 +35,6 @@ import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.FAST_PAT
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.NOT_FREQUENT_PROBABILITY;
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.probability;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.hotspot.meta.HotSpotProviders;
import org.graalvm.compiler.nodes.StructuredGraph;
@ -47,6 +46,7 @@ import org.graalvm.compiler.replacements.SnippetTemplate.Arguments;
import org.graalvm.compiler.replacements.SnippetTemplate.SnippetInfo;
import org.graalvm.compiler.replacements.Snippets;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.TargetDescription;

View File

@ -28,8 +28,6 @@ import static org.graalvm.compiler.hotspot.GraalHotSpotVMConfig.INJECTED_VMCONFI
import static org.graalvm.compiler.hotspot.meta.HotSpotForeignCallsProviderImpl.VERIFY_OOP;
import static org.graalvm.compiler.hotspot.replacements.UnsafeAccess.UNSAFE;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Fold.InjectedParameter;
import org.graalvm.compiler.core.common.SuppressFBWarnings;
@ -60,6 +58,8 @@ import org.graalvm.compiler.replacements.ReplacementsUtil;
import org.graalvm.compiler.replacements.nodes.ReadRegisterNode;
import org.graalvm.compiler.replacements.nodes.WriteRegisterNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.CodeUtil;
import jdk.vm.ci.code.Register;

View File

@ -26,7 +26,6 @@ import static org.graalvm.compiler.core.common.GraalOptions.ImmutableCode;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_0;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_0;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.AbstractObjectStamp;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.Node;
@ -40,6 +39,7 @@ import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.hotspot.HotSpotObjectConstant;
import jdk.vm.ci.meta.JavaConstant;

View File

@ -33,7 +33,6 @@ import static org.graalvm.compiler.hotspot.replacements.HotspotSnippetsOptions.L
import static org.graalvm.compiler.nodes.PiNode.piCastToSnippetReplaceeStamp;
import static org.graalvm.compiler.replacements.SnippetTemplate.DEFAULT_REPLACER;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter;
import org.graalvm.compiler.core.common.type.Stamp;
@ -51,6 +50,7 @@ import org.graalvm.compiler.replacements.SnippetTemplate.SnippetInfo;
import org.graalvm.compiler.replacements.Snippets;
import org.graalvm.compiler.replacements.nodes.ReadRegisterNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.BytecodeFrame;
import jdk.vm.ci.code.Register;

View File

@ -71,10 +71,6 @@ import static org.graalvm.compiler.replacements.SnippetTemplate.DEFAULT_REPLACER
import java.util.List;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.Pointer;
import org.graalvm.api.word.WordBase;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter;
@ -122,6 +118,10 @@ import org.graalvm.compiler.replacements.SnippetTemplate.Arguments;
import org.graalvm.compiler.replacements.SnippetTemplate.SnippetInfo;
import org.graalvm.compiler.replacements.Snippets;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.Pointer;
import org.graalvm.word.WordBase;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.BytecodeFrame;
import jdk.vm.ci.code.Register;

View File

@ -68,8 +68,6 @@ import static org.graalvm.compiler.replacements.SnippetTemplate.DEFAULT_REPLACER
import static org.graalvm.compiler.replacements.nodes.CStringConstant.cstring;
import static org.graalvm.compiler.replacements.nodes.ExplodeLoopNode.explodeLoop;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter;
@ -88,6 +86,7 @@ import org.graalvm.compiler.hotspot.nodes.DimensionsNode;
import org.graalvm.compiler.hotspot.nodes.aot.LoadConstantIndirectlyFixedNode;
import org.graalvm.compiler.hotspot.nodes.aot.LoadConstantIndirectlyNode;
import org.graalvm.compiler.hotspot.nodes.type.KlassPointerStamp;
import org.graalvm.compiler.hotspot.replacements.aot.ResolveConstantSnippets;
import org.graalvm.compiler.hotspot.word.KlassPointer;
import org.graalvm.compiler.nodes.ConstantNode;
import org.graalvm.compiler.nodes.DeoptimizeNode;
@ -119,6 +118,8 @@ import org.graalvm.compiler.replacements.SnippetTemplate.SnippetInfo;
import org.graalvm.compiler.replacements.Snippets;
import org.graalvm.compiler.replacements.nodes.ExplodeLoopNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.CodeUtil;
import jdk.vm.ci.code.MemoryBarriers;
@ -290,6 +291,7 @@ public class NewObjectSnippets implements Snippets {
public static Object allocatePrimitiveArrayPIC(KlassPointer hub, int length, Word prototypeMarkWord, @ConstantParameter int headerSize, @ConstantParameter int log2ElementSize,
@ConstantParameter boolean fillContents, @ConstantParameter Register threadRegister, @ConstantParameter boolean maybeUnroll, @ConstantParameter String typeContext,
@ConstantParameter OptionValues options, @ConstantParameter Counters counters) {
// Primitive array types are eagerly pre-resolved. We can use a floating load.
KlassPointer picHub = LoadConstantIndirectlyNode.loadKlass(hub);
return allocateArrayImpl(picHub, length, prototypeMarkWord, headerSize, log2ElementSize, fillContents, threadRegister, maybeUnroll, typeContext, false, options, counters);
}
@ -298,7 +300,10 @@ public class NewObjectSnippets implements Snippets {
public static Object allocateArrayPIC(KlassPointer hub, int length, Word prototypeMarkWord, @ConstantParameter int headerSize, @ConstantParameter int log2ElementSize,
@ConstantParameter boolean fillContents, @ConstantParameter Register threadRegister, @ConstantParameter boolean maybeUnroll, @ConstantParameter String typeContext,
@ConstantParameter OptionValues options, @ConstantParameter Counters counters) {
KlassPointer picHub = LoadConstantIndirectlyFixedNode.loadKlass(hub);
// We need to resolve array type. While element type is guaranteed to be initialized, we
// cannot guarantee initialization of the array class if NewArrayInstance comes from
// canonicalization of DynamicNewArrayInstance.
KlassPointer picHub = ResolveConstantSnippets.pureInitializeKlass(hub);
return allocateArrayImpl(picHub, length, prototypeMarkWord, headerSize, log2ElementSize, fillContents, threadRegister, maybeUnroll, typeContext, false, options, counters);
}

View File

@ -25,8 +25,6 @@ package org.graalvm.compiler.hotspot.replacements;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
import static org.graalvm.compiler.serviceprovider.JDK9Method.Java8OrEarlier;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.ClassSubstitution;
import org.graalvm.compiler.api.replacements.MethodSubstitution;
import org.graalvm.compiler.debug.GraalError;
@ -35,6 +33,8 @@ import org.graalvm.compiler.hotspot.nodes.ComputeObjectAddressNode;
import org.graalvm.compiler.nodes.PiNode;
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,8 +25,6 @@ package org.graalvm.compiler.hotspot.replacements;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
import static org.graalvm.compiler.serviceprovider.JDK9Method.Java8OrEarlier;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.ClassSubstitution;
import org.graalvm.compiler.api.replacements.MethodSubstitution;
import org.graalvm.compiler.debug.GraalError;
@ -35,6 +33,8 @@ import org.graalvm.compiler.hotspot.nodes.ComputeObjectAddressNode;
import org.graalvm.compiler.nodes.PiNode;
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,8 +25,6 @@ package org.graalvm.compiler.hotspot.replacements;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
import static org.graalvm.compiler.serviceprovider.JDK9Method.Java8OrEarlier;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.ClassSubstitution;
import org.graalvm.compiler.api.replacements.MethodSubstitution;
import org.graalvm.compiler.debug.GraalError;
@ -35,6 +33,8 @@ import org.graalvm.compiler.hotspot.nodes.ComputeObjectAddressNode;
import org.graalvm.compiler.nodes.PiNode;
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.hotspot.replacements;
import static org.graalvm.compiler.hotspot.replacements.UnsafeAccess.UNSAFE;
import static org.graalvm.compiler.replacements.SnippetTemplate.DEFAULT_REPLACER;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter;
@ -42,6 +41,7 @@ import org.graalvm.compiler.replacements.SnippetTemplate.SnippetInfo;
import org.graalvm.compiler.replacements.Snippets;
import org.graalvm.compiler.replacements.nodes.CStringConstant;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.meta.JavaKind;

View File

@ -22,13 +22,13 @@
*/
package org.graalvm.compiler.hotspot.replacements;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.compiler.hotspot.GraalHotSpotVMConfig.INJECTED_VMCONFIG;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.JAVA_THREAD_OSTHREAD_LOCATION;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.JAVA_THREAD_THREAD_OBJECT_LOCATION;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.osThreadInterruptedOffset;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.osThreadOffset;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.threadObjectOffset;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.compiler.api.replacements.ClassSubstitution;
import org.graalvm.compiler.api.replacements.MethodSubstitution;

View File

@ -44,10 +44,6 @@ import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.NOT_FREQ
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.probability;
import static org.graalvm.compiler.replacements.SnippetTemplate.DEFAULT_REPLACER;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.Pointer;
import org.graalvm.api.word.Unsigned;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter;
import org.graalvm.compiler.core.common.CompressEncoding;
@ -91,6 +87,10 @@ import org.graalvm.compiler.replacements.SnippetTemplate.SnippetInfo;
import org.graalvm.compiler.replacements.Snippets;
import org.graalvm.compiler.replacements.nodes.DirectStoreNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.Pointer;
import org.graalvm.word.Unsigned;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.Register;
import jdk.vm.ci.code.TargetDescription;

View File

@ -26,9 +26,6 @@ package org.graalvm.compiler.hotspot.replacements.arraycopy;
import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_UNKNOWN;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_UNKNOWN;
import org.graalvm.api.word.LocationIdentity;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayIndexScale;
@ -60,6 +57,7 @@ import org.graalvm.compiler.nodes.memory.MemoryNode;
import org.graalvm.compiler.nodes.memory.address.OffsetAddressNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.CodeUtil;
import jdk.vm.ci.meta.JavaConstant;

View File

@ -22,9 +22,8 @@
*/
package org.graalvm.compiler.hotspot.replacements.arraycopy;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.NamedLocationIdentity;
@ -32,6 +31,7 @@ import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.replacements.nodes.BasicArrayCopyNode;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,9 +25,8 @@ package org.graalvm.compiler.hotspot.replacements.arraycopy;
import jdk.vm.ci.code.BytecodeFrame;
import jdk.vm.ci.meta.JavaKind;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.hotspot.word.KlassPointer;
import org.graalvm.compiler.nodeinfo.InputType;
@ -37,6 +36,7 @@ import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.type.StampTool;
import org.graalvm.compiler.replacements.SnippetTemplate;
import org.graalvm.compiler.replacements.nodes.BasicArrayCopyNode;
import org.graalvm.word.LocationIdentity;
@NodeInfo(allowedUsageTypes = InputType.Memory)
public final class ArrayCopySlowPathNode extends BasicArrayCopyNode {

View File

@ -39,8 +39,6 @@ import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.probabil
import java.lang.reflect.Method;
import java.util.EnumMap;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Snippet;
@ -76,6 +74,8 @@ import org.graalvm.compiler.replacements.nodes.BasicArrayCopyNode;
import org.graalvm.compiler.replacements.nodes.ExplodeLoopNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.util.UnmodifiableEconomicMap;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.hotspot.HotSpotResolvedObjectType;

View File

@ -24,9 +24,8 @@ package org.graalvm.compiler.hotspot.replacements.arraycopy;
import jdk.vm.ci.meta.JavaKind;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.InputType;
@ -39,6 +38,7 @@ import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.memory.MemoryNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
@NodeInfo(allowedUsageTypes = InputType.Memory)
public class ArrayCopyUnrollNode extends ArrayRangeWriteNode implements MemoryCheckpoint.Single, Lowerable, MemoryAccess {

View File

@ -25,9 +25,6 @@ package org.graalvm.compiler.hotspot.replacements.arraycopy;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_UNKNOWN;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_UNKNOWN;
import org.graalvm.api.word.LocationIdentity;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayIndexScale;
@ -53,6 +50,7 @@ import org.graalvm.compiler.nodes.memory.address.OffsetAddressNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.CodeUtil;
import jdk.vm.ci.meta.JavaKind;

View File

@ -22,11 +22,10 @@
*/
package org.graalvm.compiler.hotspot.replacements.arraycopy;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_256;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_64;
import static org.graalvm.word.LocationIdentity.any;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.InputType;
@ -40,6 +39,7 @@ import org.graalvm.compiler.nodes.memory.MemoryNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.replacements.SnippetTemplate.Arguments;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;

View File

@ -35,11 +35,6 @@ import static org.graalvm.compiler.nodes.NamedLocationIdentity.any;
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.NOT_FREQUENT_PROBABILITY;
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.probability;
import static org.graalvm.compiler.replacements.SnippetTemplate.DEFAULT_REPLACER;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.Unsigned;
import org.graalvm.api.word.WordFactory;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayIndexScale;
import org.graalvm.compiler.api.replacements.Fold;
@ -58,6 +53,9 @@ import org.graalvm.compiler.replacements.SnippetTemplate.AbstractTemplates;
import org.graalvm.compiler.replacements.SnippetTemplate.Arguments;
import org.graalvm.compiler.replacements.SnippetTemplate.SnippetInfo;
import org.graalvm.compiler.word.ObjectAccess;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.Unsigned;
import org.graalvm.word.WordFactory;
import org.graalvm.compiler.replacements.Snippets;
import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.meta.JavaKind;

View File

@ -22,12 +22,12 @@
*/
package org.graalvm.compiler.hotspot.stubs;
import static org.graalvm.api.word.LocationIdentity.any;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEffect.DESTROYS_REGISTERS;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.SAFEPOINT;
import static org.graalvm.compiler.hotspot.meta.HotSpotForeignCallsProviderImpl.REEXECUTABLE;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.clearPendingException;
import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.registerAsWord;
import static org.graalvm.word.LocationIdentity.any;
import static jdk.vm.ci.hotspot.HotSpotCallingConventionType.NativeCall;
import org.graalvm.compiler.api.replacements.Fold;

View File

@ -36,7 +36,6 @@ import static org.graalvm.compiler.hotspot.stubs.StubUtil.fatal;
import static org.graalvm.compiler.hotspot.stubs.StubUtil.newDescriptor;
import static org.graalvm.compiler.hotspot.stubs.StubUtil.printf;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Fold.InjectedParameter;
import org.graalvm.compiler.api.replacements.Snippet;
@ -52,6 +51,7 @@ import org.graalvm.compiler.hotspot.meta.HotSpotProviders;
import org.graalvm.compiler.hotspot.nodes.StubForeignCallNode;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.Register;

View File

@ -24,9 +24,6 @@ package org.graalvm.compiler.hotspot.stubs;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEffect.DESTROYS_REGISTERS;
import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEffect.PRESERVES_REGISTERS;
import org.graalvm.api.word.LocationIdentity;
import static jdk.vm.ci.hotspot.HotSpotCallingConventionType.JavaCall;
import static jdk.vm.ci.hotspot.HotSpotCallingConventionType.JavaCallee;
import static jdk.vm.ci.hotspot.HotSpotCallingConventionType.NativeCall;
@ -57,6 +54,7 @@ import org.graalvm.compiler.replacements.GraphKit;
import org.graalvm.compiler.replacements.nodes.ReadRegisterNode;
import org.graalvm.compiler.word.Word;
import org.graalvm.compiler.word.WordTypes;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider;
import jdk.vm.ci.hotspot.HotSpotSignature;

View File

@ -41,9 +41,6 @@ import static org.graalvm.compiler.hotspot.stubs.StubUtil.handlePendingException
import static org.graalvm.compiler.hotspot.stubs.StubUtil.newDescriptor;
import static org.graalvm.compiler.hotspot.stubs.StubUtil.printf;
import static org.graalvm.compiler.hotspot.stubs.StubUtil.verifyObject;
import org.graalvm.api.word.WordFactory;
import static jdk.vm.ci.hotspot.HotSpotMetaAccessProvider.computeArrayAllocationSize;
import org.graalvm.compiler.api.replacements.Fold;
@ -62,6 +59,7 @@ import org.graalvm.compiler.hotspot.word.KlassPointer;
import org.graalvm.compiler.nodes.ConstantNode;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.Register;
import jdk.vm.ci.hotspot.HotSpotResolvedObjectType;

View File

@ -64,7 +64,6 @@ import static org.graalvm.compiler.hotspot.stubs.StubUtil.verifyObject;
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.FAST_PATH_PROBABILITY;
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.probability;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter;
@ -81,6 +80,7 @@ import org.graalvm.compiler.hotspot.word.KlassPointer;
import org.graalvm.compiler.nodes.ConstantNode;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.code.Register;
import jdk.vm.ci.hotspot.HotSpotResolvedObjectType;

View File

@ -35,8 +35,6 @@ import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.List;
import org.graalvm.api.word.Pointer;
import org.graalvm.api.word.WordFactory;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Fold.InjectedParameter;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
@ -52,6 +50,8 @@ import org.graalvm.compiler.nodes.SnippetAnchorNode;
import org.graalvm.compiler.nodes.extended.GuardingNode;
import org.graalvm.compiler.replacements.Log;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.Pointer;
import org.graalvm.word.WordFactory;
import jdk.vm.ci.meta.DeoptimizationAction;

View File

@ -32,7 +32,6 @@ import static org.graalvm.compiler.hotspot.stubs.StubUtil.decipher;
import static org.graalvm.compiler.hotspot.stubs.StubUtil.newDescriptor;
import static org.graalvm.compiler.hotspot.stubs.StubUtil.printf;
import org.graalvm.api.word.Pointer;
import org.graalvm.compiler.api.replacements.Fold;
import org.graalvm.compiler.api.replacements.Fold.InjectedParameter;
import org.graalvm.compiler.api.replacements.Snippet;
@ -48,6 +47,7 @@ import org.graalvm.compiler.hotspot.nodes.StubForeignCallNode;
import org.graalvm.compiler.nodes.UnwindNode;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.word.Word;
import org.graalvm.word.Pointer;
import jdk.vm.ci.code.Register;

View File

@ -27,10 +27,10 @@ import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.P
import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.READ_KLASS_POINTER;
import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.TO_KLASS_POINTER;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.Pointer;
import org.graalvm.compiler.word.Word.Opcode;
import org.graalvm.compiler.word.Word.Operation;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.Pointer;
/**
* Marker type for a metaspace pointer to a type.

View File

@ -25,15 +25,15 @@ package org.graalvm.compiler.hotspot.word;
import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.FROM_POINTER;
import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.IS_NULL;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.api.word.Pointer;
import org.graalvm.api.word.Signed;
import org.graalvm.api.word.Unsigned;
import org.graalvm.api.word.WordBase;
import org.graalvm.compiler.nodes.memory.HeapAccess.BarrierType;
import org.graalvm.compiler.word.Word;
import org.graalvm.compiler.word.Word.Opcode;
import org.graalvm.compiler.word.Word.Operation;
import org.graalvm.word.LocationIdentity;
import org.graalvm.word.Pointer;
import org.graalvm.word.Signed;
import org.graalvm.word.Unsigned;
import org.graalvm.word.WordBase;
/**
* Marker type for a metaspace pointer.

View File

@ -26,7 +26,7 @@ import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.P
import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.POINTER_NE;
import static org.graalvm.compiler.hotspot.word.HotSpotOperation.HotspotOpcode.TO_METHOD_POINTER;
import org.graalvm.api.word.Pointer;
import org.graalvm.word.Pointer;
/**
* Marker type for a metaspace pointer to a method.

View File

@ -264,7 +264,6 @@ import java.util.Comparator;
import java.util.Formatter;
import java.util.List;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.bytecode.Bytecode;
import org.graalvm.compiler.bytecode.BytecodeDisassembler;
@ -407,6 +406,7 @@ import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.graalvm.compiler.phases.util.ValueMergeUtil;
import org.graalvm.util.EconomicMap;
import org.graalvm.util.Equivalence;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.BailoutException;
import jdk.vm.ci.code.BytecodeFrame;
@ -1931,6 +1931,15 @@ public class BytecodeParser implements GraphBuilderContext {
return inlineInfo;
}
}
// There was no inline plugin with a definite answer to whether or not
// to inline. If we're parsing an intrinsic, then we need to enforce the
// invariant here that methods are always force inlined in intrinsics/snippets.
if (parsingIntrinsic()) {
if (inline(targetMethod, targetMethod, this.bytecodeProvider, args)) {
return SUCCESSFULLY_INLINED;
}
}
return null;
}
@ -3678,9 +3687,9 @@ public class BytecodeParser implements GraphBuilderContext {
ResolvedJavaType resolvedType = (ResolvedJavaType) type;
ClassInitializationPlugin classInitializationPlugin = this.graphBuilderConfig.getPlugins().getClassInitializationPlugin();
if (classInitializationPlugin != null && classInitializationPlugin.shouldApply(this, resolvedType.getArrayClass())) {
if (classInitializationPlugin != null && classInitializationPlugin.shouldApply(this, resolvedType)) {
FrameState stateBefore = frameState.create(bci(), getNonIntrinsicAncestor(), false, null, null);
classInitializationPlugin.apply(this, resolvedType.getArrayClass(), stateBefore);
classInitializationPlugin.apply(this, resolvedType, stateBefore);
}
ValueNode length = frameState.pop(JavaKind.Int);

View File

@ -0,0 +1,56 @@
/*
* Copyright (c) 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.graalvm.compiler.nodes.test;
import java.lang.reflect.Constructor;
import org.graalvm.compiler.core.test.GraalCompilerTest;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.junit.Test;
public class StaticFieldAccessTest extends GraalCompilerTest {
static StaticFieldAccessTest tester;
public static class Inner {
static Object o;
static {
Constructor<?>[] c = Inner.class.getConstructors();
if (c.length != 1) {
throw new InternalError("can't find single constructor");
}
tester.parseDebug(tester.asResolvedJavaMethod(c[0]), AllowAssumptions.YES);
}
public Inner(Object o) {
Inner.o = o;
}
}
@Test
public void test() {
tester = this;
System.out.println(Inner.o);
}
}

View File

@ -24,7 +24,7 @@ package org.graalvm.compiler.nodes;
import jdk.vm.ci.meta.JavaKind.FormatWithToString;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.ResolvedJavaField;

View File

@ -23,7 +23,7 @@
package org.graalvm.compiler.nodes;
import jdk.vm.ci.meta.JavaKind;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeClass;
@ -41,6 +41,7 @@ import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.compiler.nodes.spi.UncheckedInterfaceProvider;
import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.word.LocationIdentity;
import java.util.Map;

View File

@ -23,7 +23,7 @@
package org.graalvm.compiler.nodes;
import jdk.vm.ci.meta.JavaKind;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeClass;
@ -37,6 +37,7 @@ import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.compiler.nodes.spi.UncheckedInterfaceProvider;
import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.word.LocationIdentity;
import java.util.Map;

View File

@ -26,10 +26,10 @@ import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_0;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_0;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.word.LocationIdentity;
@NodeInfo(allowedUsageTypes = {Memory}, cycles = CYCLES_0, size = SIZE_0)
public final class KillingBeginNode extends AbstractBeginNode implements MemoryCheckpoint.Single {

View File

@ -25,7 +25,7 @@ package org.graalvm.compiler.nodes;
import java.util.EnumMap;
import org.graalvm.util.Equivalence;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.word.LocationIdentity;
import org.graalvm.util.EconomicSet;
import jdk.vm.ci.meta.JavaKind;

View File

@ -26,10 +26,10 @@ import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_0;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_0;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.word.LocationIdentity;
/**
* The start node of a graph.

View File

@ -234,6 +234,7 @@ public final class StructuredGraph extends Graph implements JavaMethodContext {
private final int entryBCI;
private GuardsStage guardsStage = GuardsStage.FLOATING_GUARDS;
private boolean isAfterFloatingReadPhase = false;
private boolean isAfterFixedReadPhase = false;
private boolean hasValueProxies = true;
private boolean isAfterExpandLogic = false;
private final boolean useProfilingInfo;
@ -685,11 +686,20 @@ public final class StructuredGraph extends Graph implements JavaMethodContext {
return isAfterFloatingReadPhase;
}
public boolean isAfterFixedReadPhase() {
return isAfterFixedReadPhase;
}
public void setAfterFloatingReadPhase(boolean state) {
assert state : "cannot 'unapply' floating read phase on graph";
isAfterFloatingReadPhase = state;
}
public void setAfterFixReadPhase(boolean state) {
assert state : "cannot 'unapply' fix reads phase on graph";
isAfterFixedReadPhase = state;
}
public boolean hasValueProxies() {
return hasValueProxies;
}

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.cfg;
import java.util.ArrayList;
import java.util.Iterator;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.cfg.AbstractBlockBase;
import org.graalvm.compiler.core.common.cfg.AbstractControlFlowGraph;
import org.graalvm.compiler.core.common.cfg.Loop;
@ -38,6 +37,7 @@ import org.graalvm.compiler.nodes.InvokeWithExceptionNode;
import org.graalvm.compiler.nodes.LoopBeginNode;
import org.graalvm.compiler.nodes.LoopEndNode;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.word.LocationIdentity;
public final class Block extends AbstractBlockBase<Block> {

View File

@ -22,9 +22,9 @@
*/
package org.graalvm.compiler.nodes.cfg;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.cfg.Loop;
import org.graalvm.compiler.nodes.LoopBeginNode;
import org.graalvm.word.LocationIdentity;
public final class HIRLoop extends Loop<Block> {

View File

@ -26,7 +26,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.word.LocationIdentity;
public class LocationSet {
private LocationIdentity firstLocation;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.debug;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_IGNORED;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_IGNORED;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.InputType;
@ -35,6 +34,7 @@ import org.graalvm.compiler.nodes.NamedLocationIdentity;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.extended;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_8;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_8;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.core.common.type.TypeReference;
@ -38,6 +37,7 @@ import org.graalvm.compiler.nodes.memory.AbstractMemoryCheckpoint;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.MetaAccessProvider;

View File

@ -29,7 +29,6 @@ import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_2;
import java.util.List;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor;
import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
@ -47,6 +46,7 @@ import org.graalvm.compiler.nodes.memory.AbstractMemoryCheckpoint;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.code.BytecodeFrame;
import jdk.vm.ci.meta.JavaKind;

View File

@ -24,10 +24,10 @@ package org.graalvm.compiler.nodes.extended;
import static org.graalvm.compiler.nodeinfo.InputType.Guard;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.extended;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeClass;
@ -37,6 +36,7 @@ import org.graalvm.compiler.nodes.memory.ReadNode;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;

View File

@ -22,7 +22,6 @@
*/
package org.graalvm.compiler.nodes.extended;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.StateSplit;
@ -33,6 +32,7 @@ import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;

View File

@ -26,7 +26,6 @@ import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_2;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
@ -34,6 +33,7 @@ import org.graalvm.compiler.nodes.FixedWithNextNode;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.word.LocationIdentity;
/**
* Creates a memory barrier.

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.extended;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.PrimitiveStamp;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.core.common.type.StampFactory;
@ -40,6 +39,7 @@ import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.nodes.spi.Virtualizable;
import org.graalvm.compiler.nodes.spi.VirtualizerTool;
import org.graalvm.compiler.nodes.virtual.VirtualObjectNode;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.Assumptions;
import jdk.vm.ci.meta.JavaKind;

View File

@ -26,7 +26,6 @@ import static org.graalvm.compiler.nodeinfo.InputType.State;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
@ -41,6 +40,7 @@ import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.nodes.spi.Virtualizable;
import org.graalvm.compiler.nodes.spi.VirtualizerTool;
import org.graalvm.compiler.nodes.virtual.VirtualObjectNode;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.Assumptions;
import jdk.vm.ci.meta.JavaConstant;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.extended;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeClass;
@ -36,6 +35,7 @@ import org.graalvm.compiler.nodes.FixedWithNextNode;
import org.graalvm.compiler.nodes.NamedLocationIdentity;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.type.StampTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.Assumptions;
import jdk.vm.ci.meta.JavaKind;

View File

@ -22,11 +22,11 @@
*/
package org.graalvm.compiler.nodes.extended;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.graph.Node.ConstantNodeParameter;
import org.graalvm.compiler.graph.Node.NodeIntrinsic;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.ResolvedJavaMethod;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.extended;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
@ -33,6 +32,7 @@ import org.graalvm.compiler.nodes.FixedWithNextNode;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.extended;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
@ -34,6 +33,7 @@ import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.java;
import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.InputType.State;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.InputType;
@ -37,6 +36,7 @@ import org.graalvm.compiler.nodes.memory.FixedAccessNode;
import org.graalvm.compiler.nodes.memory.LIRLowerableAccess;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.word.LocationIdentity;
/**
* Low-level atomic compare-and-swap operation.

View File

@ -63,7 +63,6 @@ public abstract class AccessFieldNode extends FixedWithNextNode implements Lower
super(c, stamp);
this.object = object;
this.field = field;
assert object != null || field.getDeclaringClass().isInitialized();
}
/**

View File

@ -27,7 +27,6 @@ import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_8;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_2;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
@ -37,6 +36,7 @@ import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.Value;
import sun.misc.Unsafe;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.java;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_8;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_2;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
@ -34,6 +33,7 @@ import org.graalvm.compiler.nodes.memory.AbstractMemoryCheckpoint;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaKind;
import sun.misc.Unsafe;

View File

@ -24,7 +24,7 @@ package org.graalvm.compiler.nodes.java;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.MetaAccessProvider;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.core.common.type.TypeReference;
import org.graalvm.compiler.graph.NodeClass;
@ -38,6 +38,7 @@ import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
import org.graalvm.compiler.nodes.spi.Lowerable;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.word.LocationIdentity;
import static org.graalvm.compiler.nodeinfo.InputType.Memory;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_8;

View File

@ -25,7 +25,6 @@ package org.graalvm.compiler.nodes.java;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_8;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_8;
import org.graalvm.api.word.LocationIdentity;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.graph.NodeClass;
@ -34,6 +33,7 @@ import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.word.LocationIdentity;
import jdk.vm.ci.meta.JavaConstant;
import jdk.vm.ci.meta.JavaKind;

Some files were not shown because too many files have changed in this diff Show More