mirror of https://github.com/m-labs/artiq.git
transforms.llvm_ir_generator: call devirtualized functions directly.
This commit is contained in:
parent
bbd0ca7827
commit
f92ce291ef
|
@ -925,10 +925,13 @@ class LLVMIRGenerator:
|
||||||
return llvalue
|
return llvalue
|
||||||
|
|
||||||
def _prepare_closure_call(self, insn):
|
def _prepare_closure_call(self, insn):
|
||||||
llclosure = self.map(insn.target_function())
|
|
||||||
llargs = [self.map(arg) for arg in insn.arguments()]
|
llargs = [self.map(arg) for arg in insn.arguments()]
|
||||||
|
llclosure = self.map(insn.target_function())
|
||||||
llenv = self.llbuilder.extract_value(llclosure, 0)
|
llenv = self.llbuilder.extract_value(llclosure, 0)
|
||||||
llfun = self.llbuilder.extract_value(llclosure, 1)
|
if insn.static_target_function is None:
|
||||||
|
llfun = self.llbuilder.extract_value(llclosure, 1)
|
||||||
|
else:
|
||||||
|
llfun = self.map(insn.static_target_function)
|
||||||
return llfun, [llenv] + list(llargs)
|
return llfun, [llenv] + list(llargs)
|
||||||
|
|
||||||
def _prepare_ffi_call(self, insn):
|
def _prepare_ffi_call(self, insn):
|
||||||
|
|
Loading…
Reference in New Issue