Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/ir/Merge.java @ 2823:ac4b086cbd72
Merge
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Mon, 30 May 2011 16:35:08 +0200 |
parents | 530366123e46 c3f64b66fc78 |
children | d54ea877a302 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Merge.java Fri May 27 15:41:10 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Merge.java Mon May 30 16:35:08 2011 +0200 @@ -33,7 +33,7 @@ * about the basic block, including the successor and * predecessor blocks, exception handlers, liveness information, etc. */ -public final class Merge extends StateSplit { +public class Merge extends StateSplit { private static final int INPUT_COUNT = 0; @@ -54,32 +54,18 @@ return false; } - public final boolean isLoopHeader; - - /** - * Index of bytecode that generated this node when appended in a basic block. - * Negative values indicate special cases. - */ - private int bci; - /** * Constructs a new Merge at the specified bytecode index. * @param bci the bytecode index of the start * @param blockID the ID of the block * @param graph */ - public Merge(int bci, boolean isLoopHeader, Graph graph) { + public Merge(Graph graph) { super(CiKind.Illegal, INPUT_COUNT, SUCCESSOR_COUNT, graph); - this.bci = bci; - this.isLoopHeader = isLoopHeader; } - /** - * Gets the bytecode index of this instruction. - * @return the bytecode index of this instruction - */ - public int bci() { - return bci; + protected Merge(int inputCount, int successorCount, Graph graph) { + super(CiKind.Illegal, inputCount + INPUT_COUNT, successorCount + SUCCESSOR_COUNT, graph); } @Override @@ -95,21 +81,22 @@ builder.append(" ["); builder.append("]"); - //if (end() != null) { - builder.append(" -> "); - boolean hasSucc = false; - for (Node s : this.successors()) { - if (s == null) { - continue; - } - if (hasSucc) { - builder.append(", "); - } - builder.append("#"); + + builder.append(" -> "); + boolean hasSucc = false; + for (Node s : this.successors()) { + if (hasSucc) { + builder.append(", "); + } + builder.append("#"); + if (s != null) { builder.append(s.id()); - hasSucc = true; + } else { + builder.append("null"); } - //} + hasSucc = true; + } + return builder.toString(); } @@ -139,12 +126,12 @@ //} // print predecessors - if (!blockPredecessors().isEmpty()) { - out.print(" pred:"); - for (Instruction pred : blockPredecessors()) { - out.print(pred.block()); - } - } +// if (!blockPredecessors().isEmpty()) { +// out.print(" pred:"); +// for (Instruction pred : blockPredecessors()) { +// out.print(pred.block()); +// } +// } } @Override @@ -261,9 +248,6 @@ sb.append("] "); } } - if (value != null && value.hasSubst()) { - sb.append("alias ").append(Util.valueString(value.subst())); - } return sb.toString(); }