summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope
Commit message (Collapse)AuthorAgeFilesLines
...
* Make DataLayout Non-Optional in the ModuleMehdi Amini2015-03-049-9/+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
* llvm/examples: Add missing include according to r230907.NAKAMURA Takumi2015-03-024-0/+4
| | | | llvm-svn: 230926
* [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
* [CMake] Add RuntimeDyld to libdeps corresponding to r229343.NAKAMURA Takumi2015-02-161-0/+1
| | | | llvm-svn: 229351
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-155-377/+377
| | | | | | requiring the macro. NFC; LLVM edition. llvm-svn: 229340
* [PM] Update the examples to reflect the removal of theChandler Carruth2015-02-135-9/+9
| | | | | | | | | | | llvm/PassManager.h wrapper header and its using declarations. These now directly use the legacy namespace. I had updated the #include lines in my large commit but forgot that the examples weren't being built and didn't update the code to use the correct namespace. Sorry for the noise here. llvm-svn: 229095
* [PM] Remove the old 'PassManager.h' header file at the top level ofChandler Carruth2015-02-1314-14/+14
| | | | | | | | | | | | | | | | | | | | 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
* Re-sort the #include lines in bindings and examples which I managed toChandler Carruth2015-02-131-2/+2
| | | | | | miss previously. llvm-svn: 229089
* [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-088-3/+38
| | | | | | 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
* [Orc] Add a Kaleidoscope/Orc tutorial demonstrating lazy-irgen.Lang Hames2015-02-063-0/+1366
| | | | | | | | This tutorial builds on the lazy_codegen kaleidoscope/orc tutorial by making a small set of changes (~75 lines diff) to defer ir-generation for function definitions until functions are actually referenced. llvm-svn: 228466
* [Orc] Add a Kaleidoscope/Orc tutorial demonstrating lazy-codegen.Lang Hames2015-02-063-0/+1344
| | | | | | | | This tutorial builds on the initial kaleidoscope/orc tutorial by adding a LazyEmittingLayer to the custom stack. This extra layer defers compilation of modules in the JIT until they are statically referenced. llvm-svn: 228459
* [Orc] Add a Kaleidoscope tutorial for Orc demonstrating eager compilation.Lang Hames2015-02-063-0/+1341
| | | | | | | This tutorial demonstrates a very basic custom Orc JIT stack that performs eager compilation: All modules are CodeGen'd immediately upon being added to the JIT. llvm-svn: 228456
* Reorder.NAKAMURA Takumi2015-01-195-5/+5
| | | | llvm-svn: 226419
* [CMake] examples/Kaleidoscope: Prune redundant libdeps.NAKAMURA Takumi2015-01-195-9/+0
| | | | llvm-svn: 226418
* [CMake] Update libdeps in examples/Kaleidoscope/Chapter4.NAKAMURA Takumi2015-01-191-0/+1
| | | | llvm-svn: 226417
* [Kaleidoscope] Run clang-format over chapter 4 of kaleidoscope.Lang Hames2015-01-161-44/+38
| | | | | | I forgot to do this for r226308. Thanks to Eric Christopher for the reminder. llvm-svn: 226327
* [Kaleidoscope] Fix a bug in Chapter 4 of the Kaleidoscope tutorial where repeatLang Hames2015-01-161-55/+253
| | | | | | | | calls to functions weren't evaluated correctly. Patch by Charlie Turner. Thanks Charlie! llvm-svn: 226308
* Manually specify the folder that Kaleidescope should reside in for ↵Aaron Ballman2015-01-071-0/+1
| | | | | | CMake-produced solutions that care about such things (like MSVC). This takes the Kaleidescope target out of the root solution folder and places it into the Examples folder where it belongs. llvm-svn: 225354
* Kaleidoscope: Value => MetadataDuncan P. N. Exon Smith2015-01-061-1/+1
| | | | llvm-svn: 225320
* cmake: Add Kaleidoscope targetDuncan P. N. Exon Smith2015-01-068-7/+14
| | | | llvm-svn: 225318
* Add a subdirectory in CMake for Chapter 8.Eric Christopher2015-01-061-0/+1
| | | | llvm-svn: 225315
* Once more on the cmake build. nativecodegen->native on the dependencies.Eric Christopher2014-12-085-5/+5
| | | | | | Thanks to Rafael Espindola for testing assistance. llvm-svn: 223678
* Attempt to fix the cmake build by requiring mcjit on the cmakeEric Christopher2014-12-085-0/+5
| | | | | | dependencies for the KS tutorials llvm-svn: 223677
* Fix KS tutorial build failure.Eric Christopher2014-12-085-775/+1059
| | | | | | | make all doesn't build the examples and it was uniquified since last build. llvm-svn: 223675
* Add Chapter 8 to the Kaleidoscope tutorial. This chapter addsEric Christopher2014-12-084-1/+1527
| | | | | | | | | a description of how to add debug information using DWARF and DIBuilder to the language. Thanks to David Blaikie for his assistance with this tutorial. llvm-svn: 223671
* Fix the JIT code for the Kaleidoscope tutorial.Eric Christopher2014-12-084-8/+36
| | | | llvm-svn: 223670
OpenPOWER on IntegriCloud