src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 74,91 ****
import static jdk.vm.ci.sparc.SPARCKind.WORD;
import static jdk.vm.ci.sparc.SPARCKind.XWORD;
import java.util.ArrayList;
import java.util.EnumSet;
- import java.util.HashMap;
import java.util.List;
- import java.util.Map;
-
import org.graalvm.compiler.asm.Assembler;
import org.graalvm.compiler.asm.Assembler.LabelHint;
import org.graalvm.compiler.asm.Label;
! import org.graalvm.compiler.asm.NumUtil;
import org.graalvm.compiler.asm.sparc.SPARCAssembler;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.BranchPredict;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.CC;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.CMOV;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.ConditionFlag;
--- 74,88 ----
import static jdk.vm.ci.sparc.SPARCKind.WORD;
import static jdk.vm.ci.sparc.SPARCKind.XWORD;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import org.graalvm.compiler.asm.Assembler;
import org.graalvm.compiler.asm.Assembler.LabelHint;
import org.graalvm.compiler.asm.Label;
! import org.graalvm.compiler.core.common.NumUtil;
import org.graalvm.compiler.asm.sparc.SPARCAssembler;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.BranchPredict;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.CC;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.CMOV;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.ConditionFlag;
*** 99,108 ****
--- 96,107 ----
import org.graalvm.compiler.lir.StandardOp;
import org.graalvm.compiler.lir.SwitchStrategy;
import org.graalvm.compiler.lir.SwitchStrategy.BaseSwitchClosure;
import org.graalvm.compiler.lir.Variable;
import org.graalvm.compiler.lir.asm.CompilationResultBuilder;
+ import org.graalvm.util.Equivalence;
+ import org.graalvm.util.EconomicMap;
import jdk.vm.ci.code.Register;
import jdk.vm.ci.meta.AllocatableValue;
import jdk.vm.ci.meta.Constant;
import jdk.vm.ci.meta.JavaConstant;
*** 142,152 ****
public static final class CompareBranchOp extends SPARCBlockEndOp implements SPARCDelayedControlTransfer {
public static final LIRInstructionClass<CompareBranchOp> TYPE = LIRInstructionClass.create(CompareBranchOp.class);
public static final SizeEstimate SIZE = SizeEstimate.create(3);
static final EnumSet<SPARCKind> SUPPORTED_KINDS = EnumSet.of(XWORD, WORD);
! @Use({REG}) protected Value x;
@Use({REG, CONST}) protected Value y;
private ConditionFlag conditionFlag;
protected final LabelRef trueDestination;
protected LabelHint trueDestinationHint;
protected final LabelRef falseDestination;
--- 141,151 ----
public static final class CompareBranchOp extends SPARCBlockEndOp implements SPARCDelayedControlTransfer {
public static final LIRInstructionClass<CompareBranchOp> TYPE = LIRInstructionClass.create(CompareBranchOp.class);
public static final SizeEstimate SIZE = SizeEstimate.create(3);
static final EnumSet<SPARCKind> SUPPORTED_KINDS = EnumSet.of(XWORD, WORD);
! @Use({REG}) protected AllocatableValue x;
@Use({REG, CONST}) protected Value y;
private ConditionFlag conditionFlag;
protected final LabelRef trueDestination;
protected LabelHint trueDestinationHint;
protected final LabelRef falseDestination;
*** 155,165 ****
protected final boolean unorderedIsTrue;
private boolean emitted = false;
private int delaySlotPosition = -1;
private double trueDestinationProbability;
! public CompareBranchOp(Value x, Value y, Condition condition, LabelRef trueDestination, LabelRef falseDestination, SPARCKind kind, boolean unorderedIsTrue, double trueDestinationProbability) {
super(TYPE, SIZE);
this.x = x;
this.y = y;
this.trueDestination = trueDestination;
this.falseDestination = falseDestination;
--- 154,165 ----
protected final boolean unorderedIsTrue;
private boolean emitted = false;
private int delaySlotPosition = -1;
private double trueDestinationProbability;
! public CompareBranchOp(AllocatableValue x, Value y, Condition condition, LabelRef trueDestination, LabelRef falseDestination, SPARCKind kind, boolean unorderedIsTrue,
! double trueDestinationProbability) {
super(TYPE, SIZE);
this.x = x;
this.y = y;
this.trueDestination = trueDestination;
this.falseDestination = falseDestination;
*** 424,451 ****
private LabelRef defaultTarget;
@Alive({REG}) protected Value key;
@Alive({REG, ILLEGAL}) protected Value constantTableBase;
@Temp({REG}) protected Value scratch;
protected final SwitchStrategy strategy;
! private final Map<Label, LabelHint> labelHints;
private final List<Label> conditionalLabels = new ArrayList<>();
! public StrategySwitchOp(Value constantTableBase, SwitchStrategy strategy, LabelRef[] keyTargets, LabelRef defaultTarget, Value key, Value scratch) {
this(TYPE, constantTableBase, strategy, keyTargets, defaultTarget, key, scratch);
}
! protected StrategySwitchOp(LIRInstructionClass<? extends StrategySwitchOp> c, Value constantTableBase, SwitchStrategy strategy, LabelRef[] keyTargets, LabelRef defaultTarget, Value key,
! Value scratch) {
super(c);
this.strategy = strategy;
this.keyConstants = strategy.getKeyConstants();
this.keyTargets = keyTargets;
this.defaultTarget = defaultTarget;
this.constantTableBase = constantTableBase;
this.key = key;
this.scratch = scratch;
! this.labelHints = new HashMap<>();
assert keyConstants.length == keyTargets.length;
assert keyConstants.length == strategy.keyProbabilities.length;
}
@Override
--- 424,452 ----
private LabelRef defaultTarget;
@Alive({REG}) protected Value key;
@Alive({REG, ILLEGAL}) protected Value constantTableBase;
@Temp({REG}) protected Value scratch;
protected final SwitchStrategy strategy;
! private final EconomicMap<Label, LabelHint> labelHints;
private final List<Label> conditionalLabels = new ArrayList<>();
! public StrategySwitchOp(Value constantTableBase, SwitchStrategy strategy, LabelRef[] keyTargets, LabelRef defaultTarget, AllocatableValue key, Variable scratch) {
this(TYPE, constantTableBase, strategy, keyTargets, defaultTarget, key, scratch);
}
! protected StrategySwitchOp(LIRInstructionClass<? extends StrategySwitchOp> c, Value constantTableBase, SwitchStrategy strategy, LabelRef[] keyTargets, LabelRef defaultTarget,
! AllocatableValue key,
! Variable scratch) {
super(c);
this.strategy = strategy;
this.keyConstants = strategy.getKeyConstants();
this.keyTargets = keyTargets;
this.defaultTarget = defaultTarget;
this.constantTableBase = constantTableBase;
this.key = key;
this.scratch = scratch;
! this.labelHints = EconomicMap.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE);
assert keyConstants.length == keyTargets.length;
assert keyConstants.length == strategy.keyProbabilities.length;
}
@Override
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File