mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
[Orc] Add a Kaleidoscope tutorial for Orc demonstrating eager compilation.
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228456 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8713d99a25
commit
eddb26303b
9
examples/Kaleidoscope/Orc/initial/Makefile
Normal file
9
examples/Kaleidoscope/Orc/initial/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/initial/README.txt
Normal file
13
examples/Kaleidoscope/Orc/initial/README.txt
Normal file
@ -0,0 +1,13 @@
|
||||
//===----------------------------------------------------------------------===/
|
||||
// Kaleidoscope with Orc - Initial Version
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
This version of Kaleidoscope with Orc demonstrates fully eager compilation. When
|
||||
a function definition or top-level expression is entered it is immediately
|
||||
translated (IRGen'd) to LLVM IR and added to the JIT, where it is code-gen'd to
|
||||
native code and either stored (for function definitions) or executed (for
|
||||
top-level expressions).
|
||||
|
||||
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.
|
1319
examples/Kaleidoscope/Orc/initial/toy.cpp
Normal file
1319
examples/Kaleidoscope/Orc/initial/toy.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user