Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/gen/PhiSimplifier.java @ 2764:99912abb3ff7
Phi clean up. Phis no longer save their local/stack index.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Mon, 23 May 2011 15:07:01 +0200 |
parents | 0c5791bc90fb |
children | 3e3338a1abb9 |
comparison
equal
deleted
inserted
replaced
2763:5e8a69041cd7 | 2764:99912abb3ff7 |
---|---|
55 return phi; | 55 return phi; |
56 } else { | 56 } else { |
57 // attempt to simplify the phi by recursively simplifying its operands | 57 // attempt to simplify the phi by recursively simplifying its operands |
58 phi.setFlag(Value.Flag.PhiVisited); | 58 phi.setFlag(Value.Flag.PhiVisited); |
59 Value phiSubst = null; | 59 Value phiSubst = null; |
60 int max = phi.phiInputCount(); | 60 int max = phi.valueCount(); |
61 boolean cannotSimplify = false; | 61 boolean cannotSimplify = false; |
62 for (int i = 0; i < max; i++) { | 62 for (int i = 0; i < max; i++) { |
63 Value oldInstr = phi.inputAt(i); | 63 Value oldInstr = phi.valueAt(i); |
64 | 64 |
65 if (oldInstr == null || oldInstr.isIllegal() || oldInstr.isDeadPhi()) { | 65 if (oldInstr == null || oldInstr.isIllegal() || oldInstr.isDeadPhi()) { |
66 // if one operand is illegal, make the entire phi illegal | 66 // if one operand is illegal, make the entire phi illegal |
67 phi.makeDead(); | 67 phi.makeDead(); |
68 phi.clearFlag(Value.Flag.PhiVisited); | 68 phi.clearFlag(Value.Flag.PhiVisited); |