use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class AArch64HotSpotNodeLIRBuilder method visitSafepointNode.
@Override
public void visitSafepointNode(SafepointNode i) {
LIRFrameState info = state(i);
Register thread = getGen().getProviders().getRegisters().getThreadRegister();
Variable scratch = gen.newVariable(LIRKind.value(getGen().target().arch.getWordKind()));
append(new AArch64HotSpotSafepointOp(info, getGen().config, thread, scratch));
}
use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class ResolveConstantStubCall method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
assert constant != null : "Expected the value to fold: " + value;
Value stringValue = gen.operand(string);
Value result;
LIRFrameState fs = gen.state(this);
assert fs != null : "The stateAfter is null";
if (constant instanceof HotSpotObjectConstant) {
result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitObjectConstantRetrieval(constant, stringValue, fs);
} else if (constant instanceof HotSpotMetaspaceConstant) {
if (action == HotSpotConstantLoadAction.RESOLVE) {
result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitMetaspaceConstantRetrieval(constant, stringValue, fs);
} else {
assert action == HotSpotConstantLoadAction.INITIALIZE;
result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitKlassInitializationAndRetrieval(constant, stringValue, fs);
}
} else {
throw new PermanentBailoutException("Unsupported constant type: " + constant);
}
gen.setResult(this, result);
}
use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class ResolveDynamicStubCall method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
assert constant != null : "Expected the value to fold: " + value;
Value result;
LIRFrameState fs = gen.state(this);
assert fs != null : "The stateAfter is null";
result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitResolveDynamicInvoke(constant, fs);
gen.setResult(this, result);
}
use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class HotSpotZapRegistersPhase method processBlock.
@SuppressWarnings("try")
private static void processBlock(DiagnosticLIRGeneratorTool diagnosticLirGenTool, HotSpotLIRGenerationResult res, LIR lir, LIRInsertionBuffer buffer, AbstractBlockBase<?> block, boolean zapRegisters, boolean zapStack) {
DebugContext debug = lir.getDebug();
try (Indent indent = debug.logAndIndent("Process block %s", block)) {
ArrayList<LIRInstruction> instructions = lir.getLIRforBlock(block);
buffer.init(instructions);
for (int index = 0; index < instructions.size(); index++) {
LIRInstruction inst = instructions.get(index);
if (zapStack && inst instanceof ZapStackArgumentSpaceBeforeInstruction) {
LIRInstruction zap = diagnosticLirGenTool.zapArgumentSpace();
if (zap != null) {
buffer.append(index, zap);
}
}
if (zapRegisters && inst instanceof ZapRegistersAfterInstruction) {
LIRFrameState state = getLIRState(inst);
if (state != null) {
SaveRegistersOp zap = diagnosticLirGenTool.createZapRegisters();
SaveRegistersOp old = res.getCalleeSaveInfo().put(state, zap);
assert old == null : "Already another SaveRegisterOp registered! " + old;
buffer.append(index + 1, (LIRInstruction) zap);
debug.log("Insert ZapRegister after %s", inst);
}
}
}
buffer.finish();
}
}
use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class AMD64NodeMatchRules method emitReinterpretMemory.
private Value emitReinterpretMemory(LIRKind to, Access access) {
AMD64AddressValue address = (AMD64AddressValue) operand(access.getAddress());
LIRFrameState state = getState(access);
return getArithmeticLIRGenerator().emitLoad(to, address, state);
}
Aggregations