forked from M-Labs/artiq
llvm_ir: move stacksave before lltag alloca in build_rpc
Signed-off-by: Steve Fan <sf@m-labs.hk>
This commit is contained in:
parent
9e5e234af3
commit
c0a7be0a90
|
@ -1249,13 +1249,13 @@ class LLVMIRGenerator:
|
||||||
self.engine.process(diag)
|
self.engine.process(diag)
|
||||||
tag += ir.rpc_tag(fun_type.ret, ret_error_handler)
|
tag += ir.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()))
|
lltag = self.llconst_of_const(ir.Constant(tag, builtins.TStr()))
|
||||||
lltagptr = self.llbuilder.alloca(lltag.type)
|
lltagptr = self.llbuilder.alloca(lltag.type)
|
||||||
self.llbuilder.store(lltag, lltagptr)
|
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)),
|
llargs = self.llbuilder.alloca(llptr, ll.Constant(lli32, len(args)),
|
||||||
name="rpc.args")
|
name="rpc.args")
|
||||||
for index, arg in enumerate(args):
|
for index, arg in enumerate(args):
|
||||||
|
|
Loading…
Reference in New Issue