changeset in /hg/icedtea: 2009-07-07 Xerxes R?nby <xerxes at zafe...

Xerxes R?nby xerxes at zafena.se
Mon Aug 3 10:31:22 PDT 2009


changeset 225f4d8d7962 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=225f4d8d7962
description:
	2009-07-07  Xerxes R?nby  <xerxes at zafena.se>

	        * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp
	        Include llvm/LLVMContext.h used by getGlobalContext()
	        when llvm version are 2.6 or later.
	        * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
	        (SharkCompiler::SharkCompiler): Pass the LLVMContext returned
	        from getGlobalContext() to the new Module constructor
	        when llvm version are 2.6 or later to handle LLVM API change.

diffstat:

3 files changed, 21 insertions(+)
ChangeLog                                          |   10 ++++++++++
ports/hotspot/src/share/vm/shark/llvmHeaders.hpp   |    3 +++
ports/hotspot/src/share/vm/shark/sharkCompiler.cpp |    8 ++++++++

diffs (49 lines):

diff -r 93d755a6148a -r 225f4d8d7962 ChangeLog
--- a/ChangeLog	Fri Jul 03 11:52:45 2009 +0100
+++ b/ChangeLog	Tue Jul 07 10:58:02 2009 +0200
@@ -1,3 +1,13 @@ 2009-07-03  Gary Benson  <gbenson at redhat
+2009-07-07  Xerxes RÃ¥nby  <xerxes at zafena.se>
+
+	* ports/hotspot/src/share/vm/shark/llvmHeaders.hpp
+	Include llvm/LLVMContext.h used by getGlobalContext()
+	when llvm version are 2.6 or later.
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+	(SharkCompiler::SharkCompiler): Pass the LLVMContext returned 
+	from getGlobalContext() to the new Module constructor
+	when llvm version are 2.6 or later to handle LLVM API change.
+
 2009-07-03  Gary Benson  <gbenson at redhat.com>
 
 	* ports/hotspot/src/share/vm/shark/sharkEntry.hpp
diff -r 93d755a6148a -r 225f4d8d7962 ports/hotspot/src/share/vm/shark/llvmHeaders.hpp
--- a/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp	Fri Jul 03 11:52:45 2009 +0100
+++ b/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp	Tue Jul 07 10:58:02 2009 +0200
@@ -32,6 +32,9 @@
 #include <llvm/DerivedTypes.h>
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 #include <llvm/Instructions.h>
+#if SHARK_LLVM_VERSION >= 26
+#include <llvm/LLVMContext.h>
+#endif
 #include <llvm/Module.h>
 #include <llvm/ModuleProvider.h>
 #include <llvm/Support/IRBuilder.h>
diff -r 93d755a6148a -r 225f4d8d7962 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Fri Jul 03 11:52:45 2009 +0100
+++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Tue Jul 07 10:58:02 2009 +0200
@@ -43,7 +43,15 @@ SharkCompiler::SharkCompiler()
 #endif
 
   // Create a module to build our functions into
+#if SHARK_LLVM_VERSION >= 26
+  // LLVM 2.6 and later requires passing a LLVMContext during module
+  // creation. The LLVM API getGlobalContext() returns a LLVMContext that
+  // can be used safely as long as the shark compiler stays single threaded
+  // and only uses one module.
+  _module = new Module("shark", getGlobalContext());
+#else
   _module = new Module("shark");
+#endif
 
   // Create the builder to build our functions
   _builder = new SharkBuilder(this);



More information about the distro-pkg-dev mailing list