Search in sources :

Example 6 with ValueConsumer

use of org.graalvm.compiler.lir.ValueConsumer in project graal by oracle.

the class RegStackValueSet method addLiveValues.

public void addLiveValues(ReferenceMapBuilder refMap) {
    ValueConsumer addLiveValue = new ValueConsumer() {

        @Override
        public void visitValue(Value value, OperandMode mode, EnumSet<OperandFlag> flags) {
            refMap.addLiveValue(value);
        }
    };
    registers.visitEach(null, null, null, addLiveValue);
    stack.visitEach(null, null, null, addLiveValue);
    if (extraStack != null) {
        for (Value v : extraStack) {
            refMap.addLiveValue(v);
        }
    }
}
Also used : ValueConsumer(org.graalvm.compiler.lir.ValueConsumer) EnumSet(java.util.EnumSet) Value(jdk.vm.ci.meta.Value) OperandMode(org.graalvm.compiler.lir.LIRInstruction.OperandMode)

Aggregations

EnumSet (java.util.EnumSet)6 Value (jdk.vm.ci.meta.Value)6 OperandMode (org.graalvm.compiler.lir.LIRInstruction.OperandMode)6 ValueConsumer (org.graalvm.compiler.lir.ValueConsumer)6 LIRInstruction (org.graalvm.compiler.lir.LIRInstruction)5 BitSet (java.util.BitSet)3 Register (jdk.vm.ci.code.Register)3 AllocatableValue (jdk.vm.ci.meta.AllocatableValue)3 DebugContext (org.graalvm.compiler.debug.DebugContext)3 OperandFlag (org.graalvm.compiler.lir.LIRInstruction.OperandFlag)3 RegisterPriority (org.graalvm.compiler.lir.alloc.lsra.Interval.RegisterPriority)3 ArrayDeque (java.util.ArrayDeque)2 ArrayList (java.util.ArrayList)2 RegisterArray (jdk.vm.ci.code.RegisterArray)2 StackSlot (jdk.vm.ci.code.StackSlot)2 TargetDescription (jdk.vm.ci.code.TargetDescription)2 ValueUtil.asRegister (jdk.vm.ci.code.ValueUtil.asRegister)2 ValueUtil.asStackSlot (jdk.vm.ci.code.ValueUtil.asStackSlot)2 ValueUtil.isRegister (jdk.vm.ci.code.ValueUtil.isRegister)2 ValueUtil.isStackSlot (jdk.vm.ci.code.ValueUtil.isStackSlot)2