mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-27 21:50:29 +00:00
[Orc] Add a Kaleidoscope/Orc tutorial demonstrating lazy-codegen.
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
81bb18728b
commit
ead6da39e9
9
examples/Kaleidoscope/Orc/lazy_codegen/Makefile
Normal file
9
examples/Kaleidoscope/Orc/lazy_codegen/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
.PHONY: all
|
||||
all: toy
|
||||
|
||||
toy: toy.cpp
|
||||
clang++ -std=c++11 toy.cpp -g -O0 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --system-libs --libs core orcjit native` -o toy
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f toy
|
13
examples/Kaleidoscope/Orc/lazy_codegen/README.txt
Normal file
13
examples/Kaleidoscope/Orc/lazy_codegen/README.txt
Normal file
@ -0,0 +1,13 @@
|
||||
//===----------------------------------------------------------------------===/
|
||||
// Kaleidoscope with Orc - Initial Version
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
This version of Kaleidoscope with Orc demonstrates lazy code-generation.
|
||||
Unlike the first Kaleidoscope-Orc tutorial, where code-gen was performed as soon
|
||||
as modules were added to the JIT, this tutorial adds a LazyEmittingLayer to defer
|
||||
code-generation until modules are actually referenced. All IR-generation is still
|
||||
performed up-front.
|
||||
|
||||
This directory contain a Makefile that allow the code to be built in a
|
||||
standalone manner, independent of the larger LLVM build infrastructure. To build
|
||||
the program you will need to have 'clang++' and 'llvm-config' in your path.
|
1322
examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
Normal file
1322
examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user