changeset 1789:7ecb9ff6ed05

2009-05-05 Xerxes R?nby <xerxes@zafena.se> * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::SharkCompiler): Use bool or enum to set JIT optimization dependent on the llvm version.
author Xerxes R?nby <xerxes@zafena.se>
date Tue, 05 May 2009 13:30:07 +0200
parents dd44934ab114
children dc69eba97b21
files ChangeLog ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue May 19 16:19:49 2009 +0100
+++ b/ChangeLog	Tue May 05 13:30:07 2009 +0200
@@ -1,3 +1,9 @@
+2009-05-05 Xerxes Rånby <xerxes@zafena.se>
+
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+	(SharkCompiler::SharkCompiler): Use bool or enum to set
+	JIT optimization dependent on the llvm version.
+ 
 2009-05-05 Xerxes Rånby <xerxes@zafena.se>
 
 	* configure.ac (LLVM_CFLAGS): Remove LLVM svn suffix from
--- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Tue May 19 16:19:49 2009 +0100
+++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Tue May 05 13:30:07 2009 +0200
@@ -41,7 +41,19 @@
   ModuleProvider *module_provider = new ExistingModuleProvider(module());
   _memory_manager = new SharkMemoryManager();
   _execution_engine = ExecutionEngine::createJIT(
+#if SHARK_LLVM_VERSION >= 26
+   /*
+    * LLVM 26 introduced a more fine-grained control to set the optimization
+    * level when creating the LLVM JIT.
+    * The optimization level are now specified with a enum instead of a bool.
+    * CodeGenOpt::None = bool true; a fast JIT with reduced optimization.
+    * CodeGenOpt::Default = bool false; a non-fast JIT with optimization.
+    * CodeGenOpt::Aggressive = a new non-fast JIT with best optimization.
+    */
+    module_provider, NULL, memory_manager(), CodeGenOpt::Default);
+#else
     module_provider, NULL, memory_manager(), false);
+#endif
 
   // Initialize Shark components that need it
   SharkType::initialize();