public class SPARCHotSpotLIRGenerator extends SPARCLIRGenerator implements HotSpotLIRGenerator
LIRGenerator.Options
LIRGeneratorTool.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, getSpillMoveFactory
append, 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, zapValueForKind
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
emitCardTableAddress, emitCardTableShift
append, 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, target
emitAdd, emitAnd, emitDiv, emitFloatConvert, emitMathAbs, emitMathSqrt, emitMul, emitMulHigh, emitNarrow, emitNegate, emitNot, emitOr, emitReinterpret, emitRem, emitShl, emitShr, emitSignExtend, emitSub, emitUDiv, emitUMulHigh, emitURem, emitUShr, emitXor, emitZeroExtend, getLIRKind
final 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 HotSpotLIRGenerator
getProviders
in interface LIRGeneratorTool
getProviders
in class LIRGenerator
public StackSlotValue getLockSlot(int lockDepth)
HotSpotLIRGenerator
getLockSlot
in interface HotSpotLIRGenerator
private HotSpotLockStack getLockStack()
protected void setLockStack(HotSpotLockStack lockStack)
public boolean needOnlyOopMaps()
LIRGenerator
needOnlyOopMaps
in interface LIRGeneratorTool
needOnlyOopMaps
in class LIRGenerator
public void beforeRegisterAllocation()
LIRGeneratorTool
beforeRegisterAllocation
in interface LIRGeneratorTool
beforeRegisterAllocation
in class SPARCLIRGenerator
protected void emitForeignCallOp(ForeignCallLinkage linkage, Value result, Value[] arguments, Value[] temps, LIRFrameState info)
LIRGenerator
emitForeignCallOp
in class SPARCLIRGenerator
public Variable emitForeignCall(ForeignCallLinkage linkage, LIRFrameState state, Value... args)
emitForeignCall
in interface LIRGeneratorTool
emitForeignCall
in class LIRGenerator
public void emitReturn(Value input)
LIRGeneratorTool
emitReturn
in interface LIRGeneratorTool
emitReturn
in class SPARCLIRGenerator
public void emitTailcall(Value[] args, Value address)
HotSpotLIRGenerator
emitTailcall
in interface HotSpotLIRGenerator
args
- the arguments of the calladdress
- the target address of the callpublic void emitUnwind(Value exception)
emitUnwind
in interface LIRGeneratorTool
private 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 LIRGeneratorTool
emitDeoptimize
in class SPARCLIRGenerator
public void emitDeoptimizeCaller(DeoptimizationAction action, DeoptimizationReason reason)
emitDeoptimizeCaller
in interface HotSpotLIRGenerator
public Variable emitLoad(LIRKind kind, Value address, LIRFrameState state)
emitLoad
in interface LIRGeneratorTool
private static boolean canStoreConstant(JavaConstant c)
public boolean canInlineConstant(JavaConstant c)
LIRGenerator
canInlineConstant
in class SPARCLIRGenerator
c
- The constant to check.public void emitStore(LIRKind kind, Value address, Value inputVal, LIRFrameState state)
emitStore
in interface LIRGeneratorTool
public Variable emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue)
emitCompareAndSwap
in interface LIRGeneratorTool
public void emitPrefetchAllocate(Value address)
emitPrefetchAllocate
in interface HotSpotLIRGenerator
public StackSlot getDeoptimizationRescueSlot()
protected SPARCLIRInstruction createMove(AllocatableValue dst, Value src)
createMove
in class SPARCLIRGenerator
public void emitCompareBranch(PlatformKind cmpKind, Value x, Value y, Condition cond, boolean unorderedIsTrue, LabelRef trueDestination, LabelRef falseDestination, double trueDestinationProbability)
emitCompareBranch
in interface LIRGeneratorTool
emitCompareBranch
in class SPARCLIRGenerator
protected boolean emitCompare(PlatformKind cmpKind, Value a, Value b)
SPARCLIRGenerator
emitCompare
in class SPARCLIRGenerator
cmpKind
- 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 HotSpotLIRGenerator
public Value emitUncompress(Value pointer, HotSpotVMConfig.CompressEncoding encoding, boolean nonNull)
emitUncompress
in interface HotSpotLIRGenerator
protected 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()
HotSpotLIRGenerator
SaveAllRegistersNode
.emitSaveAllRegisters
in interface HotSpotLIRGenerator
StandardOp.SaveRegistersOp
operationpublic void emitLeaveCurrentStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
LeaveCurrentStackFrameNode
.emitLeaveCurrentStackFrame
in interface HotSpotLIRGenerator
saveRegisterOp
- saved registerspublic void emitLeaveDeoptimizedStackFrame(Value frameSize, Value initialInfo)
HotSpotLIRGenerator
LeaveDeoptimizedStackFrameNode
.emitLeaveDeoptimizedStackFrame
in interface HotSpotLIRGenerator
public void emitEnterUnpackFramesStackFrame(Value framePc, Value senderSp, Value senderFp, StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
EnterUnpackFramesStackFrameNode
.emitEnterUnpackFramesStackFrame
in interface HotSpotLIRGenerator
public void emitLeaveUnpackFramesStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
LeaveUnpackFramesStackFrameNode
.emitLeaveUnpackFramesStackFrame
in interface HotSpotLIRGenerator
public void emitPushInterpreterFrame(Value frameSize, Value framePc, Value senderSp, Value initialInfo)
HotSpotLIRGenerator
PushInterpreterFrameNode
.emitPushInterpreterFrame
in interface HotSpotLIRGenerator
public Value emitUncommonTrapCall(Value trapRequest, StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
UncommonTrapCallNode
.emitUncommonTrapCall
in interface HotSpotLIRGenerator
Deoptimization::UnrollBlock
pointerpublic Value emitDeoptimizationFetchUnrollInfoCall(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
DeoptimizationFetchUnrollInfoCallNode
.emitDeoptimizationFetchUnrollInfoCall
in interface HotSpotLIRGenerator
Deoptimization::UnrollBlock
pointerpublic void emitNullCheck(Value address, LIRFrameState state)
emitNullCheck
in interface LIRGeneratorTool
emitNullCheck
in class SPARCLIRGenerator
public LIRInstruction createBenchmarkCounter(String name, String group, Value increment)
createBenchmarkCounter
in interface BenchmarkCounterFactory
createBenchmarkCounter
in class LIRGenerator
public LIRInstruction createMultiBenchmarkCounter(String[] names, String[] groups, Value[] increments)
createMultiBenchmarkCounter
in interface BenchmarkCounterFactory
createMultiBenchmarkCounter
in class LIRGenerator
public AllocatableValue getSafepointAddressValue()