Mercurial > hg > release > icedtea6-1.8
changeset 1871:22be2c99a89b
Update Shark for LLVM r94686 API change.
2010-02-01 Xerxes R?nby <xerxes@zafena.se>
* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
(SharkCompiler::SharkCompiler): Use sharkContext::module
instead of sharkContext::module_provider when using LLVM 2.7
to handle LLVM r94686 API change.
* ports/hotspot/src/share/vm/shark/sharkContext.hpp
(sharkContext::module): Made public when using LLVM 2.7.
(sharkContext::module_provider): Undefine when using LLVM 2.7.
* ports/hotspot/src/share/vm/shark/llvmHeaders.hpp
(llvm/ModuleProvider.h): Undefine when using LLVM 2.7.
author | Xerxes R?nby <xerxes@zafena.se> |
---|---|
date | Mon, 01 Feb 2010 12:28:24 +0100 |
parents | ec2ae0d51146 |
children | ba5d4644582d |
files | ChangeLog ports/hotspot/src/share/vm/shark/llvmHeaders.hpp ports/hotspot/src/share/vm/shark/sharkCompiler.cpp ports/hotspot/src/share/vm/shark/sharkContext.hpp |
diffstat | 4 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Jan 30 01:38:48 2010 +0000 +++ b/ChangeLog Mon Feb 01 12:28:24 2010 +0100 @@ -1,3 +1,15 @@ +2010-02-01 Xerxes RĂ„nby <xerxes@zafena.se> + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::SharkCompiler): Use sharkContext::module + instead of sharkContext::module_provider when using LLVM 2.7 + to handle LLVM r94686 API change. + * ports/hotspot/src/share/vm/shark/sharkContext.hpp + (sharkContext::module): Made public when using LLVM 2.7. + (sharkContext::module_provider): Undefine when using LLVM 2.7. + * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp + (llvm/ModuleProvider.h): Undefine when using LLVM 2.7. + 2010-01-29 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Add INITIAL_BOOTSTRAP_LINK_STAMP
--- a/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Sat Jan 30 01:38:48 2010 +0000 +++ b/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Mon Feb 01 12:28:24 2010 +0100 @@ -34,7 +34,9 @@ #include <llvm/Instructions.h> #include <llvm/LLVMContext.h> #include <llvm/Module.h> +#if SHARK_LLVM_VERSION < 27 #include <llvm/ModuleProvider.h> +#endif #include <llvm/Support/IRBuilder.h> #include <llvm/System/Threading.h> #include <llvm/Target/TargetSelect.h>
--- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Sat Jan 30 01:38:48 2010 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Mon Feb 01 12:28:24 2010 +0100 @@ -52,11 +52,19 @@ _memory_manager = new SharkMemoryManager(); // Create the JIT +#if SHARK_LLVM_VERSION >= 27 + _execution_engine = ExecutionEngine::createJIT( + _normal_context->module(), + NULL, memory_manager(), CodeGenOpt::Default); + execution_engine()->addModule( + _native_context->module()); +#else _execution_engine = ExecutionEngine::createJIT( _normal_context->module_provider(), NULL, memory_manager(), CodeGenOpt::Default); execution_engine()->addModuleProvider( _native_context->module_provider()); +#endif // All done mark_initialized();
--- a/ports/hotspot/src/share/vm/shark/sharkContext.hpp Sat Jan 30 01:38:48 2010 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkContext.hpp Mon Feb 01 12:28:24 2010 +0100 @@ -36,7 +36,11 @@ private: llvm::Module* _module; +#if SHARK_LLVM_VERSION >= 27 + public: +#else private: +#endif llvm::Module* module() const { return _module; @@ -51,10 +55,12 @@ // Module accessors public: +#if SHARK_LLVM_VERSION < 27 llvm::ModuleProvider* module_provider() const { return new llvm::ExistingModuleProvider(module()); } +#endif void add_function(llvm::Function* function) const { module()->getFunctionList().push_back(function);