Search in sources :

Example 1 with CallInstruction

use of com.oracle.truffle.llvm.parser.model.symbols.instructions.CallInstruction in project sulong by graalvm.

the class LLVMBitcodeInstructionVisitor method visit.

@Override
public void visit(StoreInstruction store) {
    final LLVMExpressionNode pointerNode = symbols.resolve(store.getDestination());
    final LLVMExpressionNode valueNode = symbols.resolve(store.getSource());
    Type type = store.getSource().getType();
    LLVMSourceLocation source = null;
    if (!(store.getSource() instanceof CallInstruction)) {
        // otherwise the debugger would stop on both the call and the store of the return value
        source = sourceFunction.getSourceLocation(store);
    }
    final LLVMExpressionNode node = nodeFactory.createStore(runtime, pointerNode, valueNode, type, source);
    addInstruction(node);
}
Also used : CallInstruction(com.oracle.truffle.llvm.parser.model.symbols.instructions.CallInstruction) VoidCallInstruction(com.oracle.truffle.llvm.parser.model.symbols.instructions.VoidCallInstruction) LLVMConversionType(com.oracle.truffle.llvm.parser.instructions.LLVMConversionType) PrimitiveType(com.oracle.truffle.llvm.runtime.types.PrimitiveType) StructureType(com.oracle.truffle.llvm.runtime.types.StructureType) ArrayType(com.oracle.truffle.llvm.runtime.types.ArrayType) AggregateType(com.oracle.truffle.llvm.runtime.types.AggregateType) LLVMArithmeticInstructionType(com.oracle.truffle.llvm.parser.instructions.LLVMArithmeticInstructionType) Type(com.oracle.truffle.llvm.runtime.types.Type) PointerType(com.oracle.truffle.llvm.runtime.types.PointerType) FunctionType(com.oracle.truffle.llvm.runtime.types.FunctionType) LLVMExpressionNode(com.oracle.truffle.llvm.runtime.nodes.api.LLVMExpressionNode) LLVMSourceLocation(com.oracle.truffle.llvm.runtime.debug.scope.LLVMSourceLocation)

Aggregations

LLVMArithmeticInstructionType (com.oracle.truffle.llvm.parser.instructions.LLVMArithmeticInstructionType)1 LLVMConversionType (com.oracle.truffle.llvm.parser.instructions.LLVMConversionType)1 CallInstruction (com.oracle.truffle.llvm.parser.model.symbols.instructions.CallInstruction)1 VoidCallInstruction (com.oracle.truffle.llvm.parser.model.symbols.instructions.VoidCallInstruction)1 LLVMSourceLocation (com.oracle.truffle.llvm.runtime.debug.scope.LLVMSourceLocation)1 LLVMExpressionNode (com.oracle.truffle.llvm.runtime.nodes.api.LLVMExpressionNode)1 AggregateType (com.oracle.truffle.llvm.runtime.types.AggregateType)1 ArrayType (com.oracle.truffle.llvm.runtime.types.ArrayType)1 FunctionType (com.oracle.truffle.llvm.runtime.types.FunctionType)1 PointerType (com.oracle.truffle.llvm.runtime.types.PointerType)1 PrimitiveType (com.oracle.truffle.llvm.runtime.types.PrimitiveType)1 StructureType (com.oracle.truffle.llvm.runtime.types.StructureType)1 Type (com.oracle.truffle.llvm.runtime.types.Type)1