mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-18 04:14:50 -08:00
Fix bug in irreducible graph splitting algorithm
This commit is contained in:
parent
220537d984
commit
c65a9e1c97
|
@ -105,7 +105,7 @@ class IrreducibleGraphSplitter {
|
||||||
this.domNodes = domGraph;
|
this.domNodes = domGraph;
|
||||||
}
|
}
|
||||||
|
|
||||||
// n-th element of output array (levels) will contain length of the path from root to node node N
|
// n-th element of output array (levels) will contain length of the path from root to node N
|
||||||
// (paper calls this 'level').
|
// (paper calls this 'level').
|
||||||
private void buildLevels() {
|
private void buildLevels() {
|
||||||
int size = cfg.size();
|
int size = cfg.size();
|
||||||
|
@ -113,7 +113,7 @@ class IrreducibleGraphSplitter {
|
||||||
Arrays.fill(levels, -1);
|
Arrays.fill(levels, -1);
|
||||||
levels[0] = 0;
|
levels[0] = 0;
|
||||||
for (int i = 1; i < size; ++i) {
|
for (int i = 1; i < size; ++i) {
|
||||||
if (levels[i] >= 0) {
|
if (levels[i] >= 0 || idom[i] < 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user