# HG changeset patch
# User Doug Simon
* Precondition: the inputs (ie, object) hasn't been deverbosified yet. *
- * */ + */ protected final void visitCheckCastNode(CheckCastNode checkCast) { /* @@ -139,7 +139,7 @@ * @see #lowerCheckCastAnchorFriendlyWay(com.oracle.graal.nodes.java.CheckCastNode, * com.oracle.graal.nodes.ValueNode) * - * */ + */ private void visitCheckCastNodeLackingWitness(CheckCastNode checkCast) { final ValueNode subject = checkCast.object(); final ResolvedJavaType toType = checkCast.type(); @@ -170,7 +170,7 @@ * * @see #visitCheckCastNode(com.oracle.graal.nodes.java.CheckCastNode) * - * */ + */ public void lowerCheckCastAnchorFriendlyWay(CheckCastNode checkCast, ValueNode subject) { ValueNode originalCheckCastObject = checkCast.object(); @@ -268,7 +268,7 @@ /** * Porcelain method. - * */ + */ public static boolean isTypeOfWitnessBetter(Witness w, ObjectStamp stamp) { if (w == null) { return false; @@ -281,7 +281,7 @@ * Please note in this method "subject" refers to the downcasted input to the checkCast. * * @see #visitCheckCastNode(com.oracle.graal.nodes.java.CheckCastNode) - * */ + */ private void visitCheckCastNodeWithWitness(CheckCastNode checkCast) { final ResolvedJavaType toType = checkCast.type(); diff -r a9df38ce8fb7 -r 1d3c23e675ed graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Sun Apr 27 16:44:59 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Sun Apr 27 17:29:19 2014 +0200 @@ -111,7 +111,7 @@ * {@link #added} grows during a run of * {@link com.oracle.graal.phases.common.cfs.FlowSensitiveReductionPhase * FlowSensitiveReductionPhase}, and doesn't survive across runs. - * */ + */ public void forceState(State s) { state = s; substs.clear(); @@ -285,7 +285,7 @@ * Usage: must be called only from {@link #deverbosify(com.oracle.graal.graph.Node) * deverbosify(Node)}. * - * */ + */ public Node deverbosifyFloatingNode(final FloatingNode n) { assert n != null : "Should have been caught in deverbosify()"; @@ -360,7 +360,7 @@ * pre-image and image differ. * * @return the image of the substitution (ie, the second argument) unmodified. - * */ + */ private* The resulting node might not have been in the graph already. *
- * */ + */ private PiNode wrapInPiNode(ValueNode payload, GuardingNode anchor, ObjectStamp newStamp, boolean remember) { try (Debug.Scope s = Debug.scope("Downcast", payload)) { assert payload != anchor : payload.graph().toString(); @@ -782,7 +782,7 @@ * * * @see #downcastedValueProxy - * */ + */ public ValueNode downcastedGuardingPiNode(GuardingPiNode envelope, Witness w) { assert envelope != w.guard().asNode() : "The stamp of " + envelope + " would lead to downcasting with that very same GuardingPiNode as guard."; return downcastedUtil(envelope, w); @@ -814,7 +814,7 @@ * * * @see #downcastedValueProxy - * */ + */ private ValueNode downcastedPiNodeOrPiArrayNode(PiNode envelope, Witness w) { return downcastedUtil(envelope, w); } @@ -830,7 +830,7 @@ * * * @see #downcastedValueProxy - * */ + */ private ValueNode downcastedTypeProfileProxyNode(TypeProfileProxyNode envelope) { ValueNode payload = envelope.getOriginalNode(); ValueNode d = downcasted(payload); @@ -859,7 +859,7 @@ * Re-wrap the checkCast in a type-refining {@link com.oracle.graal.nodes.PiNode PiNode} only if * the downcasted scrutinee does not conform to the checkCast's target-type. * - * */ + */ private ValueNode downcastedCheckCastNode(CheckCastNode checkCast, Witness w) { final ResolvedJavaType toType = checkCast.type(); @@ -899,7 +899,7 @@ * to hold an updated stamp) provided the argument's stamp can be strictly refined, and returns * it. * - * */ + */ private ValueNode downcastedUtil(ValueNode subject, Witness w) { ObjectStamp originalStamp = (ObjectStamp) subject.stamp(); diff -r a9df38ce8fb7 -r 1d3c23e675ed graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FixedGuardReduction.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FixedGuardReduction.java Sun Apr 27 16:44:59 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FixedGuardReduction.java Sun Apr 27 17:29:19 2014 +0200 @@ -35,7 +35,7 @@ * * * @see #visitFixedGuardNode(com.oracle.graal.nodes.FixedGuardNode) - * */ + */ public abstract class FixedGuardReduction extends CheckCastReduction { public FixedGuardReduction(FixedNode start, State initialState, PhaseContext context) { @@ -190,7 +190,7 @@ /** * Porcelain method. - * */ + */ private void markFixedGuardNodeAlwaysFails(FixedGuardNode f) { metricFixedGuardNodeRemoved.increment(); state.impossiblePath(); @@ -204,7 +204,7 @@ ** The `replacement` guard must be such that it implies the `old` guard. *
- * */ + */ private void removeFixedGuardNode(FixedGuardNode old, GuardingNode replacement) { if (replacement == null) { return; diff -r a9df38ce8fb7 -r 1d3c23e675ed graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowSensitiveReduction.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowSensitiveReduction.java Sun Apr 27 16:44:59 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowSensitiveReduction.java Sun Apr 27 17:29:19 2014 +0200 @@ -61,7 +61,7 @@ * @see com.oracle.graal.phases.common.cfs.GuardingPiReduction * @see com.oracle.graal.phases.common.cfs.FixedGuardReduction * - * */ + */ public class FlowSensitiveReduction extends FixedGuardReduction { public FlowSensitiveReduction(FixedNode start, State initialState, PhaseContext context) { @@ -111,7 +111,7 @@ * Checking if they aren't in use, proceeding to remove them in that case. * * - * */ + */ @Override public void finished() { if (!postponedDeopts.isEmpty()) { @@ -177,7 +177,7 @@ * TODO When tracking integer-stamps, the state at each successor of a TypeSwitchNode should * track an integer-stamp for the LoadHubNode (meet over the constants leading to that * successor). However, are LoadHubNode-s shared frequently enough? - * */ + */ private void registerTypeSwitchNode(TypeSwitchNode typeSwitch, BeginNode begin) { if (typeSwitch.value() instanceof LoadHubNode) { LoadHubNode loadHub = (LoadHubNode) typeSwitch.value(); @@ -252,7 +252,7 @@ * * * @return whether any reduction was performed on the inputs of the arguments. - * */ + */ public boolean deverbosifyInputsInPlace(ValueNode parent) { boolean changed = false; for (ValueNode i : FlowUtil.distinctValueAndConditionInputs(parent)) { @@ -276,7 +276,7 @@ * @return the original parent if no updated took place, a copy-on-write version of it * otherwise. * - * */ + */ private MethodCallTargetNode deverbosifyInputsCopyOnWrite(MethodCallTargetNode parent) { MethodCallTargetNode changed = null; for (ValueNode i : FlowUtil.distinctValueAndConditionInputs(parent)) { @@ -442,7 +442,7 @@ ** Precondition: the input (ie, object) hasn't been deverbosified yet. *
- * */ + */ private void visitNullCheckNode(NullCheckNode ncn) { ValueNode object = ncn.getObject(); if (state.isNull(object)) { @@ -471,7 +471,7 @@ ** Precondition: inputs haven't been deverbosified yet. *
- * */ + */ private void visitAbstractEndNode(AbstractEndNode endNode) { MergeNode merge = endNode.merge(); for (PhiNode phi : merge.phis()) { @@ -498,7 +498,7 @@ ** Precondition: inputs haven't been deverbosified yet. *
- * */ + */ private void visitInvoke(Invoke invoke) { if (invoke.asNode().stamp() instanceof IllegalStamp) { return; // just to be safe diff -r a9df38ce8fb7 -r 1d3c23e675ed graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowUtil.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowUtil.java Sun Apr 27 16:44:59 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowUtil.java Sun Apr 27 17:29:19 2014 +0200 @@ -61,7 +61,7 @@ /** * @return whether the first argument is strictly more precise than the second. - * */ + */ public static boolean isMorePrecise(ResolvedJavaType a, ResolvedJavaType b) { if (a == null) { return false; @@ -132,7 +132,7 @@ * An IllegalStamp should never happen. In contrast, !isLegal() values could happen due to dead * code not yet removed, or upon some non-sideeffecting instructions floating out of a dead * branch. - * */ + */ public static boolean isLegalObjectStamp(Stamp s) { return isObjectStamp(s) && s.isLegal(); } @@ -162,7 +162,7 @@ * a score of 1. In all other cases (non-comparable, or supertype) the score is -1. * * @return whether the first argument is strictly more precise than the second. - * */ + */ public static boolean isMorePrecise(ObjectStamp a, ObjectStamp b) { int d0 = MINUS(a.alwaysNull(), b.alwaysNull()); if (d0 == -1) { @@ -234,7 +234,7 @@ /** * Returns (preserving order) the ValueNodes without duplicates found among the argument's * direct inputs. - * */ + */ @SuppressWarnings("unchecked") public static ListoldInput
among its (direct) inputs. After
* this method has run, all such occurrences have been replaced with newInput
. In
* case that makes oldInput
disconnected, it is removed from the graph.
- * */
+ */
public static void replaceInPlace(Node parent, Node oldInput, Node newInput) {
assert parent != null;
assert parent.inputs().contains(oldInput);
diff -r a9df38ce8fb7 -r 1d3c23e675ed graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java Sun Apr 27 16:44:59 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java Sun Apr 27 17:29:19 2014 +0200
@@ -39,7 +39,7 @@
*
*
* @see #visitGuardingPiNode(com.oracle.graal.nodes.GuardingPiNode)
- * */
+ */
public abstract class GuardingPiReduction extends BaseReduction {
public GuardingPiReduction(FixedNode start, State initialState, PhaseContext context) {
@@ -75,7 +75,7 @@
* Precondition: the condition hasn't been deverbosified yet.
*
*
- * */
+ */
protected final void visitGuardingPiNode(GuardingPiNode envelope) {
if (!FlowUtil.hasLegalObjectStamp(envelope)) {
@@ -181,7 +181,7 @@
*
* @see #visitGuardingPiNode(com.oracle.graal.nodes.GuardingPiNode)
*
- * */
+ */
private boolean tryRemoveGuardingPiNode(GuardingPiNode envelope) {
LogicNode cond = envelope.condition();
@@ -251,7 +251,7 @@
* non-null.
*
* @see #tryRemoveGuardingPiNode(com.oracle.graal.nodes.GuardingPiNode)
- * */
+ */
private boolean tryRemoveGuardingPiNodeNonNullCond(GuardingPiNode envelope) {
ValueNode payload = envelope.object();
@@ -306,7 +306,7 @@
*
* @see #tryRemoveGuardingPiNode(com.oracle.graal.nodes.GuardingPiNode)
*
- * */
+ */
private boolean tryRemoveGuardingPiNodeCheckCastCond(GuardingPiNode envelope, ResolvedJavaType toType) {
assert toType != null;
ValueNode payload = envelope.object();
@@ -353,7 +353,7 @@
/**
* Porcelain method.
- * */
+ */
private void removeGuardingPiNode(GuardingPiNode envelope, ValueNode replacement) {
assert !precisionLoss(envelope, replacement);
metricGuardingPiNodeRemoved.increment();
diff -r a9df38ce8fb7 -r 1d3c23e675ed graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Sun Apr 27 16:44:59 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Sun Apr 27 17:29:19 2014 +0200
@@ -80,7 +80,7 @@
*
*
*
- * */
+ */
int versionNr = 0;
boolean isUnreachable = false;
@@ -91,7 +91,7 @@
* detect an "impossible path" could be shaved off.
*
* @see com.oracle.graal.phases.common.cfs.BaseReduction.PostponedDeopt
- * */
+ */
void impossiblePath() {
isUnreachable = true;
metricImpossiblePathDetected.increment();
@@ -115,7 +115,7 @@
* {@link EquationalReasoner#downcasted(com.oracle.graal.nodes.ValueNode) downcasted()}
*
*
- * */
+ */
private IdentityHashMap