Mercurial > hg > truffle
comparison graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ssa/SSAUtils.java @ 21226:2f2fac20c446
LIRVerifier: verify PHIs.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Thu, 23 Apr 2015 11:30:36 +0200 |
parents | f226f63af996 |
children | f85711ac631c |
comparison
equal
deleted
inserted
replaced
21225:422c91256dd9 | 21226:2f2fac20c446 |
---|---|
101 | 101 |
102 public static boolean verifySSAForm(LIR lir) { | 102 public static boolean verifySSAForm(LIR lir) { |
103 return new SSAVerifier(lir).verify(); | 103 return new SSAVerifier(lir).verify(); |
104 } | 104 } |
105 | 105 |
106 public static void verifyPhi(LIR lir, AbstractBlockBase<?> merge) { | |
107 assert merge.getPredecessorCount() > 1; | |
108 for (AbstractBlockBase<?> pred : merge.getPredecessors()) { | |
109 forEachPhiValuePair(lir, merge, pred, (phiIn, phiOut) -> { | |
110 assert phiIn.getLIRKind().equals(phiOut.getLIRKind()) || | |
111 (phiIn.getPlatformKind().equals(phiOut.getPlatformKind()) && phiIn.getLIRKind().isDerivedReference() && phiOut.getLIRKind().isValue()); | |
112 }); | |
113 } | |
114 } | |
115 | |
106 } | 116 } |