public class SPARCHotSpotLIRGenerator extends SPARCLIRGenerator implements HotSpotLIRGenerator
LIRGenerator.OptionsLIRGeneratorTool.BlockScope, LIRGeneratorTool.SpillMoveFactory| Modifier and Type | Field and Description |
|---|---|
(package private) HotSpotVMConfig |
config |
private LIRFrameState |
currentRuntimeCallInfo |
private StackSlot |
deoptimizationRescueSlot
The slot reserved for storing the original return address when a frame is marked for
deoptimization.
|
private HotSpotLockStack |
lockStack |
private AllocatableValue |
safepointAddressValue
Value where the address for safepoint poll is kept.
|
| Modifier | Constructor and Description |
|---|---|
|
SPARCHotSpotLIRGenerator(HotSpotProviders providers,
HotSpotVMConfig config,
CallingConvention cc,
LIRGenerationResult lirGenRes) |
protected |
SPARCHotSpotLIRGenerator(LIRKindTool lirKindTool,
HotSpotProviders providers,
HotSpotVMConfig config,
CallingConvention cc,
LIRGenerationResult lirGenRes) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeRegisterAllocation()
Called just before register allocation is performed on the LIR owned by this generator.
|
boolean |
canInlineConstant(JavaConstant c)
Checks whether the supplied constant can be used without loading it into a register for most
operations, i.e., for commonly used arithmetic, logical, and comparison operations.
|
private static boolean |
canStoreConstant(JavaConstant c) |
LIRInstruction |
createBenchmarkCounter(String name,
String group,
Value increment) |
protected SPARCLIRInstruction |
createMove(AllocatableValue dst,
Value src) |
LIRInstruction |
createMultiBenchmarkCounter(String[] names,
String[] groups,
Value[] increments) |
protected boolean |
emitCompare(PlatformKind cmpKind,
Value a,
Value b)
This method emits the compare instruction, and may reorder the operands.
|
Variable |
emitCompareAndSwap(Value address,
Value expectedValue,
Value newValue,
Value trueValue,
Value falseValue) |
void |
emitCompareBranch(PlatformKind cmpKind,
Value x,
Value y,
Condition cond,
boolean unorderedIsTrue,
LabelRef trueDestination,
LabelRef falseDestination,
double trueDestinationProbability) |
Value |
emitCompress(Value pointer,
HotSpotVMConfig.CompressEncoding encoding,
boolean nonNull) |
Value |
emitDeoptimizationFetchUnrollInfoCall(StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
DeoptimizationFetchUnrollInfoCallNode. |
void |
emitDeoptimize(Value actionAndReason,
Value speculation,
LIRFrameState state) |
void |
emitDeoptimizeCaller(DeoptimizationAction action,
DeoptimizationReason reason) |
void |
emitEnterUnpackFramesStackFrame(Value framePc,
Value senderSp,
Value senderFp,
StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
EnterUnpackFramesStackFrameNode. |
Variable |
emitForeignCall(ForeignCallLinkage linkage,
LIRFrameState state,
Value... args) |
protected void |
emitForeignCallOp(ForeignCallLinkage linkage,
Value result,
Value[] arguments,
Value[] temps,
LIRFrameState info)
Emits the single call operation at the heart of generating LIR for a
foreign call.
|
void |
emitLeaveCurrentStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
LeaveCurrentStackFrameNode. |
void |
emitLeaveDeoptimizedStackFrame(Value frameSize,
Value initialInfo)
Emits code for a
LeaveDeoptimizedStackFrameNode. |
void |
emitLeaveUnpackFramesStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
LeaveUnpackFramesStackFrameNode. |
Variable |
emitLoad(LIRKind kind,
Value address,
LIRFrameState state) |
void |
emitNullCheck(Value address,
LIRFrameState state) |
void |
emitPrefetchAllocate(Value address) |
void |
emitPushInterpreterFrame(Value frameSize,
Value framePc,
Value senderSp,
Value initialInfo)
Emits code for a
PushInterpreterFrameNode. |
void |
emitReturn(Value input)
Emits a return instruction.
|
StandardOp.SaveRegistersOp |
emitSaveAllRegisters()
Emits code for a
SaveAllRegistersNode. |
protected SPARCSaveRegistersOp |
emitSaveRegisters(Register[] savedRegisters,
StackSlotValue[] savedRegisterLocations,
boolean supportsRemove) |
void |
emitStore(LIRKind kind,
Value address,
Value inputVal,
LIRFrameState state) |
void |
emitTailcall(Value[] args,
Value address)
Emits an operation to make a tail call.
|
Value |
emitUncommonTrapCall(Value trapRequest,
StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
UncommonTrapCallNode. |
Value |
emitUncompress(Value pointer,
HotSpotVMConfig.CompressEncoding encoding,
boolean nonNull) |
void |
emitUnwind(Value exception) |
StackSlot |
getDeoptimizationRescueSlot() |
StackSlotValue |
getLockSlot(int lockDepth)
Gets a stack slot for a lock at a given lock nesting depth.
|
private HotSpotLockStack |
getLockStack() |
HotSpotProviders |
getProviders() |
AllocatableValue |
getSafepointAddressValue() |
Stub |
getStub() |
private void |
moveDeoptValuesToThread(Value actionAndReason,
Value speculation) |
private void |
moveValueToThread(Value v,
int offset) |
boolean |
needOnlyOopMaps()
Determines if only oop maps are required for the code generated from the LIR.
|
protected void |
setLockStack(HotSpotLockStack lockStack) |
asAddressValue, createStackMove, emitAdd, emitAddress, emitAnd, emitArrayEquals, emitBitCount, emitBitScanForward, emitBitScanReverse, emitByteSwap, emitConditionalMove, emitData, emitDiv, emitFloatConvert, emitIntegerTestBranch, emitIntegerTestMove, emitJump, emitLoadConstantTableBase, emitMathAbs, emitMathSqrt, emitMembar, emitMove, emitMul, emitMulHigh, emitNarrow, emitNegate, emitNot, emitOr, emitOverflowCheckBranch, emitReinterpret, emitRem, emitShl, emitShr, emitSignExtend, emitSignExtendLoad, emitStrategySwitch, emitSub, emitTableSwitch, emitUDiv, emitUMulHigh, emitURem, emitUShr, emitXor, emitZeroExtend, getArchitecture, getConstantTableBase, getSpillMoveFactoryappend, asAllocatable, attributes, emitAdd, emitBlackhole, emitIncomingValues, emitLoadConstant, emitMove, emitStrategySwitch, emitSub, getAddressKind, getBlockScope, getCallingConvention, getCodeCache, getCurrentBlock, getForeignCalls, getLIRKind, getLIRKindTool, getMetaAccess, getResult, hasBlockEnd, load, loadNonConst, newVariable, resultOperandFor, target, toStackKind, zapValueForKindclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitemitCardTableAddress, emitCardTableShiftappend, asAllocatable, attributes, emitAddress, emitArrayEquals, emitAtomicReadAndAdd, emitAtomicReadAndWrite, emitBitCount, emitBitScanForward, emitBitScanReverse, emitBlackhole, emitByteSwap, emitConditionalMove, emitCountLeadingZeros, emitCountTrailingZeros, emitData, emitIncomingValues, emitIntegerTestBranch, emitIntegerTestMove, emitJump, emitLoadConstant, emitMembar, emitMove, emitMove, emitOverflowCheckBranch, emitStrategySwitch, emitStrategySwitch, getBlockScope, getCallingConvention, getCodeCache, getCurrentBlock, getForeignCalls, getMetaAccess, getResult, getSpillMoveFactory, hasBlockEnd, load, loadNonConst, newVariable, resultOperandFor, targetemitAdd, emitAnd, emitDiv, emitFloatConvert, emitMathAbs, emitMathSqrt, emitMul, emitMulHigh, emitNarrow, emitNegate, emitNot, emitOr, emitReinterpret, emitRem, emitShl, emitShr, emitSignExtend, emitSub, emitUDiv, emitUMulHigh, emitURem, emitUShr, emitXor, emitZeroExtend, getLIRKindfinal HotSpotVMConfig config
private HotSpotLockStack lockStack
private LIRFrameState currentRuntimeCallInfo
private StackSlot deoptimizationRescueSlot
private AllocatableValue safepointAddressValue
public SPARCHotSpotLIRGenerator(HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes)
protected SPARCHotSpotLIRGenerator(LIRKindTool lirKindTool, HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes)
public HotSpotProviders getProviders()
getProviders in interface HotSpotLIRGeneratorgetProviders in interface LIRGeneratorToolgetProviders in class LIRGeneratorpublic StackSlotValue getLockSlot(int lockDepth)
HotSpotLIRGeneratorgetLockSlot in interface HotSpotLIRGeneratorprivate HotSpotLockStack getLockStack()
protected void setLockStack(HotSpotLockStack lockStack)
public boolean needOnlyOopMaps()
LIRGeneratorneedOnlyOopMaps in interface LIRGeneratorToolneedOnlyOopMaps in class LIRGeneratorpublic void beforeRegisterAllocation()
LIRGeneratorToolbeforeRegisterAllocation in interface LIRGeneratorToolbeforeRegisterAllocation in class SPARCLIRGeneratorprotected void emitForeignCallOp(ForeignCallLinkage linkage, Value result, Value[] arguments, Value[] temps, LIRFrameState info)
LIRGeneratoremitForeignCallOp in class SPARCLIRGeneratorpublic Variable emitForeignCall(ForeignCallLinkage linkage, LIRFrameState state, Value... args)
emitForeignCall in interface LIRGeneratorToolemitForeignCall in class LIRGeneratorpublic void emitReturn(Value input)
LIRGeneratorToolemitReturn in interface LIRGeneratorToolemitReturn in class SPARCLIRGeneratorpublic void emitTailcall(Value[] args, Value address)
HotSpotLIRGeneratoremitTailcall in interface HotSpotLIRGeneratorargs - the arguments of the calladdress - the target address of the callpublic void emitUnwind(Value exception)
emitUnwind in interface LIRGeneratorToolprivate void moveDeoptValuesToThread(Value actionAndReason, Value speculation)
private void moveValueToThread(Value v, int offset)
public void emitDeoptimize(Value actionAndReason, Value speculation, LIRFrameState state)
emitDeoptimize in interface LIRGeneratorToolemitDeoptimize in class SPARCLIRGeneratorpublic void emitDeoptimizeCaller(DeoptimizationAction action, DeoptimizationReason reason)
emitDeoptimizeCaller in interface HotSpotLIRGeneratorpublic Variable emitLoad(LIRKind kind, Value address, LIRFrameState state)
emitLoad in interface LIRGeneratorToolprivate static boolean canStoreConstant(JavaConstant c)
public boolean canInlineConstant(JavaConstant c)
LIRGeneratorcanInlineConstant in class SPARCLIRGeneratorc - The constant to check.public void emitStore(LIRKind kind, Value address, Value inputVal, LIRFrameState state)
emitStore in interface LIRGeneratorToolpublic Variable emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue)
emitCompareAndSwap in interface LIRGeneratorToolpublic void emitPrefetchAllocate(Value address)
emitPrefetchAllocate in interface HotSpotLIRGeneratorpublic StackSlot getDeoptimizationRescueSlot()
protected SPARCLIRInstruction createMove(AllocatableValue dst, Value src)
createMove in class SPARCLIRGeneratorpublic void emitCompareBranch(PlatformKind cmpKind, Value x, Value y, Condition cond, boolean unorderedIsTrue, LabelRef trueDestination, LabelRef falseDestination, double trueDestinationProbability)
emitCompareBranch in interface LIRGeneratorToolemitCompareBranch in class SPARCLIRGeneratorprotected boolean emitCompare(PlatformKind cmpKind, Value a, Value b)
SPARCLIRGeneratoremitCompare in class SPARCLIRGeneratorcmpKind - Kind how a and b have to be compareda - the left operand of the comparisonb - the right operand of the comparisonpublic Value emitCompress(Value pointer, HotSpotVMConfig.CompressEncoding encoding, boolean nonNull)
emitCompress in interface HotSpotLIRGeneratorpublic Value emitUncompress(Value pointer, HotSpotVMConfig.CompressEncoding encoding, boolean nonNull)
emitUncompress in interface HotSpotLIRGeneratorprotected SPARCSaveRegistersOp emitSaveRegisters(Register[] savedRegisters, StackSlotValue[] savedRegisterLocations, boolean supportsRemove)
savedRegisters - the registers saved by this operation which may be subject to pruningsavedRegisterLocations - the slots to which the registers are savedsupportsRemove - determines if registers can be prunedpublic StandardOp.SaveRegistersOp emitSaveAllRegisters()
HotSpotLIRGeneratorSaveAllRegistersNode.emitSaveAllRegisters in interface HotSpotLIRGeneratorStandardOp.SaveRegistersOp operationpublic void emitLeaveCurrentStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorLeaveCurrentStackFrameNode.emitLeaveCurrentStackFrame in interface HotSpotLIRGeneratorsaveRegisterOp - saved registerspublic void emitLeaveDeoptimizedStackFrame(Value frameSize, Value initialInfo)
HotSpotLIRGeneratorLeaveDeoptimizedStackFrameNode.emitLeaveDeoptimizedStackFrame in interface HotSpotLIRGeneratorpublic void emitEnterUnpackFramesStackFrame(Value framePc, Value senderSp, Value senderFp, StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorEnterUnpackFramesStackFrameNode.emitEnterUnpackFramesStackFrame in interface HotSpotLIRGeneratorpublic void emitLeaveUnpackFramesStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorLeaveUnpackFramesStackFrameNode.emitLeaveUnpackFramesStackFrame in interface HotSpotLIRGeneratorpublic void emitPushInterpreterFrame(Value frameSize, Value framePc, Value senderSp, Value initialInfo)
HotSpotLIRGeneratorPushInterpreterFrameNode.emitPushInterpreterFrame in interface HotSpotLIRGeneratorpublic Value emitUncommonTrapCall(Value trapRequest, StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorUncommonTrapCallNode.emitUncommonTrapCall in interface HotSpotLIRGeneratorDeoptimization::UnrollBlock pointerpublic Value emitDeoptimizationFetchUnrollInfoCall(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorDeoptimizationFetchUnrollInfoCallNode.emitDeoptimizationFetchUnrollInfoCall in interface HotSpotLIRGeneratorDeoptimization::UnrollBlock pointerpublic void emitNullCheck(Value address, LIRFrameState state)
emitNullCheck in interface LIRGeneratorToolemitNullCheck in class SPARCLIRGeneratorpublic LIRInstruction createBenchmarkCounter(String name, String group, Value increment)
createBenchmarkCounter in interface BenchmarkCounterFactorycreateBenchmarkCounter in class LIRGeneratorpublic LIRInstruction createMultiBenchmarkCounter(String[] names, String[] groups, Value[] increments)
createMultiBenchmarkCounter in interface BenchmarkCounterFactorycreateMultiBenchmarkCounter in class LIRGeneratorpublic AllocatableValue getSafepointAddressValue()