compiler: update for LLVM 3.7.

This commit is contained in:
whitequark 2016-03-31 08:16:03 +00:00
parent b8bd344e54
commit 2c04979727
3 changed files with 4 additions and 5 deletions

View File

@ -28,7 +28,7 @@ def main():
llmachine = llvm.Target.from_triple(target.triple).create_target_machine()
lljit = llvm.create_mcjit_compiler(llparsedmod, llmachine)
llmain = lljit.get_pointer_to_global(llparsedmod.get_function(llmod.name + ".__modinit__"))
llmain = lljit.get_function_address(llmod.name + ".__modinit__")
ctypes.CFUNCTYPE(None)(llmain)()
if __name__ == "__main__":

View File

@ -573,6 +573,7 @@ class LLVMIRGenerator:
self.llfunction.attributes.add('noinline')
self.llfunction.attributes.add('uwtable')
self.llfunction.attributes.personality = self.llbuiltin("__artiq_personality")
self.llbuilder = ll.IRBuilder()
llblock_map = {}
@ -1498,9 +1499,7 @@ class LLVMIRGenerator:
def process_LandingPad(self, insn):
# Layout on return from landing pad: {%_Unwind_Exception*, %Exception*}
lllandingpadty = ll.LiteralStructType([llptr, llptr])
lllandingpad = self.llbuilder.landingpad(lllandingpadty,
self.llbuiltin("__artiq_personality"),
cleanup=True)
lllandingpad = self.llbuilder.landingpad(lllandingpadty, cleanup=True)
llrawexn = self.llbuilder.extract_value(lllandingpad, 1)
llexn = self.llbuilder.bitcast(llrawexn, self.llty_of_type(insn.type))
llexnnameptr = self.llbuilder.gep(llexn, [self.llindex(0), self.llindex(0)],

View File

@ -37,7 +37,7 @@ requirements:
- binutils-or1k-linux
run:
- python >=3.5.1
- llvmlite-artiq
- llvmlite-artiq 0.10.0.dev py35_20
- scipy
- numpy
- prettytable