Skip to contentSkip to conversation

linearize: OP_INLINE do not use the function symbol

PATCH New Luc Van Oostenryck 1 participant 1 message Oct 24, 2020 Sparse checker

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linearize: OP_INLINE do not use the function symbol

The instruction OP_INLINE is a kind of note or comment, indicating that the code below it used to be the body of a function which has now been inlined. The symbol of the original function is displayed when this instruction is displayed but this symbol should not be considered as being used by the instruction since there is no dependency or def-use chain between the two.

So, replace the use_pseudo() by a simple assignment.

---
 linearize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linearize.c +1 -1
index 1081bda86425..e16c686ca73a 100644
@@ -2065,7 +2065,7 @@ static pseudo_t linearize_inlined_call(struct entrypoint *ep, struct statement *
 	pseudo = linearize_fn_statement(ep, stmt);
 	insn->target = pseudo;
 
-	use_pseudo(insn, symbol_pseudo(ep, stmt->inline_fn), &insn->func);
+	insn->func = symbol_pseudo(ep, stmt->inline_fn);
 	bb = ep->active;
 	if (!bb->insns)
 		bb->pos = stmt->pos;
Signature · 1 line
2.29.0