Russell Wallace via llvm-dev
2019-May-10 03:31 UTC
[llvm-dev] The move to ORC - is IR generation unchanged?
With regard to using LLVM to implement a JIT compiler, This can be considered to consist of two stages, first generating intermediate code in SSA form and second JIT-compiling it to machine code. The JIT API has undergone large changes in recent years with the move to ORC. Do I understand correctly that this only affects the second stage? So when I look at the Kaleidoscope tutorial, e.g. chapter 3 https://llvm.org/docs/tutorial/LangImpl03.html which is one of the chapters acknowledged to have been not yet updated, the example code for the first stage, generating intermediate code, starts with static LLVMContext TheContext; static IRBuilder<> Builder(TheContext); static std::unique_ptr<Module> TheModule; static std::map<std::string, Value *> NamedValues; Is this still considered to be correct, unaffected by the move to ORC? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190510/46d92199/attachment.html>
Mehdi AMINI via llvm-dev
2019-May-10 03:46 UTC
[llvm-dev] The move to ORC - is IR generation unchanged?
On Thu, May 9, 2019 at 8:32 PM Russell Wallace via llvm-dev < llvm-dev at lists.llvm.org> wrote:> With regard to using LLVM to implement a JIT compiler, > > This can be considered to consist of two stages, first generating > intermediate code in SSA form and second JIT-compiling it to machine code. > > The JIT API has undergone large changes in recent years with the move to > ORC. > > Do I understand correctly that this only affects the second stage? So when > I look at the Kaleidoscope tutorial, e.g. chapter 3 > https://llvm.org/docs/tutorial/LangImpl03.html which is one of the > chapters acknowledged to have been not yet updated, the example code for > the first stage, generating intermediate code, starts with > > static LLVMContext TheContext; > static IRBuilder<> Builder(TheContext); > static std::unique_ptr<Module> TheModule; > static std::map<std::string, Value *> NamedValues; > > Is this still considered to be correct, unaffected by the move to ORC? >Yes, this is correct. -- Mehdi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190509/7a568a8e/attachment.html>