Search in sources :

Example 6 with SSAValue

use of com.oracle.truffle.llvm.runtime.types.symbols.SSAValue in project graal by oracle.

the class LLVMBitcodeInstructionVisitor method createNullerSlots.

private int[] createNullerSlots(SSAValue[] stackValues) {
    if (stackValues != null) {
        int count = 0;
        for (SSAValue value : stackValues) {
            if (value != null) {
                count++;
            }
        }
        if (count > 0) {
            int pos = 0;
            int[] result = new int[count];
            for (SSAValue value : stackValues) {
                if (value != null) {
                    result[pos++] = symbols.findOrAddFrameSlot(value);
                }
            }
            return result;
        }
    }
    return null;
}
Also used : SSAValue(com.oracle.truffle.llvm.runtime.types.symbols.SSAValue)

Aggregations

SSAValue (com.oracle.truffle.llvm.runtime.types.symbols.SSAValue)6 FrameDescriptor (com.oracle.truffle.api.frame.FrameDescriptor)2 LLVMExpressionNode (com.oracle.truffle.llvm.runtime.nodes.api.LLVMExpressionNode)2 LLVMStatementNode (com.oracle.truffle.llvm.runtime.nodes.api.LLVMStatementNode)2 ArrayList (java.util.ArrayList)2 TruffleBoundary (com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)1 RootNode (com.oracle.truffle.api.nodes.RootNode)1 LLVMLivenessAnalysisResult (com.oracle.truffle.llvm.parser.LLVMLivenessAnalysis.LLVMLivenessAnalysisResult)1 Phi (com.oracle.truffle.llvm.parser.LLVMPhiManager.Phi)1 SourceVariable (com.oracle.truffle.llvm.parser.metadata.debuginfo.SourceVariable)1 ValueFragment (com.oracle.truffle.llvm.parser.metadata.debuginfo.ValueFragment)1 InstructionBlock (com.oracle.truffle.llvm.parser.model.blocks.InstructionBlock)1 FunctionParameter (com.oracle.truffle.llvm.parser.model.functions.FunctionParameter)1 AbstractConstant (com.oracle.truffle.llvm.parser.model.symbols.constants.AbstractConstant)1 NullConstant (com.oracle.truffle.llvm.parser.model.symbols.constants.NullConstant)1 UndefinedConstant (com.oracle.truffle.llvm.parser.model.symbols.constants.UndefinedConstant)1 GlobalValueSymbol (com.oracle.truffle.llvm.parser.model.symbols.globals.GlobalValueSymbol)1 LLVMBitcodeInstructionVisitor (com.oracle.truffle.llvm.parser.nodes.LLVMBitcodeInstructionVisitor)1 LLVMRuntimeDebugInformation (com.oracle.truffle.llvm.parser.nodes.LLVMRuntimeDebugInformation)1 ClearLocalVariableParts (com.oracle.truffle.llvm.parser.nodes.LLVMRuntimeDebugInformation.ClearLocalVariableParts)1