Trying to put together a simple test JIT compiler, using ORC which as I understand it will be the supported API going forward, I noticed that in the first chapter of the updated Kaleidoscope tutorial, there is sample code that starts like this: ExecutionSession ES; RTDyldObjectLinkingLayer ObjectLayer; IRCompileLayer CompileLayer; DataLayout DL; MangleAndInterner Mangle; ThreadSafeContext Ctx; But in https://llvm.org/devmtg/2016-11/Slides/Hames-ORC.pdf there is sample code that looks like this: ObjectLinkingLayer LinkLayer; SimpleCompiler Compiler(TargetMachine()); IRCompileLayer<…> CompileLayer(LinkLayer, Compiler); Related but significantly different. Which version is now considered correct/preferred? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190510/10a9bc63/attachment.html>
Praveen Velliengiri via llvm-dev
2019-May-10 05:17 UTC
[llvm-dev] ORC - which example code?
Hi Russell As far as I know, the second is preferred. You can also look at the LLJIT && LLLazyJIT stack in the trunk which is off the shelf utility. Thanks On Fri, 10 May 2019 at 08:20, Russell Wallace via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Trying to put together a simple test JIT compiler, using ORC which as I > understand it will be the supported API going forward, I noticed that in > the first chapter of the updated Kaleidoscope tutorial, there is sample > code that starts like this: > > ExecutionSession ES; > RTDyldObjectLinkingLayer ObjectLayer; > IRCompileLayer CompileLayer; > > DataLayout DL; > MangleAndInterner Mangle; > ThreadSafeContext Ctx; > > But in https://llvm.org/devmtg/2016-11/Slides/Hames-ORC.pdf there is > sample code that looks like this: > > ObjectLinkingLayer LinkLayer; > SimpleCompiler Compiler(TargetMachine()); > IRCompileLayer<…> CompileLayer(LinkLayer, Compiler); > > Related but significantly different. > > Which version is now considered correct/preferred? > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190510/9e4cb543/attachment.html>
It turns out that ObjectLinkingLayer doesn't exist; that identifier occurs in the source tree only in comments, never as an identifier. Does that mean the second version of the API has been deleted and the first is now correct? On Fri, May 10, 2019 at 6:18 AM Praveen Velliengiri < praveenvelliengiri at gmail.com> wrote:> Hi Russell > As far as I know, the second is preferred. You can also look at the LLJIT > && LLLazyJIT stack in the trunk which is off the shelf utility. > Thanks > > On Fri, 10 May 2019 at 08:20, Russell Wallace via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Trying to put together a simple test JIT compiler, using ORC which as I >> understand it will be the supported API going forward, I noticed that in >> the first chapter of the updated Kaleidoscope tutorial, there is sample >> code that starts like this: >> >> ExecutionSession ES; >> RTDyldObjectLinkingLayer ObjectLayer; >> IRCompileLayer CompileLayer; >> >> DataLayout DL; >> MangleAndInterner Mangle; >> ThreadSafeContext Ctx; >> >> But in https://llvm.org/devmtg/2016-11/Slides/Hames-ORC.pdf there is >> sample code that looks like this: >> >> ObjectLinkingLayer LinkLayer; >> SimpleCompiler Compiler(TargetMachine()); >> IRCompileLayer<…> CompileLayer(LinkLayer, Compiler); >> >> Related but significantly different. >> >> Which version is now considered correct/preferred? >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190513/3e494cdd/attachment.html>
Apparently Analagous Threads
- "corrupted size vs. prev_size" when calling ExecutionSession::lookup()
- Compile issues with LLVM ORC JIT
- Possible stack corruption during call to JITSymbol::getAddress()
- Possible stack corruption during call to JITSymbol::getAddress()
- Possible stack corruption during call to JITSymbol::getAddress()