public interface LIRGeneratorTool extends DiagnosticLIRGeneratorTool
| Modifier and Type | Interface and Description |
|---|---|
static class |
LIRGeneratorTool.BlockScope |
static class |
LIRGeneratorTool.CharsetName |
DiagnosticLIRGeneratorTool.ZapRegistersAfterInstruction, DiagnosticLIRGeneratorTool.ZapStackArgumentSpaceBeforeInstruction| Modifier and Type | Method and Description |
|---|---|
default AllocatableValue |
addressAsAllocatableInteger(Value value)
Returns an
AllocatableValue of the address value with an integer
representation. |
default VirtualStackSlot |
allocateStackMemory(int sizeInBytes,
int alignmentInBytes) |
<I extends LIRInstruction> |
append(I op) |
AllocatableValue |
asAllocatable(Value value)
Returns an
AllocatableValue holding the value by moving it if necessary. |
boolean |
canInlineConstant(Constant constant) |
Variable |
emitAddress(AllocatableValue stackslot) |
default Variable |
emitArrayCompareTo(JavaKind kind1,
JavaKind kind2,
int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value array2,
Value length1,
Value length2) |
default void |
emitArrayCopyWithConversion(JavaKind strideSrc,
JavaKind strideDst,
Value arraySrc,
Value offsetSrc,
Value arrayDst,
Value offsetDst,
Value length) |
default void |
emitArrayCopyWithConversion(Value arraySrc,
Value offsetSrc,
Value arrayDst,
Value offsetDst,
Value length,
Value stride) |
default Variable |
emitArrayEquals(int array1BaseOffset,
int array2BaseOffset,
int maskBaseOffset,
Value array1,
Value offset1,
Value array2,
Value offset2,
Value mask,
Value length,
Value stride) |
default Variable |
emitArrayEquals(int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value offset1,
Value array2,
Value offset2,
Value length,
Value stride) |
default Variable |
emitArrayEquals(JavaKind kind,
int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value array2,
Value length) |
default Variable |
emitArrayEquals(JavaKind kind,
int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value offset1,
Value array2,
Value offset2,
Value length) |
default Variable |
emitArrayEquals(JavaKind kind1,
JavaKind kind2,
int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value offset1,
Value array2,
Value offset2,
Value length) |
default Variable |
emitArrayEquals(JavaKind kind1,
JavaKind kind2,
JavaKind kindMask,
int array1BaseOffset,
int array2BaseOffset,
int maskBaseOffset,
Value array1,
Value offset1,
Value array2,
Value offset2,
Value mask,
Value length) |
default Variable |
emitArrayIndexOf(int arrayBaseOffset,
JavaKind valueKind,
boolean findTwoConsecutive,
boolean withMask,
Value array,
Value offset,
Value length,
Value fromIndex,
Value... searchValues) |
default Variable |
emitArrayRegionCompareTo(JavaKind strideA,
JavaKind strideB,
Value arrayA,
Value offsetA,
Value arrayB,
Value offsetB,
Value length) |
default Variable |
emitArrayRegionCompareTo(Value arrayA,
Value offsetA,
Value arrayB,
Value offsetB,
Value length,
Value stride) |
default Value |
emitAtomicReadAndAdd(Value address,
<any> valueKind,
Value delta)
Emit an atomic read-and-add instruction.
|
default Value |
emitAtomicReadAndWrite(Value address,
<any> valueKind,
Value newValue)
Emit an atomic read-and-write instruction.
|
void |
emitBlackhole(Value operand) |
Variable |
emitByteSwap(Value operand) |
void |
emitCacheWriteback(Value address)
Emits instruction(s) to flush an individual cache line that starts at
address. |
void |
emitCacheWritebackSync(boolean isPreSync)
Emits instruction(s) to serialize cache writeback operations relative to preceding (if
isPreSync == true) or following (if isPreSync == false) memory writes. |
default Variable |
emitCalcStringAttributes(Object op,
Value array,
Value offset,
Value length,
boolean isValid) |
Value |
emitCompress(Value pointer,
CompressEncoding encoding,
boolean nonNull) |
Variable |
emitConditionalMove(PlatformKind cmpKind,
Value leftVal,
Value right,
Condition cond,
boolean unorderedIsTrue,
Value trueValue,
Value falseValue) |
Value |
emitConstant(LIRKind kind,
Constant constant) |
default void |
emitConvertNullToZero(AllocatableValue result,
AllocatableValue input) |
default void |
emitConvertNullToZero(AllocatableValue result,
Value input) |
default void |
emitConvertZeroToNull(AllocatableValue result,
Value input) |
void |
emitDeoptimize(Value actionAndReason,
Value failedSpeculation,
LIRFrameState state) |
default Variable |
emitEncodeArray(Value src,
Value dst,
Value length,
LIRGeneratorTool.CharsetName charset) |
Variable |
emitForeignCall(ForeignCallLinkage linkage,
LIRFrameState state,
Value... args) |
default Variable |
emitHasNegatives(Value array,
Value length) |
Variable |
emitIntegerTestMove(Value leftVal,
Value right,
Value trueValue,
Value falseValue) |
Value |
emitJavaConstant(JavaConstant constant) |
void |
emitJump(LabelRef label) |
AllocatableValue |
emitLoadConstant(<any> kind,
Constant constant) |
Variable |
emitLogicCompareAndSwap(LIRKind accessKind,
Value address,
Value expectedValue,
Value newValue,
Value trueValue,
Value falseValue,
MemoryOrderMode memoryOrder) |
void |
emitMembar(int barriers) |
void |
emitMove(AllocatableValue dst,
Value src) |
Variable |
emitMove(Value input) |
void |
emitMoveConstant(AllocatableValue dst,
Constant src) |
void |
emitNullCheck(Value address,
LIRFrameState state) |
void |
emitPause() |
void |
emitPrefetchAllocate(Value address) |
default Value |
emitReadCallerStackPointer(Stamp wordStamp) |
Variable |
emitReadRegister(Register register,
<any> kind) |
default Value |
emitReadReturnAddress(Stamp wordStamp,
int returnAddressSize) |
void |
emitReturn(JavaKind javaKind,
Value input)
Emits a return instruction.
|
void |
emitSpeculationFence()
Emits an instruction that prevents speculative execution from proceeding: no instruction
after this fence will execute until all previous instructions have retired.
|
default void |
emitStringLatin1Inflate(Value src,
Value dst,
Value len) |
default Variable |
emitStringUTF16Compress(Value src,
Value dst,
Value len) |
default Value |
emitTimeStampWithProcid() |
Value |
emitUncompress(Value pointer,
CompressEncoding encoding,
boolean nonNull) |
void |
emitUnwind(Value operand) |
Value |
emitValueCompareAndSwap(LIRKind accessKind,
Value address,
Value expectedValue,
Value newValue,
MemoryOrderMode memoryOrder) |
void |
emitWriteRegister(Register dst,
Value src,
<any> wordStamp) |
default void |
emitZeroMemory(Value address,
Value length,
boolean isAligned) |
ArithmeticLIRGeneratorTool |
getArithmetic() |
CodeCacheProvider |
getCodeCache() |
AbstractBlockBase<?> |
getCurrentBlock() |
ForeignCallsProvider |
getForeignCalls() |
LIRKind |
getLIRKind(Stamp stamp) |
default VectorSize |
getMaxVectorSize()
Returns the maximum size of vector registers.
|
MetaAccessProvider |
getMetaAccess() |
MoveFactory |
getMoveFactory() |
CodeGenProviders |
getProviders() |
RegisterConfig |
getRegisterConfig() |
LIRGenerationResult |
getResult() |
MoveFactory |
getSpillMoveFactory()
Get a special
MoveFactory for spill moves. |
boolean |
mayEmbedConstantLoad(Constant constant) |
Variable |
newVariable(<any> kind)
Create a new
Variable. |
TargetDescription |
target() |
<K extends <any>> |
toRegisterKind(K kind)
Some backends need to convert sub-word kinds to a larger kind in
ArithmeticLIRGeneratorTool.emitLoad(org.graalvm.compiler.core.common.LIRKind, Value, org.graalvm.compiler.lir.LIRFrameState) and LIRGeneratorTool.emitLoadConstant(<any>, Constant) because sub-word
registers can't be accessed. |
createBenchmarkCounter, createMultiBenchmarkCounter, createZapArgumentSpace, createZapRegisters, createZapRegisters, createZapRegisters, zapArgumentSpaceArithmeticLIRGeneratorTool getArithmetic()
CodeGenProviders getProviders()
TargetDescription target()
MetaAccessProvider getMetaAccess()
CodeCacheProvider getCodeCache()
ForeignCallsProvider getForeignCalls()
AbstractBlockBase<?> getCurrentBlock()
LIRGenerationResult getResult()
RegisterConfig getRegisterConfig()
MoveFactory getMoveFactory()
MoveFactory getSpillMoveFactory()
MoveFactory for spill moves.
The instructions returned by this factory must only depend on the input values. References to
values that require interaction with register allocation are strictly forbidden.boolean canInlineConstant(Constant constant)
boolean mayEmbedConstantLoad(Constant constant)
Value emitConstant(LIRKind kind, Constant constant)
Value emitJavaConstant(JavaConstant constant)
<K extends <any>> K toRegisterKind(K kind)
ArithmeticLIRGeneratorTool.emitLoad(org.graalvm.compiler.core.common.LIRKind, Value, org.graalvm.compiler.lir.LIRFrameState) and LIRGeneratorTool.emitLoadConstant(<any>, Constant) because sub-word
registers can't be accessed. This method converts the LIRKind of a memory location or
constant to the LIRKind that will be used when it is loaded into a register.AllocatableValue emitLoadConstant(<any> kind,
Constant constant)
void emitNullCheck(Value address,
LIRFrameState state)
Variable emitLogicCompareAndSwap(LIRKind accessKind, Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue, MemoryOrderMode memoryOrder)
Value emitValueCompareAndSwap(LIRKind accessKind, Value address, Value expectedValue, Value newValue, MemoryOrderMode memoryOrder)
default Value emitAtomicReadAndAdd(Value address,
<any> valueKind,
Value delta)
address - address of the value to be read and writtenvalueKind - the access kind for the value to be writtendelta - the value to be addeddefault Value emitAtomicReadAndWrite(Value address,
<any> valueKind,
Value newValue)
address - address of the value to be read and writtenvalueKind - the access kind for the value to be writtennewValue - the new value to be writtenvoid emitDeoptimize(Value actionAndReason,
Value failedSpeculation,
LIRFrameState state)
Variable emitForeignCall(ForeignCallLinkage linkage, LIRFrameState state, Value... args)
Variable emitMove(Value input)
void emitMove(AllocatableValue dst,
Value src)
Variable emitReadRegister(Register register, <any> kind)
void emitWriteRegister(Register dst,
Value src,
<any> wordStamp)
void emitMoveConstant(AllocatableValue dst,
Constant src)
Variable emitAddress(AllocatableValue stackslot)
void emitMembar(int barriers)
void emitUnwind(Value operand)
void emitReturn(JavaKind javaKind,
Value input)
AllocatableValue asAllocatable(Value value)
AllocatableValue holding the value by moving it if necessary. If
value is already an AllocatableValue, returns it unchanged.default AllocatableValue addressAsAllocatableInteger(Value value)
AllocatableValue of the address value with an integer
representation.<I extends LIRInstruction> I append(I op)
void emitJump(LabelRef label)
Variable emitConditionalMove(PlatformKind cmpKind, Value leftVal, Value right, Condition cond, boolean unorderedIsTrue, Value trueValue, Value falseValue)
Variable emitIntegerTestMove(Value leftVal, Value right, Value trueValue, Value falseValue)
Variable emitByteSwap(Value operand)
default Variable emitArrayCompareTo(JavaKind kind1, JavaKind kind2, int array1BaseOffset, int array2BaseOffset, Value array1, Value array2, Value length1, Value length2)
default Variable emitArrayRegionCompareTo(Value arrayA, Value offsetA, Value arrayB, Value offsetB, Value length, Value stride)
default Variable emitArrayRegionCompareTo(JavaKind strideA, JavaKind strideB, Value arrayA, Value offsetA, Value arrayB, Value offsetB, Value length)
default Variable emitArrayEquals(JavaKind kind, int array1BaseOffset, int array2BaseOffset, Value array1, Value array2, Value length)
default Variable emitArrayEquals(int array1BaseOffset, int array2BaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value length, Value stride)
default Variable emitArrayEquals(JavaKind kind, int array1BaseOffset, int array2BaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value length)
default Variable emitArrayEquals(JavaKind kind1, JavaKind kind2, int array1BaseOffset, int array2BaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value length)
default Variable emitArrayEquals(int array1BaseOffset, int array2BaseOffset, int maskBaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value mask, Value length, Value stride)
default Variable emitArrayEquals(JavaKind kind1, JavaKind kind2, JavaKind kindMask, int array1BaseOffset, int array2BaseOffset, int maskBaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value mask, Value length)
default void emitArrayCopyWithConversion(JavaKind strideSrc,
JavaKind strideDst,
Value arraySrc,
Value offsetSrc,
Value arrayDst,
Value offsetDst,
Value length)
default void emitArrayCopyWithConversion(Value arraySrc,
Value offsetSrc,
Value arrayDst,
Value offsetDst,
Value length,
Value stride)
default Variable emitCalcStringAttributes(Object op, Value array, Value offset, Value length, boolean isValid)
default Variable emitArrayIndexOf(int arrayBaseOffset, JavaKind valueKind, boolean findTwoConsecutive, boolean withMask, Value array, Value offset, Value length, Value fromIndex, Value... searchValues)
default void emitStringLatin1Inflate(Value src,
Value dst,
Value len)
default Variable emitStringUTF16Compress(Value src, Value dst, Value len)
default Variable emitEncodeArray(Value src, Value dst, Value length, LIRGeneratorTool.CharsetName charset)
default Variable emitHasNegatives(Value array, Value length)
void emitBlackhole(Value operand)
void emitPause()
void emitPrefetchAllocate(Value address)
Value emitCompress(Value pointer,
CompressEncoding encoding,
boolean nonNull)
Value emitUncompress(Value pointer,
CompressEncoding encoding,
boolean nonNull)
default void emitConvertNullToZero(AllocatableValue result,
Value input)
default void emitConvertNullToZero(AllocatableValue result,
AllocatableValue input)
default void emitConvertZeroToNull(AllocatableValue result,
Value input)
void emitSpeculationFence()
default VirtualStackSlot allocateStackMemory(int sizeInBytes, int alignmentInBytes)
default Value emitTimeStampWithProcid()
default Value emitReadCallerStackPointer(Stamp wordStamp)
default Value emitReadReturnAddress(Stamp wordStamp, int returnAddressSize)
default void emitZeroMemory(Value address,
Value length,
boolean isAligned)
void emitCacheWriteback(Value address)
address.void emitCacheWritebackSync(boolean isPreSync)
isPreSync == true) or following (if isPreSync == false) memory writes.default VectorSize getMaxVectorSize()