summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Orc
Commit message (Collapse)AuthorAgeFilesLines
* [Kaleidoscope] Remove the old Kaleidoscope/ORC tutorial series.Lang Hames2016-05-2713-5684/+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-194-45/+121
| | | | | | | | 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-144-80/+88
| | | | | | | | | | | 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
* Remove autoconf supportChris Bieneman2016-01-264-68/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* 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-074-4/+4
| | | | 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-084-4/+4
| | | | | | some AST nodes llvm-svn: 249703
* Fix Clang-tidy modernize-use-nullptr warnings in examples and include ↵Hans Wennborg2015-09-294-26/+18
| | | | | | | | | | 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-184-448/+444
| | | | llvm-svn: 247971
* Remove access to the DataLayout in the TargetMachineMehdi Amini2015-07-244-10/+10
| | | | | | | | | | | | | | | | | | | | | | 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-244-10/+10
| | | | | | | | | | 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-244-10/+10
| | | | | | | | | | | | | | | | | | | | | | 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-234-17/+13
| | | | | | | 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-304-46/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-044-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-262-23/+19
| | | | 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] More diff-reduction between tutorial versions.Lang Hames2015-02-261-2/+2
| | | | llvm-svn: 230658
* [Orc][Kaleidoscope] Clean up the Orc/Kaleidoscope tutorials to minimize the ↵Lang Hames2015-02-254-168/+187
| | | | | | | | diffs between them. llvm-svn: 230542
* [Orc][Kaleidoscope] Tidy up the lazy_irgen tutorial, touch up a couple ofLang Hames2015-02-232-31/+46
| | | | | | 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-214-0/+8
| | | | | | NFC. llvm-svn: 230143
* [Orc][Kaleidoscope] Fix the orc/kaleidoscope tutorials on linux.Lang Hames2015-02-204-8/+12
| | | | llvm-svn: 229949
* [orcjit] Include CMake support for the fully_lazy example and fix the buildDavid Blaikie2015-02-193-6/+8
| | | | | | | 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 the Orc/Kaleidoscope tutorials easier to build onLang Hames2015-02-184-12/+40
| | | | | | Darwin. llvm-svn: 229761
* [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-174-0/+1454
| | | | | | | | 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
* [Orc][Kaleidoscope] Update the MainLoop code of the orc/kaleidoscope tutorialsLang Hames2015-02-173-12/+12
| | | | | | to get rid of the duplicate prompt. NFC. llvm-svn: 229465
* [PM] Remove the old 'PassManager.h' header file at the top level ofChandler Carruth2015-02-133-3/+3
| | | | | | | | | | | | | | | | | | | | LLVM's include tree and the use of using declarations to hide the 'legacy' namespace for the old pass manager. This undoes the primary modules-hostile change I made to keep out-of-tree targets building. I sent an email inquiring about whether this would be reasonable to do at this phase and people seemed fine with it, so making it a reality. This should allow us to start bootstrapping with modules to a certain extent along with making it easier to mix and match headers in general. The updates to any code for users of LLVM are very mechanical. Switch from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h". Qualify the types which now produce compile errors with "legacy::". The most common ones are "PassManager", "PassManagerBase", and "FunctionPassManager". llvm-svn: 229094
* [Orc] Add a JITSymbol class to the Orc APIs, refactor APIs, update clients.Lang Hames2015-02-093-26/+26
| | | | | | | | | | | | | | | | This patch refactors a key piece of the Orc APIs: It removes the *::getSymbolAddress and *::lookupSymbolAddressIn methods, which returned target addresses (uint64_ts), and replaces them with *::findSymbol and *::findSymbolIn respectively, which return instances of the new JITSymbol type. Unlike the old methods, calling findSymbol or findSymbolIn does not cause the symbol to be immediately materialized when found. Instead, the symbol will be materialized if/when the getAddress method is called on the returned JITSymbol. This allows us to query for the existence of symbols without actually materializing them. In the future I expect more information to be attached to the JITSymbol class, for example whether the returned symbol is a weak or strong definition. This will allow us to properly handle weak symbols and multiple definitions. llvm-svn: 228557
* Kaleidoscope-Orc: Reuse the IRGen utility function in later chapters, and ↵David Blaikie2015-02-083-20/+40
| | | | | | remove an unused parameter. llvm-svn: 228543
* Kaleidoscope-Orc: Extract IRGen work into a utility function.David Blaikie2015-02-081-7/+15
| | | | llvm-svn: 228539
* Constify the Orc Kaleidoscope examples IRGen functions.David Blaikie2015-02-083-66/+66
| | | | llvm-svn: 228537
* [Orc][Kaleidoscope] Build Kaleidoscope/Orc tutorials with warnings.Lang Hames2015-02-083-3/+3
| | | | llvm-svn: 228531
* [Orc][Kaleidoscope] Remove fixed sized buffers from string conversion code andLang Hames2015-02-083-77/+71
| | | | | | further c++ify the Kaleidoscope/Orc tutorials. llvm-svn: 228530
* [CMake] Kaleidoscope-Orc: Update libdeps.NAKAMURA Takumi2015-02-083-3/+6
| | | | llvm-svn: 228524
* Add CMake build support for Orc examples (& fix some clang -Werror buildDavid Blaikie2015-02-087-3/+37
| | | | | | breaks due to unused variables). llvm-svn: 228520
* [Orc][Kaleidoscope] Fix method-name think-o. NFC.Lang Hames2015-02-083-10/+10
| | | | llvm-svn: 228519
OpenPOWER on IntegriCloud