summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Kaleidoscope] Remove the old Kaleidoscope/ORC tutorial series.Lang Hames2016-05-271-1461/+0
| | | | | | This code has been superseded by the new Building A JIT series. llvm-svn: 271059
* Fix some Clang-tidy modernize-use-bool-literals and Include What You Use ↵Eugene Zelenko2016-05-191-12/+31
| | | | | | | | warnings in examples; other minor fixes. Differential revision: http://reviews.llvm.org/D20397 llvm-svn: 270008
* [Orc] Rename OrcArchitectureSupport to OrcABISupport and add Win32 ABI support.Lang Hames2016-05-071-2/+2
| | | | | | | | This enables lazy JITing on Windows x86-64. Patch by David. Thanks David! llvm-svn: 268845
* Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini2016-04-141-20/+22
| | | | | | | | | | | At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
* Fix examples corresponding to r257302.NAKAMURA Takumi2016-01-111-1/+1
| | | | llvm-svn: 257313
* [Orc] Fix Kaleidoscope example for change in r254693.Lang Hames2015-12-041-1/+1
| | | | llvm-svn: 254695
* examples: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-11-071-1/+1
| | | | llvm-svn: 252379
* [Kaleidoscope][Orc] Fix the fully_lazy Orc Kaleidoscope example.Lang Hames2015-11-031-6/+3
| | | | | | r251933 changed the Orc compile callbacks API, which broke this. llvm-svn: 251942
* Make the Kaleidoscope Orc examples -Wdeprecated clean by avoiding copying ↵David Blaikie2015-10-081-1/+1
| | | | | | some AST nodes llvm-svn: 249703
* Fix Clang-tidy modernize-use-nullptr warnings in examples and include ↵Hans Wennborg2015-09-291-7/+5
| | | | | | | | | | directories; other minor cleanups. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13172 llvm-svn: 248811
* Remove trailing whitespace from the old Orc Kaleidoscope examples.Lang Hames2015-09-181-112/+111
| | | | llvm-svn: 247971
* Remove access to the DataLayout in the TargetMachineMehdi Amini2015-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Replace getDataLayout() with a createDataLayout() method to make explicit that it is intended to create a DataLayout only and not accessing it for other purpose. This change is the last of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: jholewinski, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11103 (cherry picked from commit 5609fc56bca971e5a7efeaa6ca4676638eaec5ea) From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243114
* Revert "Remove access to the DataLayout in the TargetMachine"Mehdi Amini2015-07-241-2/+2
| | | | | | | | | | This reverts commit 0f720d984f419c747709462f7476dff962c0bc41. It breaks clang too badly, I need to prepare a proper patch for clang first. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243089
* Remove access to the DataLayout in the TargetMachineMehdi Amini2015-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Replace getDataLayout() with a createDataLayout() method to make explicit that it is intended to create a DataLayout only and not accessing it for other purpose. This change is the last of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: jholewinski, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11103 (cherry picked from commit 5609fc56bca971e5a7efeaa6ca4676638eaec5ea) From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243083
* Simplify the Mangler interface now that DataLayout is mandatory.Rafael Espindola2015-06-231-3/+2
| | | | | | | We only need to pass in a DataLayout when mangling a raw string, not when constructing the mangler. llvm-svn: 240405
* [Orc] Reapply r236465 with fixes for the MSVC bots.Lang Hames2015-05-051-8/+14
| | | | llvm-svn: 236506
* [Orc] Revert r236465 - It broke the Windows bots.Lang Hames2015-05-041-14/+8
| | | | | | | Looks like the usual missing explicit move-constructor issue with MSVC. I should have a fix shortly. llvm-svn: 236472
* [Orc] Refactor the compile-on-demand layer to make module partitioning lazy,Lang Hames2015-05-041-8/+14
| | | | | | | | | | | | | | | and avoid cloning unused decls into every partition. Module partitioning showed up as a source of significant overhead when I profiled some trivial test cases. Avoiding the overhead of partitionging for uncalled functions helps to mitigate this. This change also means that it is no longer necessary to have a LazyEmittingLayer underneath the CompileOnDemand layer, since the CompileOnDemandLayer will not extract or emit function bodies until they are called. llvm-svn: 236465
* [Orc] Update kaleidoscope tutorial for API change in r234669.Lang Hames2015-04-111-1/+1
| | | | llvm-svn: 234673
* [MCJIT][Orc] Refactor RTDyldMemoryManager, weave RuntimeDyld::SymbolInfo throughLang Hames2015-03-301-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MCJIT. This patch decouples the two responsibilities of the RTDyldMemoryManager class, memory management and symbol resolution, into two new classes: RuntimeDyld::MemoryManager and RuntimeDyld::SymbolResolver. The symbol resolution interface is modified slightly, from: uint64_t getSymbolAddress(const std::string &Name); to: RuntimeDyld::SymbolInfo findSymbol(const std::string &Name); The latter passes symbol flags along with symbol addresses, allowing RuntimeDyld and others to reason about non-strong/non-exported symbols. The memory management interface removes the following method: void notifyObjectLoaded(ExecutionEngine *EE, const object::ObjectFile &) {} as it is not related to memory management. (Note: Backwards compatibility *is* maintained for this method in MCJIT and OrcMCJITReplacement, see below). The RTDyldMemoryManager class remains in-tree for backwards compatibility. It inherits directly from RuntimeDyld::SymbolResolver, and indirectly from RuntimeDyld::MemoryManager via the new MCJITMemoryManager class, which just subclasses RuntimeDyld::MemoryManager and reintroduces the notifyObjectLoaded method for backwards compatibility). The EngineBuilder class retains the existing method: EngineBuilder& setMCJITMemoryManager(std::unique_ptr<RTDyldMemoryManager> mcjmm); and includes two new methods: EngineBuilder& setMemoryManager(std::unique_ptr<MCJITMemoryManager> MM); EngineBuilder& setSymbolResolver(std::unique_ptr<RuntimeDyld::SymbolResolver> SR); Clients should use EITHER: A single call to setMCJITMemoryManager with an RTDyldMemoryManager. OR (exclusive) One call each to each of setMemoryManager and setSymbolResolver. This patch should be fully compatible with existing uses of RTDyldMemoryManager. If it is not it should be considered a bug, and the patch either fixed or reverted. If clients find the new API to be an improvement the goal will be to deprecate and eventually remove the RTDyldMemoryManager class in favor of the new classes. llvm-svn: 233509
* Fix build.Rafael Espindola2015-03-251-1/+1
| | | | llvm-svn: 233171
* Make DataLayout Non-Optional in the ModuleMehdi Amini2015-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: DataLayout keeps the string used for its creation. As a side effect it is no longer needed in the Module. This is "almost" NFC, the string is no longer canonicalized, you can't rely on two "equals" DataLayout having the same string returned by getStringRepresentation(). Get rid of DataLayoutPass: the DataLayout is in the Module The DataLayout is "per-module", let's enforce this by not duplicating it more than necessary. One more step toward non-optionality of the DataLayout in the module. Make DataLayout Non-Optional in the Module Module->getDataLayout() will never returns nullptr anymore. Reviewers: echristo Subscribers: resistor, llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D7992 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231270
* [Orc][Kaleidoscope] More tutorial cleanup, a little extra debugging output.Lang Hames2015-02-261-11/+10
| | | | llvm-svn: 230705
* [Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy ↵Lang Hames2015-02-261-1/+5
| | | | | | tutorial. llvm-svn: 230664
* [Orc][Kaleidoscope] Clean up the Orc/Kaleidoscope tutorials to minimize the ↵Lang Hames2015-02-251-44/+43
| | | | | | | | diffs between them. llvm-svn: 230542
* [Orc][Kaleidoscope] Tidy up the lazy_irgen tutorial, touch up a couple ofLang Hames2015-02-231-10/+9
| | | | | | comments in the fully_lazy tutorial to minimize the diff between the two. llvm-svn: 230202
* [Orc][Kaleidoscope] Remove dead AST map in SessionContext.Lang Hames2015-02-231-2/+1
| | | | llvm-svn: 230201
* [Orc] Move Orc code into a namespace (llvm::orc), update Kaleidoscope code.Lang Hames2015-02-211-0/+2
| | | | | | NFC. llvm-svn: 230143
* [orcjit] Include CMake support for the fully_lazy example and fix the buildDavid Blaikie2015-02-191-5/+5
| | | | | | | Not sure if/how to make the CMake build use C++14 for the examples, so let's stick to C++11 for now. llvm-svn: 229888
* [Orc][Kaleidoscope] Fix typo in tutorial comment.Lang Hames2015-02-191-1/+1
| | | | llvm-svn: 229821
* [Orc][Kaleidoscope] Make the 'fully lazy' orc kaleidoscope tutorial lazier ↵Lang Hames2015-02-191-26/+45
| | | | | | | | still. The new JIT doesn't IRGen stubs until they're referenced. llvm-svn: 229807
* [Orc][Kaleidoscope] Fix a fixme - no reason we can't use C++14 in the tutorials.Lang Hames2015-02-181-11/+14
| | | | llvm-svn: 229765
* [Orc][Kaleidoscope] Make sure to look for the mangled name when updating theLang Hames2015-02-181-1/+1
| | | | | | function body pointer in the fully lazy orc/kaleidoscope tutorial. llvm-svn: 229760
* [Orc][Kaleidoscope] Fix misnumbered steps in comments, plus tidy oneLang Hames2015-02-171-4/+4
| | | | | | explanation up a little. llvm-svn: 229467
* [Orc][Kaleidoscope] Add an example of extreme-laziness in Orc.Lang Hames2015-02-171-0/+1412
The version of the tutorial uses the new compile callbacks API to inject stubs that trigger IRGen & Codegen of their respective function bodies when they are first called. llvm-svn: 229466
OpenPOWER on IntegriCloud