diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-31 18:17:52 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-09-06 01:37:51 +0200 |
| commit | 4bc03f94bb1d42f64f5927b4c0adad98422eef2f (patch) | |
| tree | 33ecc6a4db9c80f0b231eacecd69561ace14ede7 | |
| parent | 2320a68d4d2bdc5ad097934a8c75d3d0f0b98ce0 (diff) | |
| download | sparse-dev-4bc03f94bb1d42f64f5927b4c0adad98422eef2f.tar.gz | |
there is always an active BB after linearize_fn_statement()
After having called linearize_fn_statement() the active BB
is tested but at this point there is always an active BB as
linearize_fn_statement() always create one.
So, remove this unneeded test.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | linearize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linearize.c b/linearize.c index 9cbfeb78..6570c42d 100644 --- a/linearize.c +++ b/linearize.c @@ -2016,7 +2016,7 @@ static pseudo_t linearize_inlined_call(struct entrypoint *ep, struct statement * use_pseudo(insn, symbol_pseudo(ep, stmt->inline_fn), &insn->func); bb = ep->active; - if (bb && !bb->insns) + if (!bb->insns) bb->pos = stmt->pos; add_one_insn(ep, insn); return pseudo; @@ -2458,7 +2458,7 @@ static struct entrypoint *linearize_fn(struct symbol *sym, struct symbol *base_t } END_FOR_EACH_PTR(arg); result = linearize_fn_statement(ep, stmt); - if (bb_reachable(ep->active) && !bb_terminated(ep->active)) { + if (!bb_terminated(ep->active)) { struct symbol *ret_type = base_type->ctype.base_type; struct instruction *insn = alloc_typed_instruction(OP_RET, ret_type); |
