diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 9eed011d9..104fc1fc0 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -1346,13 +1346,13 @@ class LLVMIRGenerator: self.engine.process(diag) tag += self._rpc_tag(fun_type.ret, ret_error_handler) + llstackptr = self.llbuilder.call(self.llbuiltin("llvm.stacksave"), [], + name="rpc.stack") + lltag = self.llconst_of_const(ir.Constant(tag, builtins.TStr())) lltagptr = self.llbuilder.alloca(lltag.type) self.llbuilder.store(lltag, lltagptr) - llstackptr = self.llbuilder.call(self.llbuiltin("llvm.stacksave"), [], - name="rpc.stack") - llargs = self.llbuilder.alloca(llptr, ll.Constant(lli32, len(args)), name="rpc.args") for index, arg in enumerate(args):