Hi, I've attached a patch to get llvm-py working with LLVM 2.6 (from SVN). This patch works with r82 of llvm-py. Here's a summary of the changes:
- Removed instructions vicmp, and vfcmp.
- Added instructions fadd, fsub, and fmul.
- Removed is_trapping attribute of call instructions.
- Updated following enums in core.py: type kinds, value ids, opcodes, linkage, attributes.
- Updated wrap.cpp for api changes, e.g: replaced std::ostringstream with llvm::raw_string_stream, replaced llvm::ParseError with llvm::SMDiagnostic.
- In wrap.cpp, removed those passes which have been added to the llvm-c api.
- Regenerated _intrinsic_ids.py
- In module init function, added calls to LLVMLinkInJIT, LLVMLinkInInterpreter, and LLVMInitializeNativeTarget. These calls are required for the JIT and Interpreter to work.
I've tested this patch on Mac OS X 10.4
- patch-for-llvm-2.6.diff 71.18KB
Comment #1
Posted on Oct 12, 2009 by Quick RhinoEven with this patch, I can't cleanly import * from llvm.core with the current HEAD of 2.6 of LLVM. It complains about _LLVMCountDatatypes or something. Any hints there?
Comment #2
Posted on Oct 12, 2009 by Quick RhinoAh, the LLVMCountDatatypes seems to be specific to OS X. On Linux, it seems to work alright.
Comment #3
Posted on Oct 26, 2009 by Quick RhinoNow that LLVM 2.6 is really out, it would be nice to put this into the tree (and maybe do a release). I'd like to put it in the Gentoo tree...
Comment #4
Posted on Oct 28, 2009 by Swift LionApplied, thanks!
Status: Fixed
Labels:
Type-Defect
Priority-Medium