开发者

How to embed LLVM?

开发者 https://www.devze.com 2023-01-12 21:24 出处:网络
The LLVM Core project consists of: Compiler - converts source code to LLVM IR VM - executes compiled IR开发者_如何学JAVA code

The LLVM Core project consists of:

How can I embed the VM to a C++ application?


The LLVM is really a collection of libraries that you can link to, so it's pretty easy to embed. More often the LLVM takes IR that you generate and compiles it directly to machine code. There is also a library available to interpret and execute IR for platforms that do not support JIT compilation.

There's a pretty good tutorial available on the LLVM website here: http://llvm.org/docs/tutorial/. I suggest that you go through that and then ask more specific questions if you have them.


Take a look at the HowToUseJIT example in LLVM.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号