|
Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735 by inverting the relationship between Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer.
Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. We could make this slightly cleaner if we just typedef'ed LLVMModuleProviderRef to LLVMModuleRef, but that would break programs that currently refer to LLVMOpaqueModuleProvider* directly. Is that ok?
Tested with `make BUILD_EXAMPLES=1 && make check-lit`
Saves ~130 lines of code.
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+574 lines, -670 lines) |
Patch |
 |
M |
docs/tutorial/LangImpl4.html
|
View
|
|
5 chunks |
+13 lines, -26 lines |
0 comments
|
Download
|
 |
M |
docs/tutorial/LangImpl5.html
|
View
|
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
docs/tutorial/LangImpl6.html
|
View
|
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
docs/tutorial/LangImpl7.html
|
View
|
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
examples/BrainF/BrainFDriver.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/Fibonacci/fibonacci.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/HowToUseJIT/HowToUseJIT.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/Kaleidoscope/Chapter4/toy.cpp
|
View
|
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
examples/Kaleidoscope/Chapter5/toy.cpp
|
View
|
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
examples/Kaleidoscope/Chapter6/toy.cpp
|
View
|
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
examples/Kaleidoscope/Chapter7/toy.cpp
|
View
|
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
examples/ParallelJIT/ParallelJIT.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
include/llvm-c/Core.h
|
View
|
1
2
|
5 chunks |
+14 lines, -12 lines |
0 comments
|
Download
|
 |
M |
include/llvm/Bitcode/Archive.h
|
View
|
|
4 chunks |
+10 lines, -11 lines |
0 comments
|
Download
|
 |
M |
include/llvm/Bitcode/ReaderWriter.h
|
View
|
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
include/llvm/ExecutionEngine/ExecutionEngine.h
|
View
|
|
10 chunks |
+21 lines, -34 lines |
0 comments
|
Download
|
 |
M |
include/llvm/GVMaterializer.h
|
View
|
1
2
3
|
2 chunks |
+28 lines, -50 lines |
0 comments
|
Download
|
 |
M |
include/llvm/GlobalValue.h
|
View
|
1
|
3 chunks |
+27 lines, -8 lines |
0 comments
|
Download
|
 |
M |
include/llvm/Module.h
|
View
|
1
2
3
|
3 chunks |
+47 lines, -0 lines |
0 comments
|
Download
|
 |
M |
include/llvm/PassManager.h
|
View
|
|
3 chunks |
+3 lines, -10 lines |
0 comments
|
Download
|
 |
M |
include/llvm/Support/IRReader.h
|
View
|
|
2 chunks |
+17 lines, -22 lines |
0 comments
|
Download
|
 |
M |
lib/Archive/Archive.cpp
|
View
|
1
|
3 chunks |
+14 lines, -29 lines |
0 comments
|
Download
|
 |
M |
lib/Archive/ArchiveInternals.h
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
lib/Archive/ArchiveReader.cpp
|
View
|
1
|
4 chunks |
+19 lines, -19 lines |
0 comments
|
Download
|
 |
M |
lib/Archive/ArchiveWriter.cpp
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
lib/AsmParser/LLParser.cpp
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
lib/Bitcode/Reader/BitReader.cpp
|
View
|
1
2
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
lib/Bitcode/Reader/BitcodeReader.h
|
View
|
1
2
3
|
7 chunks |
+19 lines, -18 lines |
0 comments
|
Download
|
 |
M |
lib/Bitcode/Reader/BitcodeReader.cpp
|
View
|
1
2
3
|
9 chunks |
+63 lines, -70 lines |
0 comments
|
Download
|
 |
M |
lib/Bitcode/Writer/BitcodeWriter.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
lib/ExecutionEngine/ExecutionEngine.cpp
|
View
|
1
2
|
11 chunks |
+21 lines, -48 lines |
0 comments
|
Download
|
 |
M |
lib/ExecutionEngine/ExecutionEngineBindings.cpp
|
View
|
1
2
|
1 chunk |
+5 lines, -9 lines |
0 comments
|
Download
|
 |
M |
lib/ExecutionEngine/Interpreter/Interpreter.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/ExecutionEngine/Interpreter/Interpreter.cpp
|
View
|
|
2 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
 |
M |
lib/ExecutionEngine/JIT/JIT.h
|
View
|
|
4 chunks |
+12 lines, -25 lines |
0 comments
|
Download
|
 |
M |
lib/ExecutionEngine/JIT/JIT.cpp
|
View
|
1
2
|
8 chunks |
+20 lines, -79 lines |
0 comments
|
Download
|
 |
M |
lib/ExecutionEngine/JIT/JITEmitter.cpp
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
lib/ExecutionEngine/JIT/TargetSelect.cpp
|
View
|
|
2 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
lib/Linker/LinkArchives.cpp
|
View
|
1
2
3
|
3 chunks |
+10 lines, -11 lines |
0 comments
|
Download
|
 |
M |
lib/Target/ARM/ARMSubtarget.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
lib/Target/CppBackend/CPPBackend.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/Target/PowerPC/PPCSubtarget.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
lib/Target/X86/X86Subtarget.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
|
View
|
1
2
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/Transforms/IPO/MergeFunctions.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
lib/VMCore/AsmWriter.cpp
|
View
|
1
2
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/VMCore/Core.cpp
|
View
|
1
2
|
4 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
lib/VMCore/GVMaterializer.cpp
|
View
|
1
|
2 chunks |
+5 lines, -13 lines |
0 comments
|
Download
|
 |
M |
lib/VMCore/Globals.cpp
|
View
|
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
M |
lib/VMCore/Module.cpp
|
View
|
1
2
|
3 chunks |
+48 lines, -1 line |
0 comments
|
Download
|
 |
M |
lib/VMCore/Pass.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
lib/VMCore/PassManager.cpp
|
View
|
1
2
|
4 chunks |
+4 lines, -7 lines |
0 comments
|
Download
|
 |
M |
lib/VMCore/Verifier.cpp
|
View
|
1
2
|
4 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/llc/llc.cpp
|
View
|
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
tools/lli/lli.cpp
|
View
|
|
2 chunks |
+12 lines, -13 lines |
0 comments
|
Download
|
 |
M |
tools/lto/LTOCodeGenerator.cpp
|
View
|
1
2
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
tools/lto/LTOModule.cpp
|
View
|
1
2
3
|
2 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
tools/opt/opt.cpp
|
View
|
1
2
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
unittests/ExecutionEngine/JIT/JITTest.cpp
|
View
|
1
2
3
|
7 chunks |
+52 lines, -22 lines |
0 comments
|
Download
|
Total messages: 4
|