diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-04-17 16:03:02 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-04-17 16:03:02 +0200 |
commit | 038c1f95e46b9ce6191f191b90b8ef2655f45c84 (patch) | |
tree | 07d31bbd18ab6bc22407fac637c5cc3dd352272e | |
parent | e70440a4d126430a3cc0228b1a5d2dfaae55a9fb (diff) | |
parent | 75c5952aece63d5c90b2adfeaff4cb77e3a47520 (diff) | |
download | sparse-038c1f95e46b9ce6191f191b90b8ef2655f45c84.tar.gz |
Merge branch 'linear'
* linear: only allocate call instructions when needed
-rw-r--r-- | linearize.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linearize.c b/linearize.c index 7248fa56..cf87545c 100644 --- a/linearize.c +++ b/linearize.c @@ -1533,7 +1533,7 @@ static pseudo_t linearize_assignment(struct entrypoint *ep, struct expression *e static pseudo_t linearize_call_expression(struct entrypoint *ep, struct expression *expr) { struct expression *arg, *fn; - struct instruction *insn = alloc_typed_instruction(OP_CALL, expr->ctype); + struct instruction *insn; pseudo_t retval, call; struct ctype *ctype = NULL; struct symbol *fntype; @@ -1554,6 +1554,7 @@ static pseudo_t linearize_call_expression(struct entrypoint *ep, struct expressi ctype = &fntype->ctype; + insn = alloc_typed_instruction(OP_CALL, expr->ctype); add_symbol(&insn->fntypes, fntype); FOR_EACH_PTR(expr->args, arg) { pseudo_t new = linearize_expression(ep, arg); |