-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial LLVM3.5 support #141
Conversation
For LLVM >= 3.5 explicitly force this to be enabled otherwise we can't compile against LLVM.
``Support/Debug.h``. We need to define our own DEBUG_TYPE The LLVM change responsible for this breakage is r206822
has been removed. The commit responsible for this is r202816. We should check if this header file is actually being used for older LLVM versions because I'm not convinced it is.
removed. The commit responsible for this is r202816 and r202827.
The commit responsible for this is r202816
DEBUG_TYPE. The LLVM change responsible for this breakage is r206822
The commit responsible for this is r202816
assertion entirely?
commit responsible is r199751.
The commit responsible for this breakage is r211033.
This needs rewriting!
was removed by r210803
The commit that caused this is r202052.
was caused by r199082
MemoryBuffer from the std::unique_ptr when getLazyBitcodeModule() succesfully takes ownership.
field was added to the struct in the array of global constructors. I'm completly ignore the extra field because I don't know what it does and the LLVM LangRef isn't very clear at all about this.
LLVM3.5 has been released and I can confirm that the commits on this pull request still compile correctly. |
Correction it doesn't compile correctly. I had the LLVM3.4 headers on my system so those were getting picked up so this doesn't compile correctly. |
llvm/Linker.h -> llvm/Linker/Linker.h (r203065 responsible) llvm/Assembly/AssemblyAnnotationWriter.h -> llvm/IR/AssemblyAnnotationWriter.h (r198688 responsible) llvm/DebugInfo.h -> llvm/IR/DebugInfo.h (r203046 responsible)
It was removed by r202839.
moves it to "llvm/IR/InstIterator.h" (r202814 is responsible). It turns out only InstructionInfoTable.cpp was actually using this include so I just removed the include from the other files.
Okay compilation is fixed. These commits need a massive tidy up though. |
I want to start landing some of these patches, so we can sort out the ones On Fri, Sep 12, 2014 at 6:46 AM, Dan Liew notifications@github.com wrote:
|
@ddunbar No problem. Just to warn you some of them are gross. The "linking" one is the worst. You're probably aware of this but support for linking archives of bitcode modules was dropped. As a temporary solution I duplicated the linking code from LLVM3.2 and implemented our own linker. I think this is the wrong way to do things. I think all the linking and (most optimisations) should be done outside of KLEE. That way
|
I am actually the one that ripped out the linking code from LLVM. :) Yeah, that is gross, but I am ok with it as a temporary way forward. It is Given that we only use the linking code for pulling in our own archive On Fri, Sep 12, 2014 at 12:58 PM, Dan Liew notifications@github.com wrote:
|
IIRC @MartinNowack tried that and the performance was terrible because klee-uclibc as a single LLVM bitcode module is huge and linking the module you want to run with it takes quite a while. |
The total run time for test suite is according to @delcyper's tests (#70)
I’m also more for removing the whole opt stuff out of it and providing KLEE with the final bc file. On 12 Sep 2014, at 22:10, Dan Liew notifications@github.com wrote:
|
Ah, yes, I can see how the performance might be an issue. Whether or not we For now, I think we should just take the approach of bringing in the legacy On Fri, Sep 12, 2014 at 1:22 PM, MartinNowack notifications@github.com
|
I just landed a bunch of the trivial ones on master. I ended up rewriting some of the commits which is going to make it hard to rebase this branch, but I plan on continuing to work through this. The main thing left is the changes to ModuleUtil, and then a pass over everything else to make sure I didn't miss any semantic changes. |
@ddunbar We can probably just chuck this branch. It was more of test to see if I could port it to LLVM3.5. If you cherry-pick the good commits from this branch then we can try to tackle the difficult parts in a cleaner way.
Does |
It's the underpinnings, but what we probably should have in LLVM is a On Mon, Sep 15, 2014 at 7:42 AM, Dan Liew notifications@github.com wrote:
|
Hi all, is there any news about getting KLEE to work with LLVM 3.5 in the near future? I've just tried it out with the latest commit of KLEE and I get similar errors to the ones in the following mailing list message: https://www.mail-archive.com/klee-dev@imperial.ac.uk/msg01770.html������������������������������������������������������������������ |
@banescusebi I wish I had time to work on this but right now I don't. You're quite welcome to have a go at it and I'll happily review a pull request. |
Closing this branch, as some commits were already pushed and the rest were incorporated as part of #253. |
LLVM 3.5 is going to be released very soon and RC2 is already available so the LLVM3.5 API should be stable. These commits patch KLEE to compile against LLVM3.5.
Some of the big changes are ....
ErrorOr<T>
has made the code a lot more complicated.These commits could certainly do with a tidy but I think it's a good start.