<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 9, 2019 at 8:32 PM Russell Wallace via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">With regard to using LLVM to implement a JIT compiler,<div><br></div><div>This can be considered to consist of two stages, first generating intermediate code in SSA form and second JIT-compiling it to machine code.</div><div><br></div><div>The JIT API has undergone large changes in recent years with the move to ORC.</div><div><br></div><div>Do I understand correctly that this only affects the second stage? So when I look at the Kaleidoscope tutorial, e.g. chapter 3 <a href="https://llvm.org/docs/tutorial/LangImpl03.html" target="_blank">https://llvm.org/docs/tutorial/LangImpl03.html</a> 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</div><div><br></div><div><div>static LLVMContext TheContext;</div><div>static IRBuilder<> Builder(TheContext);</div><div>static std::unique_ptr<Module> TheModule;</div><div>static std::map<std::string, Value *> NamedValues;</div></div><div><br></div><div>Is this still considered to be correct, unaffected by the move to ORC?</div></div></div></blockquote><div><br></div><div>Yes, this is correct.</div><div><br></div><div>-- </div><div>Mehdi</div></div></div>