mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-28 20:53:35 +08:00
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
|
||||
|
||||
def _prepare_closure_call(self, insn):
|
||||
llclosure = self.map(insn.target_function())
|
||||
llargs = [self.map(arg) for arg in insn.arguments()]
|
||||
llclosure = self.map(insn.target_function())
|
||||
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)
|
||||
|
||||
def _prepare_ffi_call(self, insn):
|
||||
|
Loading…
Reference in New Issue
Block a user