comparison graal/GraalCompiler/src/com/sun/c1x/ir/Phi.java @ 2768:43ffa0e47a46

Towards removing stateAfter on BlockEnd.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 23 May 2011 19:21:53 +0200
parents 99912abb3ff7
children dd6419f4bfe2
comparison
equal deleted inserted replaced
2767:cc2b98e2b832 2768:43ffa0e47a46
24 24
25 import com.oracle.graal.graph.*; 25 import com.oracle.graal.graph.*;
26 import com.sun.c1x.debug.*; 26 import com.sun.c1x.debug.*;
27 import com.sun.c1x.value.*; 27 import com.sun.c1x.value.*;
28 import com.sun.cri.ci.*; 28 import com.sun.cri.ci.*;
29 import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
29 30
30 /** 31 /**
31 * The {@code Phi} instruction represents the merging of dataflow 32 * The {@code Phi} instruction represents the merging of dataflow
32 * 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.
33 */ 34 */
34 public final class Phi extends Value { 35 public final class Phi extends Value {
35 36
36 private static final int DEFAULT_MAX_VALUES = 2; 37 private static final int DEFAULT_MAX_VALUES = 20;
37 38
38 private static final int INPUT_COUNT = 1; 39 private static final int INPUT_COUNT = 1;
39 private static final int INPUT_BLOCK = 0; 40 private static final int INPUT_BLOCK = 0;
40 41
41 private static final int SUCCESSOR_COUNT = 0; 42 private static final int SUCCESSOR_COUNT = 0;
107 setFlag(Flag.PhiDead); 108 setFlag(Flag.PhiDead);
108 } 109 }
109 110
110 @Override 111 @Override
111 public void print(LogStream out) { 112 public void print(LogStream out) {
112 out.print("phi function"); 113 out.print("phi function (");
114 for (int i = 0; i < inputs().size(); ++i) {
115 if (i != 0) {
116 out.print(' ');
117 }
118 out.print((Value) inputs().get(i));
119 }
120 out.print(')');
113 } 121 }
114 122
115 @Override 123 @Override
116 public String shortName() { 124 public String shortName() {
117 return "Phi: (" + valueCount() + ")"; 125 return "Phi: (" + valueCount() + ")";