mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-21 01:00:54 +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;
|
||||
}
|
||||
|
||||
// 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').
|
||||
private void buildLevels() {
|
||||
int size = cfg.size();
|
||||
@ -113,7 +113,7 @@ class IrreducibleGraphSplitter {
|
||||
Arrays.fill(levels, -1);
|
||||
levels[0] = 0;
|
||||
for (int i = 1; i < size; ++i) {
|
||||
if (levels[i] >= 0) {
|
||||
if (levels[i] >= 0 || idom[i] < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user