Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/ir/Phi.java @ 2769:dd6419f4bfe2
Fixed several issues with incorrect predecessor count/order. One known issue around exception dispatch remaining in fop.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Mon, 23 May 2011 21:21:47 +0200 |
parents | 43ffa0e47a46 |
children | 3e3338a1abb9 |
comparison
equal
deleted
inserted
replaced
2768:43ffa0e47a46 | 2769:dd6419f4bfe2 |
---|---|
32 * The {@code Phi} instruction represents the merging of dataflow | 32 * The {@code Phi} instruction represents the merging of dataflow |
33 * in the instruction graph. It refers to a join block and a variable. | 33 * in the instruction graph. It refers to a join block and a variable. |
34 */ | 34 */ |
35 public final class Phi extends Value { | 35 public final class Phi extends Value { |
36 | 36 |
37 private static final int DEFAULT_MAX_VALUES = 20; | 37 private static final int DEFAULT_MAX_VALUES = 2; |
38 | 38 |
39 private static final int INPUT_COUNT = 1; | 39 private static final int INPUT_COUNT = 1; |
40 private static final int INPUT_BLOCK = 0; | 40 private static final int INPUT_BLOCK = 0; |
41 | 41 |
42 private static final int SUCCESSOR_COUNT = 0; | 42 private static final int SUCCESSOR_COUNT = 0; |
138 } else { | 138 } else { |
139 phi.inputs().set(usedInputCount++, y); | 139 phi.inputs().set(usedInputCount++, y); |
140 } | 140 } |
141 return phi; | 141 return phi; |
142 } | 142 } |
143 | |
144 public void removeInput(int index) { | |
145 inputs().set(index, null); | |
146 for (int i = index + 1; i < usedInputCount; ++i) { | |
147 inputs().set(i - 1, inputs().get(i)); | |
148 } | |
149 usedInputCount--; | |
150 } | |
143 } | 151 } |