diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-13 20:17:42 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-17 18:03:24 +0100 |
| commit | 09474b0a451bd4e3baea5e1a5e04f9b28f644bb3 (patch) | |
| tree | 70b77d62b9a625e04398903dc1db51e7fa793a8e /linearize.c | |
| parent | 5a7a06698fe2cd4ccb8d3f1a8585c70e6d8f7531 (diff) | |
| download | sparse-dev-09474b0a451bd4e3baea5e1a5e04f9b28f644bb3.tar.gz | |
cfg: add missing REPEAT_CFG_CLEANUP
simplify_branch() & insert_branch() convert a conditional branch
into an unconditional one, removing a child which may then
become unreachable.
However, these function doesn't set REPEAT_CFG_CLEANUP and the
unreachable child may not be removed.
Fix this by setting the missing REPEAT_CFG_CLEANUP in these functions.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'linearize.c')
| -rw-r--r-- | linearize.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linearize.c b/linearize.c index ab91113d..5d800b7f 100644 --- a/linearize.c +++ b/linearize.c @@ -726,6 +726,7 @@ void insert_branch(struct basic_block *bb, struct instruction *jmp, struct basic remove_parent(child, bb); } END_FOR_EACH_PTR(child); PACK_PTR_LIST(&bb->children); + repeat_phase |= REPEAT_CFG_CLEANUP; } |
