Fix another bug in DFG simplifier

This commit is contained in:
Alexey Andreev 2015-03-13 14:57:59 +04:00
parent 31f6439652
commit 793d1e19d2

View File

@ -66,11 +66,13 @@ public class DataFlowGraphBuilder implements InstructionReader {
startNodes.add(i);
}
for (int pred : graph.incomingEdges(i)) {
if (importantNodes.contains(classes.find(pred)) && importantNodes.contains(classes.find(i))) {
boolean predImportant = importantNodes.contains(classes.find(pred));
boolean nodeImportant = importantNodes.contains(classes.find(i));
if (predImportant && nodeImportant) {
continue;
}
int newCls = classes.union(pred, i);
if (importantNodes.contains(pred)) {
if (nodeImportant || predImportant) {
importantNodes.add(newCls);
}
}