forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Naive and exploratory implementation of caching LLVM code and importi…
…ng it back as .so object.
- Loading branch information
Saleh Dindar
committed
Apr 14, 2013
1 parent
8b50b9f
commit 37eba2a
Showing
7 changed files
with
101 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
The code generation is done in src/codegen.cpp | ||
|
||
All the functions and global variables are added to jl_Module which is | ||
initialized with the name "julia" | ||
|
||
Interface functions to src/codegen.cpp are | ||
jl_Compile : generate LLVM code from AST for a function | ||
jl_generate_fptr: Add the LLVM code to ExecutionEngine JIT compile and returno it. | ||
|
||
Code is generated at several places: | ||
jl_compile_hint -> jl_get_specialization | ||
Here a generic function is specialized and compiled to LLVM | ||
|
||
jl_eval_with_compiler_p | ||
This is just eval but compiles the function before executing it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
llc -relocation-model=pic usr/lib/julia/sys.bc -o usr/lib/julia/sys.s | ||
cc -shared usr/lib/julia/sys.s -o usr/lib/julia/sys.ji.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters