mirror of
https://github.com/danog/ir.git
synced 2024-11-30 04:39:43 +01:00
Fixed support for irreducible (incomplete) and merged loops
This commit is contained in:
parent
fca6ba0a8a
commit
2b4586fa0b
5
ir_cfg.c
5
ir_cfg.c
@ -802,11 +802,14 @@ next:
|
||||
if (!ir_worklist_len(&work)) {
|
||||
ir_bitset_clear(work.visited, ir_bitset_len(ir_worklist_capasity(&work)));
|
||||
}
|
||||
blocks[pred].loop_header = 0; /* support for merged loops */
|
||||
ir_worklist_push(&work, pred);
|
||||
} else {
|
||||
/* Otherwise it's a cross-join edge. See if it's a branch
|
||||
to an ancestor on the DJ spanning tree. */
|
||||
irreducible = (entry_times[pred] > entry_times[i] && exit_times[pred] < exit_times[i]);
|
||||
if (entry_times[pred] > entry_times[i] && exit_times[pred] < exit_times[i]) {
|
||||
irreducible = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
p++;
|
||||
|
Loading…
Reference in New Issue
Block a user