[PATCH 06/11] there is always an active BB after linearize_fn_statement()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 linearize.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linearize.c b/linearize.c
index 9cbfeb786..6570c42d1 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);
 
-- 
2.18.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux