Mercurial > hg > release > icedtea6-1.6
changeset 1639:438cbd2f7252
2009-07-15 Xerxes R?nby <xerxes@zafena.se>
* ports/hotspot/src/share/vm/shark/llvmValue.hpp
(jbyte_constant): Handle LLVM 2.6 svn r75703 API change.
llvm::ConstantInt::get have been moved to
llvm::LLVMContext::getConstantInt.
(jint_constant): Likewise.
(jlong_constant): Likewise.
(intptr_constant): Likewise.
* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
(SharkBuilder::CreateMemoryBarrier): Likewise.
(SharkBuilder::CreateDump): llvm::ConstantArray::get have been
moved to llvm::LLVMContext::getConstantArray.
author | Xerxes R?nby <xerxes@zafena.se> |
---|---|
date | Wed, 15 Jul 2009 12:56:10 +0200 |
parents | 119501af9b1c |
children | 914f2022b402 |
files | ChangeLog ports/hotspot/src/share/vm/shark/llvmValue.hpp ports/hotspot/src/share/vm/shark/sharkBuilder.cpp |
diffstat | 3 files changed, 44 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 14 13:12:50 2009 -0400 +++ b/ChangeLog Wed Jul 15 12:56:10 2009 +0200 @@ -1,3 +1,17 @@ +2009-07-15 Xerxes RĂ„nby <xerxes@zafena.se> + + * ports/hotspot/src/share/vm/shark/llvmValue.hpp + (jbyte_constant): Handle LLVM 2.6 svn r75703 API change. + llvm::ConstantInt::get have been moved to + llvm::LLVMContext::getConstantInt. + (jint_constant): Likewise. + (jlong_constant): Likewise. + (intptr_constant): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::CreateMemoryBarrier): Likewise. + (SharkBuilder::CreateDump): llvm::ConstantArray::get have been + moved to llvm::LLVMContext::getConstantArray. + 2009-07-14 Deepak Bhole <dbhole@redhat.com> * Makefile.am: Fix npplugin build.
--- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Jul 14 13:12:50 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Wed Jul 15 12:56:10 2009 +0200 @@ -27,15 +27,27 @@ public: static llvm::ConstantInt* jbyte_constant(jbyte value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(SharkType::jbyte_type(), value, true); +#else return llvm::ConstantInt::get(SharkType::jbyte_type(), value, true); +#endif } static llvm::ConstantInt* jint_constant(jint value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(SharkType::jint_type(), value, true); +#else return llvm::ConstantInt::get(SharkType::jint_type(), value, true); +#endif } static llvm::ConstantInt* jlong_constant(jlong value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(SharkType::jlong_type(), value, true); +#else return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); +#endif } #if SHARK_LLVM_VERSION >= 26 static llvm::Constant* jfloat_constant(jfloat value) @@ -67,6 +79,10 @@ public: static llvm::ConstantInt* intptr_constant(intptr_t value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(SharkType::intptr_type(), value, false); +#else return llvm::ConstantInt::get(SharkType::intptr_type(), value, false); +#endif } };
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Tue Jul 14 13:12:50 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Wed Jul 15 12:56:10 2009 +0200 @@ -187,9 +187,15 @@ { Constant *const_name; if (value->hasName()) +#if SHARK_LLVM_VERSION >= 26 + const_name = getGlobalContext().getConstantArray(value->getName()); + else + const_name = getGlobalContext().getConstantArray("unnamed_value"); +#else const_name = ConstantArray::get(value->getName()); else const_name = ConstantArray::get("unnamed_value"); +#endif Value *name = CreatePtrToInt( CreateStructGEP( @@ -260,10 +266,18 @@ CallInst *SharkBuilder::CreateMemoryBarrier(BarrierFlags flags) { Value *args[] = { +#if SHARK_LLVM_VERSION >= 26 + getGlobalContext().getConstantInt(Type::Int1Ty, (flags & BARRIER_LOADLOAD) ? 1 : 0), + getGlobalContext().getConstantInt(Type::Int1Ty, (flags & BARRIER_LOADSTORE) ? 1 : 0), + getGlobalContext().getConstantInt(Type::Int1Ty, (flags & BARRIER_STORELOAD) ? 1 : 0), + getGlobalContext().getConstantInt(Type::Int1Ty, (flags & BARRIER_STORESTORE) ? 1 : 0), + getGlobalContext().getConstantInt(Type::Int1Ty, 0)}; +#else ConstantInt::get(Type::Int1Ty, (flags & BARRIER_LOADLOAD) ? 1 : 0), ConstantInt::get(Type::Int1Ty, (flags & BARRIER_LOADSTORE) ? 1 : 0), ConstantInt::get(Type::Int1Ty, (flags & BARRIER_STORELOAD) ? 1 : 0), ConstantInt::get(Type::Int1Ty, (flags & BARRIER_STORESTORE) ? 1 : 0), ConstantInt::get(Type::Int1Ty, 0)}; +#endif return CreateCall(llvm_memory_barrier_fn(), args, args + 5); }