Skip to content

Commit e1c63a1

Browse files
committed
[GR-31345] Increase coverage in several compiler packages.
PullRequest: graal/13903
2 parents 9a585f1 + cfca496 commit e1c63a1

File tree

14 files changed

+10
-204
lines changed

14 files changed

+10
-204
lines changed

compiler/src/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,18 +1524,6 @@ public void not(int size, Register dst, Register src) {
15241524
super.orn(size, dst, zr, src, ShiftType.LSL, 0);
15251525
}
15261526

1527-
/**
1528-
* dst = src1 & ~(src2) and sets condition flags.
1529-
*
1530-
* @param size register size. Has to be 32 or 64.
1531-
* @param dst general purpose register. May not be null or stackpointer.
1532-
* @param src1 general purpose register. May not be null or stackpointer.
1533-
* @param src2 general purpose register. May not be null or stackpointer.
1534-
*/
1535-
public void bics(int size, Register dst, Register src1, Register src2) {
1536-
super.bics(size, dst, src1, src2, ShiftType.LSL, 0);
1537-
}
1538-
15391527
/**
15401528
* Sign-extend value from src into dst.
15411529
*
@@ -1935,16 +1923,6 @@ public enum AArch64ExceptionCode {
19351923
}
19361924
}
19371925

1938-
/**
1939-
* Halting mode software breakpoint: Enters halting mode debug state if enabled, else treated as
1940-
* UNALLOCATED instruction.
1941-
*
1942-
* @param exceptionCode exception code specifying why halt was called. Non null.
1943-
*/
1944-
public void hlt(AArch64ExceptionCode exceptionCode) {
1945-
super.hlt(exceptionCode.encoding);
1946-
}
1947-
19481926
/**
19491927
* Monitor mode software breakpoint: exception routed to a debug monitor executing in a higher
19501928
* exception level.
@@ -1966,14 +1944,6 @@ public void nop() {
19661944
super.hint(SystemHint.NOP);
19671945
}
19681946

1969-
/**
1970-
* Consumption of Speculative Data Barrier. This is a memory barrier that controls speculative
1971-
* execution and data value prediction.
1972-
*/
1973-
public void csdb() {
1974-
super.hint(SystemHint.CSDB);
1975-
}
1976-
19771947
/**
19781948
* Ensures current execution state is committed before continuing.
19791949
*/

compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -97,7 +97,6 @@
9797

9898
import jdk.vm.ci.aarch64.AArch64;
9999
import jdk.vm.ci.aarch64.AArch64Kind;
100-
import jdk.vm.ci.code.CallingConvention;
101100
import jdk.vm.ci.code.Register;
102101
import jdk.vm.ci.code.RegisterValue;
103102
import jdk.vm.ci.code.StackSlot;
@@ -792,8 +791,6 @@ public LIRInstruction createZapArgumentSpace(StackSlot[] zappedStack, JavaConsta
792791
return new AArch64ZapStackOp(zappedStack, zapValues);
793792
}
794793

795-
public abstract void emitCCall(long address, CallingConvention nativeCallingConvention, Value[] args);
796-
797794
@Override
798795
public void emitSpeculationFence() {
799796
append(new AArch64SpeculativeBarrier());

compiler/src/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -80,13 +80,6 @@ public interface DebugConfig {
8080
*/
8181
boolean isVerifyEnabled(DebugContext.Scope scope);
8282

83-
/**
84-
* Determines if verification is enabled for any {@link JavaMethod} in the provided scope.
85-
*
86-
* @see DebugContext#verify(Object, String)
87-
*/
88-
boolean isVerifyEnabledForMethod(DebugContext.Scope scope);
89-
9083
/**
9184
* @see DebugContext#timer(CharSequence)
9285
*/

compiler/src/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ public boolean isVerifyEnabled(DebugContext.Scope scope) {
145145
return isEnabled(scope, verifyFilter);
146146
}
147147

148-
@Override
149-
public boolean isVerifyEnabledForMethod(DebugContext.Scope scope) {
150-
return isEnabledForMethod(scope, verifyFilter);
151-
}
152-
153148
@Override
154149
public boolean isTimeEnabled(DebugContext.Scope scope) {
155150
return isEnabled(scope, timerFilter);

compiler/src/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2018, Red Hat Inc. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -66,7 +66,6 @@
6666
import org.graalvm.compiler.lir.Variable;
6767
import org.graalvm.compiler.lir.VirtualStackSlot;
6868
import org.graalvm.compiler.lir.aarch64.AArch64AddressValue;
69-
import org.graalvm.compiler.lir.aarch64.AArch64CCall;
7069
import org.graalvm.compiler.lir.aarch64.AArch64Call;
7170
import org.graalvm.compiler.lir.aarch64.AArch64ControlFlow.StrategySwitchOp;
7271
import org.graalvm.compiler.lir.aarch64.AArch64FrameMapBuilder;
@@ -149,25 +148,6 @@ protected void emitForeignCallOp(ForeignCallLinkage linkage, Value targetAddress
149148
}
150149
}
151150

152-
@Override
153-
public void emitTailcall(Value[] args, Value address) {
154-
throw GraalError.unimplemented();
155-
}
156-
157-
@Override
158-
public void emitCCall(long address, CallingConvention nativeCallingConvention, Value[] args) {
159-
Value[] argLocations = new Value[args.length];
160-
getResult().getFrameMapBuilder().callsMethod(nativeCallingConvention);
161-
for (int i = 0; i < args.length; i++) {
162-
Value arg = args[i];
163-
AllocatableValue loc = nativeCallingConvention.getArgument(i);
164-
emitMove(loc, arg);
165-
argLocations[i] = loc;
166-
}
167-
Value ptr = emitLoadConstant(LIRKind.value(AArch64Kind.QWORD), JavaConstant.forLong(address));
168-
append(new AArch64CCall(nativeCallingConvention.getReturn(), ptr, argLocations));
169-
}
170-
171151
/**
172152
* @param savedRegisters the registers saved by this operation which may be subject to pruning
173153
* @param savedRegisterLocations the slots to which the registers are saved

compiler/src/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoadAddressOp.java

Lines changed: 0 additions & 71 deletions
This file was deleted.

compiler/src/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -33,12 +33,9 @@
3333
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.STACK;
3434

3535
import org.graalvm.compiler.asm.Label;
36-
import org.graalvm.compiler.asm.aarch64.AArch64Address;
3736
import org.graalvm.compiler.asm.aarch64.AArch64Assembler;
3837
import org.graalvm.compiler.asm.aarch64.AArch64MacroAssembler;
3938
import org.graalvm.compiler.core.common.CompressEncoding;
40-
import org.graalvm.compiler.hotspot.HotSpotMarkId;
41-
import org.graalvm.compiler.lir.LIRInstruction;
4239
import org.graalvm.compiler.lir.LIRInstructionClass;
4340
import org.graalvm.compiler.lir.StandardOp.LoadConstantOp;
4441
import org.graalvm.compiler.lir.aarch64.AArch64LIRInstruction;
@@ -85,30 +82,6 @@ public Constant getConstant() {
8582
}
8683
}
8784

88-
public static final class BaseMove extends AArch64LIRInstruction {
89-
public static final LIRInstructionClass<BaseMove> TYPE = LIRInstructionClass.create(BaseMove.class);
90-
91-
@LIRInstruction.Def({REG, HINT}) protected AllocatableValue result;
92-
93-
public BaseMove(AllocatableValue result) {
94-
super(TYPE);
95-
this.result = result;
96-
}
97-
98-
@Override
99-
public void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm) {
100-
try (AArch64MacroAssembler.ScratchRegister sc = masm.getScratchRegister()) {
101-
Register scratch = sc.getRegister();
102-
masm.adrp(scratch);
103-
masm.add(64, scratch, scratch, 1);
104-
masm.ldr(64, asRegister(result), AArch64Address.createBaseRegisterOnlyAddress(64, scratch));
105-
masm.nop();
106-
crb.recordMark(HotSpotMarkId.NARROW_KLASS_BASE_ADDRESS);
107-
}
108-
}
109-
110-
}
111-
11285
/**
11386
* Compresses a 8-byte pointer as a 4-byte int.
11487
*/

compiler/src/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -425,11 +425,6 @@ public Variable emitForeignCall(ForeignCallLinkage linkage, LIRFrameState state,
425425
return result;
426426
}
427427

428-
@Override
429-
public void emitTailcall(Value[] args, Value address) {
430-
append(new AMD64TailcallOp(args, address));
431-
}
432-
433428
@Override
434429
public void emitCCall(long address, CallingConvention nativeCallingConvention, Value[] args, int numberOfFloatingPointArguments) {
435430
Value[] argLocations = new Value[args.length];

compiler/src/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@
3939
*/
4040
public interface HotSpotLIRGenerator extends LIRGeneratorTool {
4141

42-
/**
43-
* Emits an operation to make a tail call.
44-
*
45-
* @param args the arguments of the call
46-
* @param address the target address of the call
47-
*/
48-
void emitTailcall(Value[] args, Value address);
49-
5042
/**
5143
* Emits code that jumps to the deopt blob uncommon_trap entry point with {@code action} and
5244
* {@code reason}.

compiler/src/org.graalvm.graphio/src/org/graalvm/graphio/GraphProtocol.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -243,8 +243,6 @@ public final void close() {
243243

244244
protected abstract int findNodeId(Node n);
245245

246-
protected abstract void findExtraNodes(Node node, Collection<? super Node> extraNodes);
247-
248246
protected abstract boolean hasPredecessor(Node node);
249247

250248
protected abstract int findNodesCount(Graph info);

0 commit comments

Comments
 (0)