package org.graalvm.compiler.hotspot;
import jdk.internal.vm.compiler.collections.EconomicMap;
import jdk.internal.vm.compiler.collections.Equivalence;
import org.graalvm.compiler.core.common.CompilationIdentifier;
import org.graalvm.compiler.core.common.alloc.RegisterAllocationConfig;
import org.graalvm.compiler.hotspot.stubs.Stub;
import org.graalvm.compiler.lir.LIR;
import org.graalvm.compiler.lir.LIRFrameState;
import org.graalvm.compiler.lir.StandardOp.SaveRegistersOp;
import org.graalvm.compiler.lir.framemap.FrameMapBuilder;
import org.graalvm.compiler.lir.gen.LIRGenerationResult;
import jdk.vm.ci.code.CallingConvention;
import jdk.vm.ci.code.StackSlot;
public class HotSpotLIRGenerationResult extends LIRGenerationResult {
private StackSlot deoptimizationRescueSlot;
protected final Object stub;
private final boolean requiresReservedStackAccessCheck;
private int maxInterpreterFrameSize;
private EconomicMap<LIRFrameState, SaveRegistersOp> calleeSaveInfo = EconomicMap.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE);
public HotSpotLIRGenerationResult(CompilationIdentifier compilationId, LIR lir, FrameMapBuilder frameMapBuilder, RegisterAllocationConfig registerAllocationConfig,
CallingConvention callingConvention, Object stub, boolean requiresReservedStackAccessCheck) {
super(compilationId, lir, frameMapBuilder, registerAllocationConfig, callingConvention);
this.stub = stub;
this.requiresReservedStackAccessCheck = requiresReservedStackAccessCheck;
}
public EconomicMap<LIRFrameState, SaveRegistersOp> getCalleeSaveInfo() {
return calleeSaveInfo;
}
public Stub getStub() {
return (Stub) stub;
}
public StackSlot getDeoptimizationRescueSlot() {
return deoptimizationRescueSlot;
}
public final void setDeoptimizationRescueSlot(StackSlot stackSlot) {
this.deoptimizationRescueSlot = stackSlot;
}
public void setMaxInterpreterFrameSize(int maxInterpreterFrameSize) {
this.maxInterpreterFrameSize = maxInterpreterFrameSize;
}
public int getMaxInterpreterFrameSize() {
return maxInterpreterFrameSize;
}
public boolean requiresReservedStackAccessCheck() {
return requiresReservedStackAccessCheck;
}
}