From nicolas.geoffray at lip6.fr Mon Mar 8 13:24:54 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Mon, 08 Mar 2010 21:24:54 -0000
Subject: [vmkit-commits] [vmkit] r97986 -
/vmkit/trunk/lib/Mvm/Compiler/MMTkInline.inc
Message-ID: <20100308212454.61BFD2A6C12C@llvm.org>
Author: geoffray
Date: Mon Mar 8 15:24:54 2010
New Revision: 97986
URL: http://llvm.org/viewvc/llvm-project?rev=97986&view=rev
Log:
Add a llc generated file to be parsed by vmkit for gcmalloc. To
obtain this file, I had to modify llc a bit, and that's why the file
is not generated by Makefile.
Added:
vmkit/trunk/lib/Mvm/Compiler/MMTkInline.inc
Added: vmkit/trunk/lib/Mvm/Compiler/MMTkInline.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/MMTkInline.inc?rev=97986&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/MMTkInline.inc (added)
+++ vmkit/trunk/lib/Mvm/Compiler/MMTkInline.inc Mon Mar 8 15:24:54 2010
@@ -0,0 +1,1682 @@
+// Generated by llvm2cpp - DO NOT MODIFY!
+
+
+Function* makeLLVMFunction(Module *mod) {
+
+// Type Definitions
+PointerType* PointerTy_0 = PointerType::get(IntegerType::get(mod->getContext(), 8), 0);
+
+std::vectorFuncTy_1_args;
+FuncTy_1_args.push_back(IntegerType::get(mod->getContext(), 32));
+FuncTy_1_args.push_back(PointerTy_0);
+FunctionType* FuncTy_1 = FunctionType::get(
+ /*Result=*/PointerTy_0,
+ /*Params=*/FuncTy_1_args,
+ /*isVarArg=*/false);
+
+std::vectorStructTy_struct_gc_fields;
+std::vectorStructTy_struct_gcRoot_fields;
+std::vectorFuncTy_6_args;
+FunctionType* FuncTy_6 = FunctionType::get(
+ /*Result=*/IntegerType::get(mod->getContext(), 32),
+ /*Params=*/FuncTy_6_args,
+ /*isVarArg=*/true);
+
+PointerType* PointerTy_5 = PointerType::get(FuncTy_6, 0);
+
+PointerType* PointerTy_4 = PointerType::get(PointerTy_5, 0);
+
+StructTy_struct_gcRoot_fields.push_back(PointerTy_4);
+StructType* StructTy_struct_gcRoot = StructType::get(mod->getContext(), StructTy_struct_gcRoot_fields, /*isPacked=*/false);
+mod->addTypeName("struct.gcRoot", StructTy_struct_gcRoot);
+
+StructTy_struct_gc_fields.push_back(StructTy_struct_gcRoot);
+StructType* StructTy_struct_gc = StructType::get(mod->getContext(), StructTy_struct_gc_fields, /*isPacked=*/false);
+mod->addTypeName("struct.gc", StructTy_struct_gc);
+
+PointerType* PointerTy_3 = PointerType::get(StructTy_struct_gc, 0);
+
+PointerType* PointerTy_2 = PointerType::get(PointerTy_3, 0);
+
+PointerType* PointerTy_7 = PointerType::get(PointerTy_0, 0);
+
+std::vectorFuncTy_9_args;
+FuncTy_9_args.push_back(PointerTy_7);
+FuncTy_9_args.push_back(PointerTy_0);
+FunctionType* FuncTy_9 = FunctionType::get(
+ /*Result=*/Type::getVoidTy(mod->getContext()),
+ /*Params=*/FuncTy_9_args,
+ /*isVarArg=*/false);
+
+std::vectorFuncTy_11_args;
+FuncTy_11_args.push_back(IntegerType::get(mod->getContext(), 32));
+FunctionType* FuncTy_11 = FunctionType::get(
+ /*Result=*/PointerTy_0,
+ /*Params=*/FuncTy_11_args,
+ /*isVarArg=*/false);
+
+std::vectorStructTy_struct_mvm__MutatorThread_fields;
+std::vectorStructTy_struct_mvm__Thread_fields;
+std::vectorStructTy_struct_mvm__CircularBase_fields;
+StructTy_struct_mvm__CircularBase_fields.push_back(PointerTy_4);
+PATypeHolder StructTy_struct_mvm__CircularBase_fwd = OpaqueType::get(mod->getContext());
+PointerType* PointerTy_13 = PointerType::get(StructTy_struct_mvm__CircularBase_fwd, 0);
+
+StructTy_struct_mvm__CircularBase_fields.push_back(PointerTy_13);
+StructTy_struct_mvm__CircularBase_fields.push_back(PointerTy_13);
+StructType* StructTy_struct_mvm__CircularBase = StructType::get(mod->getContext(), StructTy_struct_mvm__CircularBase_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::CircularBase", StructTy_struct_mvm__CircularBase);
+cast(StructTy_struct_mvm__CircularBase_fwd.get())->refineAbstractTypeTo(StructTy_struct_mvm__CircularBase);
+StructTy_struct_mvm__CircularBase = cast(StructTy_struct_mvm__CircularBase_fwd.get());
+
+
+StructTy_struct_mvm__Thread_fields.push_back(StructTy_struct_mvm__CircularBase);
+StructTy_struct_mvm__Thread_fields.push_back(IntegerType::get(mod->getContext(), 32));
+std::vectorStructTy_struct_mvm__VirtualMachine_fields;
+StructTy_struct_mvm__VirtualMachine_fields.push_back(PointerTy_4);
+std::vectorStructTy_struct_mvm__BumpPtrAllocator_fields;
+std::vectorStructTy_struct_mvm__SpinLock_fields;
+StructTy_struct_mvm__SpinLock_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructType* StructTy_struct_mvm__SpinLock = StructType::get(mod->getContext(), StructTy_struct_mvm__SpinLock_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::SpinLock", StructTy_struct_mvm__SpinLock);
+
+StructTy_struct_mvm__BumpPtrAllocator_fields.push_back(StructTy_struct_mvm__SpinLock);
+std::vectorStructTy_struct_llvm__BumpPtrAllocator_fields;
+StructTy_struct_llvm__BumpPtrAllocator_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_llvm__BumpPtrAllocator_fields.push_back(IntegerType::get(mod->getContext(), 32));
+PointerType* PointerTy_16 = PointerType::get(StructTy_struct_gcRoot, 0);
+
+StructTy_struct_llvm__BumpPtrAllocator_fields.push_back(PointerTy_16);
+std::vectorStructTy_struct_llvm__MemSlab_fields;
+StructTy_struct_llvm__MemSlab_fields.push_back(IntegerType::get(mod->getContext(), 32));
+PATypeHolder PointerTy_17_fwd = OpaqueType::get(mod->getContext());
+StructTy_struct_llvm__MemSlab_fields.push_back(PointerTy_17_fwd);
+StructType* StructTy_struct_llvm__MemSlab = StructType::get(mod->getContext(), StructTy_struct_llvm__MemSlab_fields, /*isPacked=*/false);
+mod->addTypeName("struct.llvm::MemSlab", StructTy_struct_llvm__MemSlab);
+
+PointerType* PointerTy_17 = PointerType::get(StructTy_struct_llvm__MemSlab, 0);
+cast(PointerTy_17_fwd.get())->refineAbstractTypeTo(PointerTy_17);
+PointerTy_17 = cast(PointerTy_17_fwd.get());
+
+
+StructTy_struct_llvm__BumpPtrAllocator_fields.push_back(PointerTy_17);
+StructTy_struct_llvm__BumpPtrAllocator_fields.push_back(PointerTy_0);
+StructTy_struct_llvm__BumpPtrAllocator_fields.push_back(PointerTy_0);
+StructTy_struct_llvm__BumpPtrAllocator_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructType* StructTy_struct_llvm__BumpPtrAllocator = StructType::get(mod->getContext(), StructTy_struct_llvm__BumpPtrAllocator_fields, /*isPacked=*/false);
+mod->addTypeName("struct.llvm::BumpPtrAllocator", StructTy_struct_llvm__BumpPtrAllocator);
+
+StructTy_struct_mvm__BumpPtrAllocator_fields.push_back(StructTy_struct_llvm__BumpPtrAllocator);
+StructType* StructTy_struct_mvm__BumpPtrAllocator = StructType::get(mod->getContext(), StructTy_struct_mvm__BumpPtrAllocator_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::BumpPtrAllocator", StructTy_struct_mvm__BumpPtrAllocator);
+
+PointerType* PointerTy_15 = PointerType::get(StructTy_struct_mvm__BumpPtrAllocator, 0);
+
+StructTy_struct_mvm__VirtualMachine_fields.push_back(PointerTy_15);
+PATypeHolder StructTy_struct_mvm__Thread_fwd = OpaqueType::get(mod->getContext());
+PointerType* PointerTy_18 = PointerType::get(StructTy_struct_mvm__Thread_fwd, 0);
+
+StructTy_struct_mvm__VirtualMachine_fields.push_back(PointerTy_18);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__SpinLock);
+std::vectorStructTy_struct_mvm__ReferenceQueue_fields;
+StructTy_struct_mvm__ReferenceQueue_fields.push_back(PointerTy_2);
+StructTy_struct_mvm__ReferenceQueue_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__ReferenceQueue_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__ReferenceQueue_fields.push_back(StructTy_struct_mvm__SpinLock);
+StructTy_struct_mvm__ReferenceQueue_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructType* StructTy_struct_mvm__ReferenceQueue = StructType::get(mod->getContext(), StructTy_struct_mvm__ReferenceQueue_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::ReferenceQueue", StructTy_struct_mvm__ReferenceQueue);
+
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__ReferenceQueue);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__ReferenceQueue);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__ReferenceQueue);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__SpinLock);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(PointerTy_2);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__VirtualMachine_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__VirtualMachine_fields.push_back(PointerTy_2);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__VirtualMachine_fields.push_back(IntegerType::get(mod->getContext(), 32));
+std::vectorStructTy_struct_mvm__Cond_fields;
+std::vectorStructTy_union_pthread_cond_t_fields;
+std::vectorStructTy_struct__2__13_fields;
+StructTy_struct__2__13_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct__2__13_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct__2__13_fields.push_back(IntegerType::get(mod->getContext(), 64));
+StructTy_struct__2__13_fields.push_back(IntegerType::get(mod->getContext(), 64));
+StructTy_struct__2__13_fields.push_back(IntegerType::get(mod->getContext(), 64));
+StructTy_struct__2__13_fields.push_back(PointerTy_0);
+StructTy_struct__2__13_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct__2__13_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructType* StructTy_struct__2__13 = StructType::get(mod->getContext(), StructTy_struct__2__13_fields, /*isPacked=*/false);
+mod->addTypeName("struct..2._13", StructTy_struct__2__13);
+
+StructTy_union_pthread_cond_t_fields.push_back(StructTy_struct__2__13);
+ArrayType* ArrayTy_19 = ArrayType::get(IntegerType::get(mod->getContext(), 32), 1);
+
+StructTy_union_pthread_cond_t_fields.push_back(ArrayTy_19);
+StructType* StructTy_union_pthread_cond_t = StructType::get(mod->getContext(), StructTy_union_pthread_cond_t_fields, /*isPacked=*/false);
+mod->addTypeName("union.pthread_cond_t", StructTy_union_pthread_cond_t);
+
+StructTy_struct_mvm__Cond_fields.push_back(StructTy_union_pthread_cond_t);
+StructType* StructTy_struct_mvm__Cond = StructType::get(mod->getContext(), StructTy_struct_mvm__Cond_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::Cond", StructTy_struct_mvm__Cond);
+
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__Cond);
+std::vectorStructTy_struct_mvm__LockNormal_fields;
+std::vectorStructTy_struct_mvm__Lock_fields;
+StructTy_struct_mvm__Lock_fields.push_back(PointerTy_4);
+StructTy_struct_mvm__Lock_fields.push_back(PointerTy_18);
+std::vectorStructTy_union_pthread_mutex_t_fields;
+std::vectorStructTy_struct__1__pthread_mutex_s_fields;
+StructTy_struct__1__pthread_mutex_s_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct__1__pthread_mutex_s_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct__1__pthread_mutex_s_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct__1__pthread_mutex_s_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct__1__pthread_mutex_s_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct__1__pthread_mutex_s_fields.push_back(StructTy_struct_mvm__SpinLock);
+StructType* StructTy_struct__1__pthread_mutex_s = StructType::get(mod->getContext(), StructTy_struct__1__pthread_mutex_s_fields, /*isPacked=*/false);
+mod->addTypeName("struct..1__pthread_mutex_s", StructTy_struct__1__pthread_mutex_s);
+
+StructTy_union_pthread_mutex_t_fields.push_back(StructTy_struct__1__pthread_mutex_s);
+StructType* StructTy_union_pthread_mutex_t = StructType::get(mod->getContext(), StructTy_union_pthread_mutex_t_fields, /*isPacked=*/false);
+mod->addTypeName("union.pthread_mutex_t", StructTy_union_pthread_mutex_t);
+
+StructTy_struct_mvm__Lock_fields.push_back(StructTy_union_pthread_mutex_t);
+StructType* StructTy_struct_mvm__Lock = StructType::get(mod->getContext(), StructTy_struct_mvm__Lock_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::Lock", StructTy_struct_mvm__Lock);
+
+StructTy_struct_mvm__LockNormal_fields.push_back(StructTy_struct_mvm__Lock);
+StructType* StructTy_struct_mvm__LockNormal = StructType::get(mod->getContext(), StructTy_struct_mvm__LockNormal_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::LockNormal", StructTy_struct_mvm__LockNormal);
+
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__LockNormal);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(PointerTy_2);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__VirtualMachine_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__LockNormal);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__Cond);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__SpinLock);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(PointerTy_16);
+std::vectorStructTy_struct_mvm__CollectionRV_fields;
+StructTy_struct_mvm__CollectionRV_fields.push_back(StructTy_struct_mvm__LockNormal);
+StructTy_struct_mvm__CollectionRV_fields.push_back(StructTy_struct_mvm__Cond);
+StructTy_struct_mvm__CollectionRV_fields.push_back(StructTy_struct_mvm__Cond);
+StructTy_struct_mvm__CollectionRV_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__CollectionRV_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_struct_mvm__CollectionRV_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructType* StructTy_struct_mvm__CollectionRV = StructType::get(mod->getContext(), StructTy_struct_mvm__CollectionRV_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::CollectionRV", StructTy_struct_mvm__CollectionRV);
+
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__CollectionRV);
+std::vectorStructTy_struct_mvm__StartEndFunctionMap_fields;
+std::vectorStructTy_struct_mvm__FunctionMap_fields;
+std::vectorStructTy_struct_std__map_const_char_j3__ClassPrimitive__std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_______fields;
+std::vectorStructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_______fields;
+std::vectorStructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_________Rb_tree_impl_std__less_const_char__false__fields;
+std::vectorStructTy_struct_std__less_const_char__fields;
+StructTy_struct_std__less_const_char__fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructType* StructTy_struct_std__less_const_char_ = StructType::get(mod->getContext(), StructTy_struct_std__less_const_char__fields, /*isPacked=*/true);
+mod->addTypeName("struct.std::less", StructTy_struct_std__less_const_char_);
+
+StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_________Rb_tree_impl_std__less_const_char__false__fields.push_back(StructTy_struct_std__less_const_char_);
+std::vectorStructTy_struct_std___Rb_tree_node_base_fields;
+StructTy_struct_std___Rb_tree_node_base_fields.push_back(IntegerType::get(mod->getContext(), 32));
+PATypeHolder StructTy_struct_std___Rb_tree_node_base_fwd = OpaqueType::get(mod->getContext());
+PointerType* PointerTy_20 = PointerType::get(StructTy_struct_std___Rb_tree_node_base_fwd, 0);
+
+StructTy_struct_std___Rb_tree_node_base_fields.push_back(PointerTy_20);
+StructTy_struct_std___Rb_tree_node_base_fields.push_back(PointerTy_20);
+StructTy_struct_std___Rb_tree_node_base_fields.push_back(PointerTy_20);
+StructType* StructTy_struct_std___Rb_tree_node_base = StructType::get(mod->getContext(), StructTy_struct_std___Rb_tree_node_base_fields, /*isPacked=*/false);
+mod->addTypeName("struct.std::_Rb_tree_node_base", StructTy_struct_std___Rb_tree_node_base);
+cast(StructTy_struct_std___Rb_tree_node_base_fwd.get())->refineAbstractTypeTo(StructTy_struct_std___Rb_tree_node_base);
+StructTy_struct_std___Rb_tree_node_base = cast(StructTy_struct_std___Rb_tree_node_base_fwd.get());
+
+
+StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_________Rb_tree_impl_std__less_const_char__false__fields.push_back(StructTy_struct_std___Rb_tree_node_base);
+StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_________Rb_tree_impl_std__less_const_char__false__fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructType* StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_________Rb_tree_impl_std__less_const_char__false_ = StructType::get(mod->getContext(), StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_________Rb_tree_impl_std__less_const_char__false__fields, /*isPacked=*/false);
+mod->addTypeName("struct.std::_Rb_tree,std::_Select1st >,std::less,std::allocator > >::_Rb_tree_impl,false>", StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_________Rb_tree_impl_std__less_const_char__false_);
+
+StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_______fields.push_back(StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_________Rb_tree_impl_std__less_const_char__false_);
+StructType* StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive______ = StructType::get(mod->getContext(), StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_______fields, /*isPacked=*/false);
+mod->addTypeName("struct.std::_Rb_tree,std::_Select1st >,std::less,std::allocator > >", StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive______);
+
+StructTy_struct_std__map_const_char_j3__ClassPrimitive__std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_______fields.push_back(StructTy_struct_std___Rb_tree_const_char_std__pair_const_char__j3__ClassPrimitive___std___Select1st_std__pair_const_char__j3__ClassPrimitive_____std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive______);
+StructType* StructTy_struct_std__map_const_char_j3__ClassPrimitive__std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive______ = StructType::get(mod->getContext(), StructTy_struct_std__map_const_char_j3__ClassPrimitive__std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive_______fields, /*isPacked=*/false);
+mod->addTypeName("struct.std::map,std::allocator > >", StructTy_struct_std__map_const_char_j3__ClassPrimitive__std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive______);
+
+StructTy_struct_mvm__FunctionMap_fields.push_back(StructTy_struct_std__map_const_char_j3__ClassPrimitive__std__less_const_char__std__allocator_std__pair_const_char__j3__ClassPrimitive______);
+StructTy_struct_mvm__FunctionMap_fields.push_back(StructTy_struct_mvm__SpinLock);
+StructType* StructTy_struct_mvm__FunctionMap = StructType::get(mod->getContext(), StructTy_struct_mvm__FunctionMap_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::FunctionMap", StructTy_struct_mvm__FunctionMap);
+
+StructTy_struct_mvm__StartEndFunctionMap_fields.push_back(StructTy_struct_mvm__FunctionMap);
+StructType* StructTy_struct_mvm__StartEndFunctionMap = StructType::get(mod->getContext(), StructTy_struct_mvm__StartEndFunctionMap_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::StartEndFunctionMap", StructTy_struct_mvm__StartEndFunctionMap);
+
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__StartEndFunctionMap);
+StructTy_struct_mvm__VirtualMachine_fields.push_back(StructTy_struct_mvm__StartEndFunctionMap);
+StructType* StructTy_struct_mvm__VirtualMachine = StructType::get(mod->getContext(), StructTy_struct_mvm__VirtualMachine_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::VirtualMachine", StructTy_struct_mvm__VirtualMachine);
+
+PointerType* PointerTy_14 = PointerType::get(StructTy_struct_mvm__VirtualMachine, 0);
+
+StructTy_struct_mvm__Thread_fields.push_back(PointerTy_14);
+StructTy_struct_mvm__Thread_fields.push_back(PointerTy_0);
+StructTy_struct_mvm__Thread_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_struct_mvm__Thread_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_struct_mvm__Thread_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_struct_mvm__Thread_fields.push_back(PointerTy_0);
+StructTy_struct_mvm__Thread_fields.push_back(PointerTy_0);
+std::vectorFuncTy_22_args;
+FuncTy_22_args.push_back(PointerTy_18);
+FunctionType* FuncTy_22 = FunctionType::get(
+ /*Result=*/Type::getVoidTy(mod->getContext()),
+ /*Params=*/FuncTy_22_args,
+ /*isVarArg=*/false);
+
+PointerType* PointerTy_21 = PointerType::get(FuncTy_22, 0);
+
+StructTy_struct_mvm__Thread_fields.push_back(PointerTy_21);
+std::vectorStructTy_struct_mvm__KnownFrame_fields;
+PATypeHolder PointerTy_23_fwd = OpaqueType::get(mod->getContext());
+StructTy_struct_mvm__KnownFrame_fields.push_back(PointerTy_23_fwd);
+StructTy_struct_mvm__KnownFrame_fields.push_back(PointerTy_0);
+StructType* StructTy_struct_mvm__KnownFrame = StructType::get(mod->getContext(), StructTy_struct_mvm__KnownFrame_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::KnownFrame", StructTy_struct_mvm__KnownFrame);
+
+PointerType* PointerTy_23 = PointerType::get(StructTy_struct_mvm__KnownFrame, 0);
+cast(PointerTy_23_fwd.get())->refineAbstractTypeTo(PointerTy_23);
+PointerTy_23 = cast(PointerTy_23_fwd.get());
+
+
+StructTy_struct_mvm__Thread_fields.push_back(PointerTy_23);
+StructType* StructTy_struct_mvm__Thread = StructType::get(mod->getContext(), StructTy_struct_mvm__Thread_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::Thread", StructTy_struct_mvm__Thread);
+cast(StructTy_struct_mvm__Thread_fwd.get())->refineAbstractTypeTo(StructTy_struct_mvm__Thread);
+StructTy_struct_mvm__Thread = cast(StructTy_struct_mvm__Thread_fwd.get());
+
+
+StructTy_struct_mvm__MutatorThread_fields.push_back(StructTy_struct_mvm__Thread);
+StructTy_struct_mvm__MutatorThread_fields.push_back(StructTy_struct_mvm__BumpPtrAllocator);
+StructTy_struct_mvm__MutatorThread_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_struct_mvm__MutatorThread_fields.push_back(PointerTy_21);
+StructType* StructTy_struct_mvm__MutatorThread = StructType::get(mod->getContext(), StructTy_struct_mvm__MutatorThread_fields, /*isPacked=*/false);
+mod->addTypeName("struct.mvm::MutatorThread", StructTy_struct_mvm__MutatorThread);
+
+PointerType* PointerTy_12 = PointerType::get(StructTy_struct_mvm__MutatorThread, 0);
+
+PointerType* PointerTy_24 = PointerType::get(IntegerType::get(mod->getContext(), 32), 0);
+
+std::vectorStructTy_JavaObject_fields;
+ArrayType* ArrayTy_VT = ArrayType::get(PointerTy_5, 0);
+mod->addTypeName("VT", ArrayTy_VT);
+
+PointerType* PointerTy_26 = PointerType::get(ArrayTy_VT, 0);
+
+StructTy_JavaObject_fields.push_back(PointerTy_26);
+StructTy_JavaObject_fields.push_back(PointerTy_0);
+StructType* StructTy_JavaObject = StructType::get(mod->getContext(), StructTy_JavaObject_fields, /*isPacked=*/false);
+mod->addTypeName("JavaObject", StructTy_JavaObject);
+
+PointerType* PointerTy_25 = PointerType::get(StructTy_JavaObject, 0);
+
+std::vectorFuncTy_28_args;
+FunctionType* FuncTy_28 = FunctionType::get(
+ /*Result=*/Type::getVoidTy(mod->getContext()),
+ /*Params=*/FuncTy_28_args,
+ /*isVarArg=*/false);
+
+PointerType* PointerTy_29 = PointerType::get(PointerTy_25, 0);
+
+std::vectorFuncTy_31_args;
+FuncTy_31_args.push_back(PointerTy_25);
+FuncTy_31_args.push_back(IntegerType::get(mod->getContext(), 32));
+FuncTy_31_args.push_back(IntegerType::get(mod->getContext(), 32));
+FuncTy_31_args.push_back(IntegerType::get(mod->getContext(), 32));
+FunctionType* FuncTy_31 = FunctionType::get(
+ /*Result=*/PointerTy_25,
+ /*Params=*/FuncTy_31_args,
+ /*isVarArg=*/false);
+
+PointerType* PointerTy_32 = PointerType::get(PointerTy_26, 0);
+
+std::vectorFuncTy_34_args;
+FuncTy_34_args.push_back(PointerTy_25);
+FuncTy_34_args.push_back(PointerTy_25);
+FuncTy_34_args.push_back(PointerTy_25);
+FuncTy_34_args.push_back(IntegerType::get(mod->getContext(), 32));
+FuncTy_34_args.push_back(IntegerType::get(mod->getContext(), 32));
+FunctionType* FuncTy_34 = FunctionType::get(
+ /*Result=*/PointerTy_25,
+ /*Params=*/FuncTy_34_args,
+ /*isVarArg=*/false);
+
+std::vectorStructTy_36_fields;
+std::vectorStructTy_37_fields;
+std::vectorStructTy_38_fields;
+StructTy_38_fields.push_back(StructTy_JavaObject);
+StructTy_38_fields.push_back(PointerTy_25);
+StructTy_38_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_38_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_38_fields.push_back(IntegerType::get(mod->getContext(), 32));
+StructTy_38_fields.push_back(PointerTy_25);
+StructTy_38_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_38_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_38_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_38_fields.push_back(PointerTy_25);
+StructTy_38_fields.push_back(PointerTy_25);
+StructTy_38_fields.push_back(PointerTy_25);
+StructTy_38_fields.push_back(PointerTy_25);
+StructTy_38_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructType* StructTy_38 = StructType::get(mod->getContext(), StructTy_38_fields, /*isPacked=*/false);
+
+StructTy_37_fields.push_back(StructTy_38);
+StructTy_37_fields.push_back(PointerTy_25);
+StructTy_37_fields.push_back(PointerTy_25);
+StructTy_37_fields.push_back(PointerTy_25);
+StructTy_37_fields.push_back(PointerTy_25);
+StructTy_37_fields.push_back(PointerTy_25);
+StructTy_37_fields.push_back(PointerTy_25);
+StructTy_37_fields.push_back(PointerTy_25);
+StructType* StructTy_37 = StructType::get(mod->getContext(), StructTy_37_fields, /*isPacked=*/false);
+
+StructTy_36_fields.push_back(StructTy_37);
+StructTy_36_fields.push_back(PointerTy_25);
+StructTy_36_fields.push_back(PointerTy_25);
+StructTy_36_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_36_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructType* StructTy_36 = StructType::get(mod->getContext(), StructTy_36_fields, /*isPacked=*/false);
+
+std::vectorStructTy_40_fields;
+StructTy_40_fields.push_back(StructTy_38);
+StructTy_40_fields.push_back(PointerTy_25);
+StructType* StructTy_40 = StructType::get(mod->getContext(), StructTy_40_fields, /*isPacked=*/false);
+
+std::vectorStructTy_42_fields;
+std::vectorStructTy_43_fields;
+StructTy_43_fields.push_back(StructTy_38);
+StructType* StructTy_43 = StructType::get(mod->getContext(), StructTy_43_fields, /*isPacked=*/false);
+
+StructTy_42_fields.push_back(StructTy_43);
+StructTy_42_fields.push_back(PointerTy_25);
+StructTy_42_fields.push_back(IntegerType::get(mod->getContext(), 8));
+StructTy_42_fields.push_back(PointerTy_25);
+StructType* StructTy_42 = StructType::get(mod->getContext(), StructTy_42_fields, /*isPacked=*/false);
+
+std::vectorStructTy_45_fields;
+StructTy_45_fields.push_back(PointerTy_25);
+StructTy_45_fields.push_back(PointerTy_25);
+StructTy_45_fields.push_back(PointerTy_25);
+StructTy_45_fields.push_back(PointerTy_25);
+StructType* StructTy_45 = StructType::get(mod->getContext(), StructTy_45_fields, /*isPacked=*/false);
+
+std::vectorFuncTy_47_args;
+FuncTy_47_args.push_back(IntegerType::get(mod->getContext(), 1));
+FuncTy_47_args.push_back(IntegerType::get(mod->getContext(), 1));
+FuncTy_47_args.push_back(IntegerType::get(mod->getContext(), 1));
+FuncTy_47_args.push_back(IntegerType::get(mod->getContext(), 1));
+FuncTy_47_args.push_back(IntegerType::get(mod->getContext(), 1));
+FunctionType* FuncTy_47 = FunctionType::get(
+ /*Result=*/Type::getVoidTy(mod->getContext()),
+ /*Params=*/FuncTy_47_args,
+ /*isVarArg=*/false);
+
+std::vectorFuncTy_49_args;
+FuncTy_49_args.push_back(PointerTy_24);
+FuncTy_49_args.push_back(IntegerType::get(mod->getContext(), 32));
+FuncTy_49_args.push_back(IntegerType::get(mod->getContext(), 32));
+FunctionType* FuncTy_49 = FunctionType::get(
+ /*Result=*/IntegerType::get(mod->getContext(), 32),
+ /*Params=*/FuncTy_49_args,
+ /*isVarArg=*/false);
+
+
+// Function Declarations
+
+Function* func_llvm_gcroot = Function::Create(
+ /*Type=*/FuncTy_9,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"llvm.gcroot", mod); // (external, no body)
+func_llvm_gcroot->setCallingConv(CallingConv::C);
+AttrListPtr func_llvm_gcroot_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoUnwind;
+ Attrs.push_back(PAWI);
+ func_llvm_gcroot_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+func_llvm_gcroot->setAttributes(func_llvm_gcroot_PAL);
+
+Function* func_llvm_frameaddress = Function::Create(
+ /*Type=*/FuncTy_11,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"llvm.frameaddress", mod); // (external, no body)
+func_llvm_frameaddress->setCallingConv(CallingConv::C);
+AttrListPtr func_llvm_frameaddress_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoUnwind | Attribute::ReadNone;
+ Attrs.push_back(PAWI);
+ func_llvm_frameaddress_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+func_llvm_frameaddress->setAttributes(func_llvm_frameaddress_PAL);
+
+Function* func_abort = Function::Create(
+ /*Type=*/FuncTy_28,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"abort", mod); // (external, no body)
+func_abort->setCallingConv(CallingConv::C);
+AttrListPtr func_abort_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoReturn | Attribute::NoUnwind;
+ Attrs.push_back(PAWI);
+ func_abort_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+func_abort->setAttributes(func_abort_PAL);
+
+Function* func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III = Function::Create(
+ /*Type=*/FuncTy_31,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III", mod);
+func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III->setCallingConv(CallingConv::C);
+AttrListPtr func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoInline;
+ Attrs.push_back(PAWI);
+ func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III->setAttributes(func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III_PAL);
+
+Function* func_JnJVM_org_mmtk_utility_alloc_BumpPointer_allocSlow__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2II = Function::Create(
+ /*Type=*/FuncTy_34,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"JnJVM_org_mmtk_utility_alloc_BumpPointer_allocSlow__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2II", mod);
+func_JnJVM_org_mmtk_utility_alloc_BumpPointer_allocSlow__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2II->setCallingConv(CallingConv::C);
+AttrListPtr func_JnJVM_org_mmtk_utility_alloc_BumpPointer_allocSlow__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2II_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoInline;
+ Attrs.push_back(PAWI);
+ func_JnJVM_org_mmtk_utility_alloc_BumpPointer_allocSlow__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2II_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+func_JnJVM_org_mmtk_utility_alloc_BumpPointer_allocSlow__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2II->setAttributes(func_JnJVM_org_mmtk_utility_alloc_BumpPointer_allocSlow__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2II_PAL);
+
+Function* func_JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III = Function::Create(
+ /*Type=*/FuncTy_31,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III", mod);
+func_JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III->setCallingConv(CallingConv::C);
+AttrListPtr func_JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoInline;
+ Attrs.push_back(PAWI);
+ func_JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+func_JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III->setAttributes(func_JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III_PAL);
+
+Function* func_llvm_memory_barrier = Function::Create(
+ /*Type=*/FuncTy_47,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"llvm.memory.barrier", mod); // (external, no body)
+func_llvm_memory_barrier->setCallingConv(CallingConv::C);
+AttrListPtr func_llvm_memory_barrier_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoUnwind;
+ Attrs.push_back(PAWI);
+ func_llvm_memory_barrier_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+func_llvm_memory_barrier->setAttributes(func_llvm_memory_barrier_PAL);
+
+Function* func_llvm_atomic_cmp_swap_i32_p0i32 = Function::Create(
+ /*Type=*/FuncTy_49,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"llvm.atomic.cmp.swap.i32.p0i32", mod); // (external, no body)
+func_llvm_atomic_cmp_swap_i32_p0i32->setCallingConv(CallingConv::C);
+AttrListPtr func_llvm_atomic_cmp_swap_i32_p0i32_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 1U; PAWI.Attrs = 0 | Attribute::NoCapture;
+ Attrs.push_back(PAWI);
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoUnwind;
+ Attrs.push_back(PAWI);
+ func_llvm_atomic_cmp_swap_i32_p0i32_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+func_llvm_atomic_cmp_swap_i32_p0i32->setAttributes(func_llvm_atomic_cmp_swap_i32_p0i32_PAL);
+
+Function* func__ZN3mvm6Thread5yieldEv = Function::Create(
+ /*Type=*/FuncTy_28,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"_ZN3mvm6Thread5yieldEv", mod); // (external, no body)
+func__ZN3mvm6Thread5yieldEv->setCallingConv(CallingConv::C);
+AttrListPtr func__ZN3mvm6Thread5yieldEv_PAL;
+func__ZN3mvm6Thread5yieldEv->setAttributes(func__ZN3mvm6Thread5yieldEv_PAL);
+
+// Global Variable Declarations
+
+GlobalVariable* gvar_struct_final_object67 = new GlobalVariable(/*Module=*/ *mod,
+/*Type=*/StructTy_36,
+/*isConstant=*/false,
+/*Linkage=*/GlobalValue::InternalLinkage,
+/*Initializer=*/0, // has initializer, specified below
+/*Name=*/"final object67");
+
+GlobalVariable* gvar_struct_final_object2 = new GlobalVariable(/*Module=*/ *mod,
+/*Type=*/StructTy_40,
+/*isConstant=*/false,
+/*Linkage=*/GlobalValue::InternalLinkage,
+/*Initializer=*/0, // has initializer, specified below
+/*Name=*/"final object2");
+
+GlobalVariable* gvar_struct_final_object32 = new GlobalVariable(/*Module=*/ *mod,
+/*Type=*/StructTy_42,
+/*isConstant=*/false,
+/*Linkage=*/GlobalValue::InternalLinkage,
+/*Initializer=*/0, // has initializer, specified below
+/*Name=*/"final object32");
+
+GlobalVariable* gvar_struct_org_mmtk_utility_DoublyLinkedList_static = new GlobalVariable(/*Module=*/ *mod,
+/*Type=*/StructTy_45,
+/*isConstant=*/false,
+/*Linkage=*/GlobalValue::ExternalLinkage,
+/*Initializer=*/0, // has initializer, specified below
+/*Name=*/"org_mmtk_utility_DoublyLinkedList_static");
+
+GlobalVariable* gvar_struct_final_object85 = new GlobalVariable(/*Module=*/ *mod,
+/*Type=*/StructTy_36,
+/*isConstant=*/false,
+/*Linkage=*/GlobalValue::InternalLinkage,
+/*Initializer=*/0, // has initializer, specified below
+/*Name=*/"final object85");
+
+GlobalVariable* gvar_struct_final_object101 = new GlobalVariable(/*Module=*/ *mod,
+/*Type=*/StructTy_42,
+/*isConstant=*/false,
+/*Linkage=*/GlobalValue::InternalLinkage,
+/*Initializer=*/0, // has initializer, specified below
+/*Name=*/"final object101");
+
+GlobalVariable* gvar_struct_final_object122 = new GlobalVariable(/*Module=*/ *mod,
+/*Type=*/StructTy_36,
+/*isConstant=*/false,
+/*Linkage=*/GlobalValue::InternalLinkage,
+/*Initializer=*/0, // has initializer, specified below
+/*Name=*/"final object122");
+
+// Constant Definitions
+ConstantInt* const_int32_50 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("1"), 10));
+ConstantPointerNull* const_ptr_51 = ConstantPointerNull::get(PointerTy_3);
+ConstantPointerNull* const_ptr_52 = ConstantPointerNull::get(PointerTy_0);
+ConstantInt* const_int32_53 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("3"), 10));
+ConstantInt* const_int32_54 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("-4"), 10));
+ConstantInt* const_int32_55 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("0"), 10));
+ConstantInt* const_int32_56 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("2146435072"), 10));
+ConstantInt* const_int32_57 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("2"), 10));
+ConstantInt* const_int32_58 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("8193"), 10));
+ConstantInt* const_int32_59 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("4"), 10));
+ConstantInt* const_int32_60 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("7"), 10));
+ConstantInt* const_int32_61 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("8"), 10));
+ConstantInt* const_int32_62 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("-1"), 10));
+ConstantInt* const_int32_63 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("63"), 10));
+ConstantInt* const_int32_64 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("127"), 10));
+ConstantInt* const_int32_65 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("255"), 10));
+ConstantInt* const_int32_66 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("511"), 10));
+ConstantInt* const_int32_67 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("2047"), 10));
+ConstantInt* const_int32_68 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("10"), 10));
+ConstantInt* const_int32_69 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("32"), 10));
+ConstantInt* const_int32_70 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("12"), 10));
+ConstantInt* const_int32_71 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("5"), 10));
+ConstantInt* const_int32_72 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("16"), 10));
+ConstantInt* const_int32_73 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("6"), 10));
+ConstantInt* const_int32_74 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("20"), 10));
+ConstantInt* const_int32_75 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("26"), 10));
+ConstantPointerNull* const_ptr_76 = ConstantPointerNull::get(PointerTy_25);
+std::vector const_ptr_77_indices;
+const_ptr_77_indices.push_back(const_int32_55);
+const_ptr_77_indices.push_back(const_int32_57);
+Constant* const_ptr_77 = ConstantExpr::getGetElementPtr(gvar_struct_final_object67, &const_ptr_77_indices[0], const_ptr_77_indices.size());
+ConstantInt* const_int8_78 = ConstantInt::get(mod->getContext(), APInt(8, StringRef("-4"), 10));
+std::vector const_ptr_79_indices;
+const_ptr_79_indices.push_back(const_int32_55);
+const_ptr_79_indices.push_back(const_int32_50);
+Constant* const_ptr_79 = ConstantExpr::getGetElementPtr(gvar_struct_final_object2, &const_ptr_79_indices[0], const_ptr_79_indices.size());
+std::vector const_ptr_80_indices;
+const_ptr_80_indices.push_back(const_int32_55);
+const_ptr_80_indices.push_back(const_int32_50);
+Constant* const_ptr_80 = ConstantExpr::getGetElementPtr(gvar_struct_final_object32, &const_ptr_80_indices[0], const_ptr_80_indices.size());
+std::vector const_ptr_81_indices;
+const_ptr_81_indices.push_back(const_int32_55);
+const_ptr_81_indices.push_back(const_int32_53);
+Constant* const_ptr_81 = ConstantExpr::getGetElementPtr(gvar_struct_final_object32, &const_ptr_81_indices[0], const_ptr_81_indices.size());
+ConstantInt* const_int32_82 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("-32"), 10));
+ConstantPointerNull* const_ptr_83 = ConstantPointerNull::get(PointerTy_26);
+std::vector const_ptr_84_indices;
+const_ptr_84_indices.push_back(const_int32_55);
+const_ptr_84_indices.push_back(const_int32_57);
+Constant* const_ptr_84 = ConstantExpr::getGetElementPtr(gvar_struct_org_mmtk_utility_DoublyLinkedList_static, &const_ptr_84_indices[0], const_ptr_84_indices.size());
+ConstantInt* const_int32_85 = ConstantInt::get(mod->getContext(), APInt(32, StringRef("1000"), 10));
+ConstantInt* const_int1_86 = ConstantInt::get(mod->getContext(), APInt(1, StringRef("-1"), 10));
+std::vector const_ptr_87_indices;
+const_ptr_87_indices.push_back(const_int32_55);
+const_ptr_87_indices.push_back(const_int32_57);
+Constant* const_ptr_87 = ConstantExpr::getGetElementPtr(gvar_struct_final_object85, &const_ptr_87_indices[0], const_ptr_87_indices.size());
+std::vector const_ptr_88_indices;
+const_ptr_88_indices.push_back(const_int32_55);
+const_ptr_88_indices.push_back(const_int32_50);
+Constant* const_ptr_88 = ConstantExpr::getGetElementPtr(gvar_struct_final_object101, &const_ptr_88_indices[0], const_ptr_88_indices.size());
+std::vector const_ptr_89_indices;
+const_ptr_89_indices.push_back(const_int32_55);
+const_ptr_89_indices.push_back(const_int32_53);
+Constant* const_ptr_89 = ConstantExpr::getGetElementPtr(gvar_struct_final_object101, &const_ptr_89_indices[0], const_ptr_89_indices.size());
+std::vector const_ptr_90_indices;
+const_ptr_90_indices.push_back(const_int32_55);
+const_ptr_90_indices.push_back(const_int32_57);
+Constant* const_ptr_90 = ConstantExpr::getGetElementPtr(gvar_struct_final_object122, &const_ptr_90_indices[0], const_ptr_90_indices.size());
+
+// Global Variable Definitions
+
+Function* func_gcmalloc = Function::Create(
+ /*Type=*/FuncTy_1,
+ /*Linkage=*/GlobalValue::ExternalLinkage,
+ /*Name=*/"gcmalloc", mod);
+func_gcmalloc->setCallingConv(CallingConv::C);
+func_gcmalloc->setGC("vmkit");
+AttrListPtr func_gcmalloc_PAL;
+func_gcmalloc->setAttributes(func_gcmalloc_PAL);
+Function::arg_iterator args = func_gcmalloc->arg_begin();
+Value* int32_sz = args++;
+int32_sz->setName("sz");
+Value* ptr__VT = args++;
+ptr__VT->setName("_VT");
+
+BasicBlock* label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III.exit",func_gcmalloc,0);
+BasicBlock* label_tableswitch_i_i6 = BasicBlock::Create(mod->getContext(), "tableswitch.i.i6",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II.exit.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_4_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*4.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_6_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*6.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_7_i_i1_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*7.i.i1.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_8_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*8.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_9_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*9.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT16_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT16.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT17_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT17.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT18_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT18.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT19_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT19.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT20_i_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT20.i.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I.exit.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF__i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IFNE_i_i_i = BasicBlock::Create(mod->getContext(), "false IFNE.i.i.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II.exit.i.i.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2_exit_i_i_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2.exit.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IFEQ_i_i_i = BasicBlock::Create(mod->getContext(), "false IFEQ.i.i.i",func_gcmalloc,0);
+BasicBlock* label_tableswitch3_i_i9 = BasicBlock::Create(mod->getContext(), "tableswitch3.i.i9",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II.exit.i2.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_4_i_i_i3_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*4.i.i.i3.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_6_i_i_i4_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*6.i.i.i4.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_7_i_i1_i5_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*7.i.i1.i5.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_8_i_i_i6_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*8.i.i.i6.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_9_i_i_i7_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*9.i.i.i7.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT16_i_i_i8_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT16.i.i.i8.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT17_i_i_i9_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT17.i.i.i9.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT18_i_i_i10_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT18.i.i.i10.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT19_i_i_i11_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT19.i.i.i11.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT20_i_i_i12_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT20.i.i.i12.i.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I.exit.i13.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF__i14_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*.i14.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IFNE_i18_i_i = BasicBlock::Create(mod->getContext(), "false IFNE.i18.i.i",func_gcmalloc,0);
+BasicBlock* label_tableswitch5_i_i11 = BasicBlock::Create(mod->getContext(), "tableswitch5.i.i11",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII_exit_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII.exit.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II.exit.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_4_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*4.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_6_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*6.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_7_i_i1_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*7.i.i1.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_8_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*8.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_9_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*9.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT16_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT16.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT17_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT17.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT18_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT18.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT19_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT19.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IF_ICMPGT20_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IF_ICMPGT20.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I.exit.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF__i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*.i.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III.exit.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII.exit",func_gcmalloc,0);
+BasicBlock* label_tableswitch_i_i = BasicBlock::Create(mod->getContext(), "tableswitch.i.i",func_gcmalloc,0);
+BasicBlock* label_tableswitch1_i_i = BasicBlock::Create(mod->getContext(), "tableswitch1.i.i",func_gcmalloc,0);
+BasicBlock* label_tableswitch2_i_i = BasicBlock::Create(mod->getContext(), "tableswitch2.i.i",func_gcmalloc,0);
+BasicBlock* label_tableswitch3_i_i = BasicBlock::Create(mod->getContext(), "tableswitch3.i.i",func_gcmalloc,0);
+BasicBlock* label_true_IF_NULL_i1_i_i3_i_i = BasicBlock::Create(mod->getContext(), "true IF*NULL.i1.i.i3.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_1_i3_i_i5_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*1.i3.i.i5.i.i",func_gcmalloc,0);
+BasicBlock* label_true_IFNULL_i5_i_i6_i_i = BasicBlock::Create(mod->getContext(), "true IFNULL.i5.i.i6.i.i",func_gcmalloc,0);
+BasicBlock* label_bb_i_i32_i = BasicBlock::Create(mod->getContext(), "bb.i.i32.i",func_gcmalloc,0);
+BasicBlock* label_bb1_i_i33_i = BasicBlock::Create(mod->getContext(), "bb1.i.i33.i",func_gcmalloc,0);
+BasicBlock* label_bb2_i_i34_i = BasicBlock::Create(mod->getContext(), "bb2.i.i34.i",func_gcmalloc,0);
+BasicBlock* label_bb4_preheader_i_i35_i = BasicBlock::Create(mod->getContext(), "bb4.preheader.i.i35.i",func_gcmalloc,0);
+BasicBlock* label_bb3_i_i36_i = BasicBlock::Create(mod->getContext(), "bb3.i.i36.i",func_gcmalloc,0);
+BasicBlock* label_false_IFNE_i7_i_i8_i_i = BasicBlock::Create(mod->getContext(), "false IFNE.i7.i.i8.i.i",func_gcmalloc,0);
+BasicBlock* label_true_IFNULL3_i8_i_i9_i_i = BasicBlock::Create(mod->getContext(), "true IFNULL3.i8.i.i9.i.i",func_gcmalloc,0);
+BasicBlock* label_tableswitch4_i_i = BasicBlock::Create(mod->getContext(), "tableswitch4.i.i",func_gcmalloc,0);
+BasicBlock* label_tableswitch5_i_i = BasicBlock::Create(mod->getContext(), "tableswitch5.i.i",func_gcmalloc,0);
+BasicBlock* label_true_IF_NULL_i1_i_i_i_i = BasicBlock::Create(mod->getContext(), "true IF*NULL.i1.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_GOTO_or_IF_1_i3_i_i_i_i = BasicBlock::Create(mod->getContext(), "GOTO or IF*1.i3.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_true_IFNULL_i5_i_i_i_i = BasicBlock::Create(mod->getContext(), "true IFNULL.i5.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_bb_i_i_i = BasicBlock::Create(mod->getContext(), "bb.i.i.i",func_gcmalloc,0);
+BasicBlock* label_bb1_i_i_i = BasicBlock::Create(mod->getContext(), "bb1.i.i.i",func_gcmalloc,0);
+BasicBlock* label_bb2_i_i_i = BasicBlock::Create(mod->getContext(), "bb2.i.i.i",func_gcmalloc,0);
+BasicBlock* label_bb4_preheader_i_i_i = BasicBlock::Create(mod->getContext(), "bb4.preheader.i.i.i",func_gcmalloc,0);
+BasicBlock* label_bb3_i_i_i = BasicBlock::Create(mod->getContext(), "bb3.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IFNE_i7_i_i_i_i = BasicBlock::Create(mod->getContext(), "false IFNE.i7.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_true_IFNULL3_i8_i_i_i_i = BasicBlock::Create(mod->getContext(), "true IFNULL3.i8.i.i.i.i",func_gcmalloc,0);
+BasicBlock* label_false_IFNE_i = BasicBlock::Create(mod->getContext(), "false IFNE.i",func_gcmalloc,0);
+BasicBlock* label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit = BasicBlock::Create(mod->getContext(), "JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II.exit",func_gcmalloc,0);
+
+// Block JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III.exit (label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit)
+AllocaInst* ptr_res = new AllocaInst(PointerTy_3, "res", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+ptr_res->setAlignment(4);
+ new StoreInst(const_ptr_51, ptr_res, false, label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+CastInst* ptr_res1 = new BitCastInst(ptr_res, PointerTy_7, "res1", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+std::vector void_92_params;
+void_92_params.push_back(ptr_res1);
+void_92_params.push_back(const_ptr_52);
+CallInst* void_92 = CallInst::Create(func_llvm_gcroot, void_92_params.begin(), void_92_params.end(), "", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+void_92->setCallingConv(CallingConv::C);
+void_92->setTailCall(false);AttrListPtr void_92_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoUnwind;
+ Attrs.push_back(PAWI);
+ void_92_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+void_92->setAttributes(void_92_PAL);
+
+BinaryOperator* int32_93 = BinaryOperator::Create(Instruction::Add, int32_sz, const_int32_53, "", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+BinaryOperator* int32_94 = BinaryOperator::Create(Instruction::And, int32_93, const_int32_54, "", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+CallInst* ptr_95 = CallInst::Create(func_llvm_frameaddress, const_int32_55, "", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+ptr_95->setCallingConv(CallingConv::C);
+ptr_95->setTailCall(false);AttrListPtr ptr_95_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoUnwind;
+ Attrs.push_back(PAWI);
+ ptr_95_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+ptr_95->setAttributes(ptr_95_PAL);
+
+CastInst* int32_96 = new PtrToIntInst(ptr_95, IntegerType::get(mod->getContext(), 32), "", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+BinaryOperator* int32_97 = BinaryOperator::Create(Instruction::And, int32_96, const_int32_56, "", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+CastInst* ptr_98 = new IntToPtrInst(int32_97, PointerTy_12, "", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+std::vector ptr_99_indices;
+ptr_99_indices.push_back(const_int32_55);
+ptr_99_indices.push_back(const_int32_57);
+Instruction* ptr_99 = GetElementPtrInst::Create(ptr_98, ptr_99_indices.begin(), ptr_99_indices.end(), "", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+LoadInst* int32_100 = new LoadInst(ptr_99, "", false, label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+ICmpInst* int1_101 = new ICmpInst(*label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit, ICmpInst::ICMP_SLT, int32_94, const_int32_58, "");
+SelectInst* int32_retval_i = SelectInst::Create(int1_101, const_int32_55, const_int32_59, "retval.i", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+CastInst* ptr_tmp1 = new IntToPtrInst(int32_100, PointerTy_25, "tmp1", label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+SwitchInst* void_102 = SwitchInst::Create(int32_retval_i, label_tableswitch_i_i6, 7, label_JnJVM_org_mmtk_plan_MutatorContext_checkAllocator__III_exit);
+void_102->addCase(const_int32_55, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i);
+void_102->addCase(const_int32_57, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i);
+void_102->addCase(const_int32_53, label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+void_102->addCase(const_int32_59, label_tableswitch3_i_i9);
+void_102->addCase(const_int32_60, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i);
+void_102->addCase(const_int32_61, label_tableswitch5_i_i11);
+
+
+// Block tableswitch.i.i6 (label_tableswitch_i_i6)
+CallInst* void_103 = CallInst::Create(func_abort, "", label_tableswitch_i_i6);
+void_103->setCallingConv(CallingConv::C);
+void_103->setTailCall(false);AttrListPtr void_103_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoReturn | Attribute::NoUnwind;
+ Attrs.push_back(PAWI);
+ void_103_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+void_103->setAttributes(void_103_PAL);
+
+new UnreachableInst(mod->getContext(), label_tableswitch_i_i6);
+
+// Block JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II.exit.i.i.i (label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i)
+GetElementPtrInst* ptr_105 = GetElementPtrInst::Create(ptr_tmp1, const_int32_59, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i);
+CastInst* ptr_106 = new BitCastInst(ptr_105, PointerTy_29, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i);
+LoadInst* ptr_107 = new LoadInst(ptr_106, "", false, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i);
+BinaryOperator* int32_108 = BinaryOperator::Create(Instruction::Add, int32_94, const_int32_62, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i);
+ICmpInst* int1_109 = new ICmpInst(*label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i, ICmpInst::ICMP_SGT, int32_108, const_int32_63, "");
+BranchInst::Create(label_GOTO_or_IF_4_i_i_i_i_i, label_false_IF_ICMPGT16_i_i_i_i_i, int1_109, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i_i);
+
+// Block GOTO or IF*4.i.i.i.i.i (label_GOTO_or_IF_4_i_i_i_i_i)
+ICmpInst* int1_111 = new ICmpInst(*label_GOTO_or_IF_4_i_i_i_i_i, ICmpInst::ICMP_SGT, int32_108, const_int32_64, "");
+BranchInst::Create(label_GOTO_or_IF_6_i_i_i_i_i, label_false_IF_ICMPGT17_i_i_i_i_i, int1_111, label_GOTO_or_IF_4_i_i_i_i_i);
+
+// Block GOTO or IF*6.i.i.i.i.i (label_GOTO_or_IF_6_i_i_i_i_i)
+ICmpInst* int1_113 = new ICmpInst(*label_GOTO_or_IF_6_i_i_i_i_i, ICmpInst::ICMP_SGT, int32_108, const_int32_65, "");
+BranchInst::Create(label_GOTO_or_IF_7_i_i1_i_i_i, label_false_IF_ICMPGT18_i_i_i_i_i, int1_113, label_GOTO_or_IF_6_i_i_i_i_i);
+
+// Block GOTO or IF*7.i.i1.i.i.i (label_GOTO_or_IF_7_i_i1_i_i_i)
+ICmpInst* int1_115 = new ICmpInst(*label_GOTO_or_IF_7_i_i1_i_i_i, ICmpInst::ICMP_SGT, int32_108, const_int32_66, "");
+BranchInst::Create(label_GOTO_or_IF_8_i_i_i_i_i, label_false_IF_ICMPGT19_i_i_i_i_i, int1_115, label_GOTO_or_IF_7_i_i1_i_i_i);
+
+// Block GOTO or IF*8.i.i.i.i.i (label_GOTO_or_IF_8_i_i_i_i_i)
+ICmpInst* int1_117 = new ICmpInst(*label_GOTO_or_IF_8_i_i_i_i_i, ICmpInst::ICMP_SGT, int32_108, const_int32_67, "");
+BranchInst::Create(label_GOTO_or_IF_9_i_i_i_i_i, label_false_IF_ICMPGT20_i_i_i_i_i, int1_117, label_GOTO_or_IF_8_i_i_i_i_i);
+
+// Block GOTO or IF*9.i.i.i.i.i (label_GOTO_or_IF_9_i_i_i_i_i)
+BinaryOperator* int32_119 = BinaryOperator::Create(Instruction::AShr, int32_108, const_int32_68, "", label_GOTO_or_IF_9_i_i_i_i_i);
+BinaryOperator* int32_120 = BinaryOperator::Create(Instruction::Add, int32_119, const_int32_69, "", label_GOTO_or_IF_9_i_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i, label_GOTO_or_IF_9_i_i_i_i_i);
+
+// Block false IF_ICMPGT16.i.i.i.i.i (label_false_IF_ICMPGT16_i_i_i_i_i)
+BinaryOperator* int32_122 = BinaryOperator::Create(Instruction::AShr, int32_108, const_int32_57, "", label_false_IF_ICMPGT16_i_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i, label_false_IF_ICMPGT16_i_i_i_i_i);
+
+// Block false IF_ICMPGT17.i.i.i.i.i (label_false_IF_ICMPGT17_i_i_i_i_i)
+BinaryOperator* int32_124 = BinaryOperator::Create(Instruction::AShr, int32_108, const_int32_59, "", label_false_IF_ICMPGT17_i_i_i_i_i);
+BinaryOperator* int32_125 = BinaryOperator::Create(Instruction::Add, int32_124, const_int32_70, "", label_false_IF_ICMPGT17_i_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i, label_false_IF_ICMPGT17_i_i_i_i_i);
+
+// Block false IF_ICMPGT18.i.i.i.i.i (label_false_IF_ICMPGT18_i_i_i_i_i)
+BinaryOperator* int32_127 = BinaryOperator::Create(Instruction::AShr, int32_108, const_int32_71, "", label_false_IF_ICMPGT18_i_i_i_i_i);
+BinaryOperator* int32_128 = BinaryOperator::Create(Instruction::Add, int32_127, const_int32_72, "", label_false_IF_ICMPGT18_i_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i, label_false_IF_ICMPGT18_i_i_i_i_i);
+
+// Block false IF_ICMPGT19.i.i.i.i.i (label_false_IF_ICMPGT19_i_i_i_i_i)
+BinaryOperator* int32_130 = BinaryOperator::Create(Instruction::AShr, int32_108, const_int32_73, "", label_false_IF_ICMPGT19_i_i_i_i_i);
+BinaryOperator* int32_131 = BinaryOperator::Create(Instruction::Add, int32_130, const_int32_74, "", label_false_IF_ICMPGT19_i_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i, label_false_IF_ICMPGT19_i_i_i_i_i);
+
+// Block false IF_ICMPGT20.i.i.i.i.i (label_false_IF_ICMPGT20_i_i_i_i_i)
+BinaryOperator* int32_133 = BinaryOperator::Create(Instruction::AShr, int32_108, const_int32_61, "", label_false_IF_ICMPGT20_i_i_i_i_i);
+BinaryOperator* int32_134 = BinaryOperator::Create(Instruction::Add, int32_133, const_int32_75, "", label_false_IF_ICMPGT20_i_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i, label_false_IF_ICMPGT20_i_i_i_i_i);
+
+// Block JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I.exit.i.i.i (label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i)
+PHINode* int32_136 = PHINode::Create(IntegerType::get(mod->getContext(), 32), "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i);
+int32_136->reserveOperandSpace(6);
+int32_136->addIncoming(int32_122, label_false_IF_ICMPGT16_i_i_i_i_i);
+int32_136->addIncoming(int32_125, label_false_IF_ICMPGT17_i_i_i_i_i);
+int32_136->addIncoming(int32_128, label_false_IF_ICMPGT18_i_i_i_i_i);
+int32_136->addIncoming(int32_131, label_false_IF_ICMPGT19_i_i_i_i_i);
+int32_136->addIncoming(int32_134, label_false_IF_ICMPGT20_i_i_i_i_i);
+int32_136->addIncoming(int32_120, label_GOTO_or_IF_9_i_i_i_i_i);
+
+std::vector ptr_137_indices;
+ptr_137_indices.push_back(const_int32_50);
+ptr_137_indices.push_back(const_int32_50);
+Instruction* ptr_137 = GetElementPtrInst::Create(ptr_107, ptr_137_indices.begin(), ptr_137_indices.end(), "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i);
+LoadInst* ptr_138 = new LoadInst(ptr_137, "", false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i);
+BinaryOperator* int32_139 = BinaryOperator::Create(Instruction::Add, int32_136, const_int32_50, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i);
+CastInst* ptr_140 = new BitCastInst(ptr_138, PointerTy_24, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i);
+GetElementPtrInst* ptr_141 = GetElementPtrInst::Create(ptr_140, int32_139, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i);
+LoadInst* int32_142 = new LoadInst(ptr_141, "", false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i);
+ICmpInst* int1_143 = new ICmpInst(*label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i, ICmpInst::ICMP_EQ, int32_142, const_int32_55, "");
+BranchInst::Create(label_GOTO_or_IF__i_i_i, label_false_IFNE_i_i_i, int1_143, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i_i);
+
+// Block GOTO or IF*.i.i.i (label_GOTO_or_IF__i_i_i)
+std::vector ptr_145_params;
+ptr_145_params.push_back(ptr_107);
+ptr_145_params.push_back(int32_94);
+ptr_145_params.push_back(const_int32_55);
+ptr_145_params.push_back(const_int32_55);
+CallInst* ptr_145 = CallInst::Create(func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III, ptr_145_params.begin(), ptr_145_params.end(), "", label_GOTO_or_IF__i_i_i);
+ptr_145->setCallingConv(CallingConv::C);
+ptr_145->setTailCall(false);AttrListPtr ptr_145_PAL;
+ptr_145->setAttributes(ptr_145_PAL);
+
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_GOTO_or_IF__i_i_i);
+
+// Block false IFNE.i.i.i (label_false_IFNE_i_i_i)
+CastInst* ptr_147 = new IntToPtrInst(int32_142, PointerTy_29, "", label_false_IFNE_i_i_i);
+LoadInst* ptr_148 = new LoadInst(ptr_147, "", false, label_false_IFNE_i_i_i);
+CastInst* int32_149 = new PtrToIntInst(ptr_148, IntegerType::get(mod->getContext(), 32), "", label_false_IFNE_i_i_i);
+ new StoreInst(int32_149, ptr_141, false, label_false_IFNE_i_i_i);
+ new StoreInst(const_ptr_76, ptr_147, false, label_false_IFNE_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII_exit_i, label_false_IFNE_i_i_i);
+
+// Block JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II.exit.i.i.i (label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i)
+GetElementPtrInst* ptr_153 = GetElementPtrInst::Create(ptr_tmp1, const_int32_57, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+CastInst* ptr_154 = new BitCastInst(ptr_153, PointerTy_29, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+LoadInst* ptr_155 = new LoadInst(ptr_154, "", false, label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+GetElementPtrInst* ptr_156 = GetElementPtrInst::Create(ptr_155, const_int32_50, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+CastInst* ptr_157 = new BitCastInst(ptr_156, PointerTy_29, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+LoadInst* ptr_158 = new LoadInst(ptr_157, "", false, label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+CastInst* int32_159 = new PtrToIntInst(ptr_158, IntegerType::get(mod->getContext(), 32), "", label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+BinaryOperator* int32_160 = BinaryOperator::Create(Instruction::Add, int32_159, int32_94, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+std::vector ptr_161_indices;
+ptr_161_indices.push_back(const_int32_50);
+ptr_161_indices.push_back(const_int32_50);
+Instruction* ptr_161 = GetElementPtrInst::Create(ptr_155, ptr_161_indices.begin(), ptr_161_indices.end(), "", label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+LoadInst* ptr_162 = new LoadInst(ptr_161, "", false, label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+CastInst* int32_163 = new PtrToIntInst(ptr_162, IntegerType::get(mod->getContext(), 32), "", label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+ICmpInst* int1_164 = new ICmpInst(*label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i, ICmpInst::ICMP_UGT, int32_160, int32_163, "");
+BranchInst::Create(label_false_IFEQ_i_i_i, label_JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2_exit_i_i_i, int1_164, label_JnJVM_org_mmtk_utility_alloc_Allocator_alignAllocationNoFill__Lorg_vmmagic_unboxed_Address_2II_exit_i_i_i);
+
+// Block JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2.exit.i.i.i (label_JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2_exit_i_i_i)
+std::vector ptr_166_indices;
+ptr_166_indices.push_back(const_int32_50);
+ptr_166_indices.push_back(const_int32_55);
+Instruction* ptr_166 = GetElementPtrInst::Create(ptr_155, ptr_166_indices.begin(), ptr_166_indices.end(), "", label_JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2_exit_i_i_i);
+CastInst* ptr__c_i_i_i = new IntToPtrInst(int32_160, PointerTy_26, ".c.i.i.i", label_JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2_exit_i_i_i);
+ new StoreInst(ptr__c_i_i_i, ptr_166, false, label_JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2_exit_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2_exit_i_i_i);
+
+// Block false IFEQ.i.i.i (label_false_IFEQ_i_i_i)
+CastInst* ptr_169 = new IntToPtrInst(int32_160, PointerTy_25, "", label_false_IFEQ_i_i_i);
+std::vector ptr_170_params;
+ptr_170_params.push_back(ptr_155);
+ptr_170_params.push_back(ptr_158);
+ptr_170_params.push_back(ptr_169);
+ptr_170_params.push_back(const_int32_55);
+ptr_170_params.push_back(const_int32_55);
+CallInst* ptr_170 = CallInst::Create(func_JnJVM_org_mmtk_utility_alloc_BumpPointer_allocSlow__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2II, ptr_170_params.begin(), ptr_170_params.end(), "", label_false_IFEQ_i_i_i);
+ptr_170->setCallingConv(CallingConv::C);
+ptr_170->setTailCall(false);AttrListPtr ptr_170_PAL;
+ptr_170->setAttributes(ptr_170_PAL);
+
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_false_IFEQ_i_i_i);
+
+// Block tableswitch3.i.i9 (label_tableswitch3_i_i9)
+std::vector ptr_172_indices;
+ptr_172_indices.push_back(const_int32_57);
+ptr_172_indices.push_back(const_int32_50);
+Instruction* ptr_172 = GetElementPtrInst::Create(ptr_tmp1, ptr_172_indices.begin(), ptr_172_indices.end(), "", label_tableswitch3_i_i9);
+LoadInst* ptr_173 = new LoadInst(ptr_172, "", false, label_tableswitch3_i_i9);
+CastInst* ptr_174 = new BitCastInst(ptr_173, PointerTy_25, "", label_tableswitch3_i_i9);
+std::vector ptr_175_params;
+ptr_175_params.push_back(ptr_174);
+ptr_175_params.push_back(int32_94);
+ptr_175_params.push_back(const_int32_55);
+ptr_175_params.push_back(const_int32_55);
+CallInst* ptr_175 = CallInst::Create(func_JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III, ptr_175_params.begin(), ptr_175_params.end(), "", label_tableswitch3_i_i9);
+ptr_175->setCallingConv(CallingConv::C);
+ptr_175->setTailCall(false);AttrListPtr ptr_175_PAL;
+ptr_175->setAttributes(ptr_175_PAL);
+
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_tableswitch3_i_i9);
+
+// Block JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II.exit.i2.i.i (label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i)
+GetElementPtrInst* ptr_177 = GetElementPtrInst::Create(ptr_tmp1, const_int32_53, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i);
+CastInst* ptr_178 = new BitCastInst(ptr_177, PointerTy_29, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i);
+LoadInst* ptr_179 = new LoadInst(ptr_178, "", false, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i);
+BinaryOperator* int32_180 = BinaryOperator::Create(Instruction::Add, int32_94, const_int32_62, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i);
+ICmpInst* int1_181 = new ICmpInst(*label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i, ICmpInst::ICMP_SGT, int32_180, const_int32_63, "");
+BranchInst::Create(label_GOTO_or_IF_4_i_i_i3_i_i, label_false_IF_ICMPGT16_i_i_i8_i_i, int1_181, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i2_i_i);
+
+// Block GOTO or IF*4.i.i.i3.i.i (label_GOTO_or_IF_4_i_i_i3_i_i)
+ICmpInst* int1_183 = new ICmpInst(*label_GOTO_or_IF_4_i_i_i3_i_i, ICmpInst::ICMP_SGT, int32_180, const_int32_64, "");
+BranchInst::Create(label_GOTO_or_IF_6_i_i_i4_i_i, label_false_IF_ICMPGT17_i_i_i9_i_i, int1_183, label_GOTO_or_IF_4_i_i_i3_i_i);
+
+// Block GOTO or IF*6.i.i.i4.i.i (label_GOTO_or_IF_6_i_i_i4_i_i)
+ICmpInst* int1_185 = new ICmpInst(*label_GOTO_or_IF_6_i_i_i4_i_i, ICmpInst::ICMP_SGT, int32_180, const_int32_65, "");
+BranchInst::Create(label_GOTO_or_IF_7_i_i1_i5_i_i, label_false_IF_ICMPGT18_i_i_i10_i_i, int1_185, label_GOTO_or_IF_6_i_i_i4_i_i);
+
+// Block GOTO or IF*7.i.i1.i5.i.i (label_GOTO_or_IF_7_i_i1_i5_i_i)
+ICmpInst* int1_187 = new ICmpInst(*label_GOTO_or_IF_7_i_i1_i5_i_i, ICmpInst::ICMP_SGT, int32_180, const_int32_66, "");
+BranchInst::Create(label_GOTO_or_IF_8_i_i_i6_i_i, label_false_IF_ICMPGT19_i_i_i11_i_i, int1_187, label_GOTO_or_IF_7_i_i1_i5_i_i);
+
+// Block GOTO or IF*8.i.i.i6.i.i (label_GOTO_or_IF_8_i_i_i6_i_i)
+ICmpInst* int1_189 = new ICmpInst(*label_GOTO_or_IF_8_i_i_i6_i_i, ICmpInst::ICMP_SGT, int32_180, const_int32_67, "");
+BranchInst::Create(label_GOTO_or_IF_9_i_i_i7_i_i, label_false_IF_ICMPGT20_i_i_i12_i_i, int1_189, label_GOTO_or_IF_8_i_i_i6_i_i);
+
+// Block GOTO or IF*9.i.i.i7.i.i (label_GOTO_or_IF_9_i_i_i7_i_i)
+BinaryOperator* int32_191 = BinaryOperator::Create(Instruction::AShr, int32_180, const_int32_68, "", label_GOTO_or_IF_9_i_i_i7_i_i);
+BinaryOperator* int32_192 = BinaryOperator::Create(Instruction::Add, int32_191, const_int32_69, "", label_GOTO_or_IF_9_i_i_i7_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i, label_GOTO_or_IF_9_i_i_i7_i_i);
+
+// Block false IF_ICMPGT16.i.i.i8.i.i (label_false_IF_ICMPGT16_i_i_i8_i_i)
+BinaryOperator* int32_194 = BinaryOperator::Create(Instruction::AShr, int32_180, const_int32_57, "", label_false_IF_ICMPGT16_i_i_i8_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i, label_false_IF_ICMPGT16_i_i_i8_i_i);
+
+// Block false IF_ICMPGT17.i.i.i9.i.i (label_false_IF_ICMPGT17_i_i_i9_i_i)
+BinaryOperator* int32_196 = BinaryOperator::Create(Instruction::AShr, int32_180, const_int32_59, "", label_false_IF_ICMPGT17_i_i_i9_i_i);
+BinaryOperator* int32_197 = BinaryOperator::Create(Instruction::Add, int32_196, const_int32_70, "", label_false_IF_ICMPGT17_i_i_i9_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i, label_false_IF_ICMPGT17_i_i_i9_i_i);
+
+// Block false IF_ICMPGT18.i.i.i10.i.i (label_false_IF_ICMPGT18_i_i_i10_i_i)
+BinaryOperator* int32_199 = BinaryOperator::Create(Instruction::AShr, int32_180, const_int32_71, "", label_false_IF_ICMPGT18_i_i_i10_i_i);
+BinaryOperator* int32_200 = BinaryOperator::Create(Instruction::Add, int32_199, const_int32_72, "", label_false_IF_ICMPGT18_i_i_i10_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i, label_false_IF_ICMPGT18_i_i_i10_i_i);
+
+// Block false IF_ICMPGT19.i.i.i11.i.i (label_false_IF_ICMPGT19_i_i_i11_i_i)
+BinaryOperator* int32_202 = BinaryOperator::Create(Instruction::AShr, int32_180, const_int32_73, "", label_false_IF_ICMPGT19_i_i_i11_i_i);
+BinaryOperator* int32_203 = BinaryOperator::Create(Instruction::Add, int32_202, const_int32_74, "", label_false_IF_ICMPGT19_i_i_i11_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i, label_false_IF_ICMPGT19_i_i_i11_i_i);
+
+// Block false IF_ICMPGT20.i.i.i12.i.i (label_false_IF_ICMPGT20_i_i_i12_i_i)
+BinaryOperator* int32_205 = BinaryOperator::Create(Instruction::AShr, int32_180, const_int32_61, "", label_false_IF_ICMPGT20_i_i_i12_i_i);
+BinaryOperator* int32_206 = BinaryOperator::Create(Instruction::Add, int32_205, const_int32_75, "", label_false_IF_ICMPGT20_i_i_i12_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i, label_false_IF_ICMPGT20_i_i_i12_i_i);
+
+// Block JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I.exit.i13.i.i (label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i)
+PHINode* int32_208 = PHINode::Create(IntegerType::get(mod->getContext(), 32), "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i);
+int32_208->reserveOperandSpace(6);
+int32_208->addIncoming(int32_194, label_false_IF_ICMPGT16_i_i_i8_i_i);
+int32_208->addIncoming(int32_197, label_false_IF_ICMPGT17_i_i_i9_i_i);
+int32_208->addIncoming(int32_200, label_false_IF_ICMPGT18_i_i_i10_i_i);
+int32_208->addIncoming(int32_203, label_false_IF_ICMPGT19_i_i_i11_i_i);
+int32_208->addIncoming(int32_206, label_false_IF_ICMPGT20_i_i_i12_i_i);
+int32_208->addIncoming(int32_192, label_GOTO_or_IF_9_i_i_i7_i_i);
+
+std::vector ptr_209_indices;
+ptr_209_indices.push_back(const_int32_50);
+ptr_209_indices.push_back(const_int32_50);
+Instruction* ptr_209 = GetElementPtrInst::Create(ptr_179, ptr_209_indices.begin(), ptr_209_indices.end(), "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i);
+LoadInst* ptr_210 = new LoadInst(ptr_209, "", false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i);
+BinaryOperator* int32_211 = BinaryOperator::Create(Instruction::Add, int32_208, const_int32_50, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i);
+CastInst* ptr_212 = new BitCastInst(ptr_210, PointerTy_24, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i);
+GetElementPtrInst* ptr_213 = GetElementPtrInst::Create(ptr_212, int32_211, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i);
+LoadInst* int32_214 = new LoadInst(ptr_213, "", false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i);
+ICmpInst* int1_215 = new ICmpInst(*label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i, ICmpInst::ICMP_EQ, int32_214, const_int32_55, "");
+BranchInst::Create(label_GOTO_or_IF__i14_i_i, label_false_IFNE_i18_i_i, int1_215, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i13_i_i);
+
+// Block GOTO or IF*.i14.i.i (label_GOTO_or_IF__i14_i_i)
+std::vector ptr_217_params;
+ptr_217_params.push_back(ptr_179);
+ptr_217_params.push_back(int32_94);
+ptr_217_params.push_back(const_int32_55);
+ptr_217_params.push_back(const_int32_55);
+CallInst* ptr_217 = CallInst::Create(func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III, ptr_217_params.begin(), ptr_217_params.end(), "", label_GOTO_or_IF__i14_i_i);
+ptr_217->setCallingConv(CallingConv::C);
+ptr_217->setTailCall(false);AttrListPtr ptr_217_PAL;
+ptr_217->setAttributes(ptr_217_PAL);
+
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_GOTO_or_IF__i14_i_i);
+
+// Block false IFNE.i18.i.i (label_false_IFNE_i18_i_i)
+CastInst* ptr_219 = new IntToPtrInst(int32_214, PointerTy_29, "", label_false_IFNE_i18_i_i);
+LoadInst* ptr_220 = new LoadInst(ptr_219, "", false, label_false_IFNE_i18_i_i);
+CastInst* int32_221 = new PtrToIntInst(ptr_220, IntegerType::get(mod->getContext(), 32), "", label_false_IFNE_i18_i_i);
+ new StoreInst(int32_221, ptr_213, false, label_false_IFNE_i18_i_i);
+ new StoreInst(const_ptr_76, ptr_219, false, label_false_IFNE_i18_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII_exit_i, label_false_IFNE_i18_i_i);
+
+// Block tableswitch5.i.i11 (label_tableswitch5_i_i11)
+std::vector ptr_225_indices;
+ptr_225_indices.push_back(const_int32_53);
+ptr_225_indices.push_back(const_int32_50);
+Instruction* ptr_225 = GetElementPtrInst::Create(ptr_tmp1, ptr_225_indices.begin(), ptr_225_indices.end(), "", label_tableswitch5_i_i11);
+LoadInst* ptr_226 = new LoadInst(ptr_225, "", false, label_tableswitch5_i_i11);
+CastInst* ptr_227 = new BitCastInst(ptr_226, PointerTy_25, "", label_tableswitch5_i_i11);
+std::vector ptr_228_params;
+ptr_228_params.push_back(ptr_227);
+ptr_228_params.push_back(int32_94);
+ptr_228_params.push_back(const_int32_55);
+ptr_228_params.push_back(const_int32_55);
+CallInst* ptr_228 = CallInst::Create(func_JnJVM_org_mmtk_utility_alloc_LargeObjectAllocator_alloc__III, ptr_228_params.begin(), ptr_228_params.end(), "", label_tableswitch5_i_i11);
+ptr_228->setCallingConv(CallingConv::C);
+ptr_228->setTailCall(false);AttrListPtr ptr_228_PAL;
+ptr_228->setAttributes(ptr_228_PAL);
+
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_tableswitch5_i_i11);
+
+// Block JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII.exit.i (label_JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII_exit_i)
+PHINode* int32__in = PHINode::Create(IntegerType::get(mod->getContext(), 32), ".in", label_JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII_exit_i);
+int32__in->reserveOperandSpace(2);
+int32__in->addIncoming(int32_142, label_false_IFNE_i_i_i);
+int32__in->addIncoming(int32_214, label_false_IFNE_i18_i_i);
+
+CastInst* ptr_230 = new IntToPtrInst(int32__in, PointerTy_25, "", label_JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII_exit_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII_exit_i);
+
+// Block JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II.exit.i.i (label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i)
+std::vector ptr_232_indices;
+ptr_232_indices.push_back(const_int32_59);
+ptr_232_indices.push_back(const_int32_50);
+Instruction* ptr_232 = GetElementPtrInst::Create(ptr_tmp1, ptr_232_indices.begin(), ptr_232_indices.end(), "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i);
+LoadInst* ptr_233 = new LoadInst(ptr_232, "", false, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i);
+CastInst* ptr_234 = new BitCastInst(ptr_233, PointerTy_25, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i);
+BinaryOperator* int32_235 = BinaryOperator::Create(Instruction::Add, int32_94, const_int32_62, "", label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i);
+ICmpInst* int1_236 = new ICmpInst(*label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i, ICmpInst::ICMP_SGT, int32_235, const_int32_63, "");
+BranchInst::Create(label_GOTO_or_IF_4_i_i_i_i, label_false_IF_ICMPGT16_i_i_i_i, int1_236, label_JnJVM_org_mmtk_utility_alloc_Allocator_getMaximumAlignedSize__II_exit_i_i);
+
+// Block GOTO or IF*4.i.i.i.i (label_GOTO_or_IF_4_i_i_i_i)
+ICmpInst* int1_238 = new ICmpInst(*label_GOTO_or_IF_4_i_i_i_i, ICmpInst::ICMP_SGT, int32_235, const_int32_64, "");
+BranchInst::Create(label_GOTO_or_IF_6_i_i_i_i, label_false_IF_ICMPGT17_i_i_i_i, int1_238, label_GOTO_or_IF_4_i_i_i_i);
+
+// Block GOTO or IF*6.i.i.i.i (label_GOTO_or_IF_6_i_i_i_i)
+ICmpInst* int1_240 = new ICmpInst(*label_GOTO_or_IF_6_i_i_i_i, ICmpInst::ICMP_SGT, int32_235, const_int32_65, "");
+BranchInst::Create(label_GOTO_or_IF_7_i_i1_i_i, label_false_IF_ICMPGT18_i_i_i_i, int1_240, label_GOTO_or_IF_6_i_i_i_i);
+
+// Block GOTO or IF*7.i.i1.i.i (label_GOTO_or_IF_7_i_i1_i_i)
+ICmpInst* int1_242 = new ICmpInst(*label_GOTO_or_IF_7_i_i1_i_i, ICmpInst::ICMP_SGT, int32_235, const_int32_66, "");
+BranchInst::Create(label_GOTO_or_IF_8_i_i_i_i, label_false_IF_ICMPGT19_i_i_i_i, int1_242, label_GOTO_or_IF_7_i_i1_i_i);
+
+// Block GOTO or IF*8.i.i.i.i (label_GOTO_or_IF_8_i_i_i_i)
+ICmpInst* int1_244 = new ICmpInst(*label_GOTO_or_IF_8_i_i_i_i, ICmpInst::ICMP_SGT, int32_235, const_int32_67, "");
+BranchInst::Create(label_GOTO_or_IF_9_i_i_i_i, label_false_IF_ICMPGT20_i_i_i_i, int1_244, label_GOTO_or_IF_8_i_i_i_i);
+
+// Block GOTO or IF*9.i.i.i.i (label_GOTO_or_IF_9_i_i_i_i)
+BinaryOperator* int32_246 = BinaryOperator::Create(Instruction::AShr, int32_235, const_int32_68, "", label_GOTO_or_IF_9_i_i_i_i);
+BinaryOperator* int32_247 = BinaryOperator::Create(Instruction::Add, int32_246, const_int32_69, "", label_GOTO_or_IF_9_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i, label_GOTO_or_IF_9_i_i_i_i);
+
+// Block false IF_ICMPGT16.i.i.i.i (label_false_IF_ICMPGT16_i_i_i_i)
+BinaryOperator* int32_249 = BinaryOperator::Create(Instruction::AShr, int32_235, const_int32_57, "", label_false_IF_ICMPGT16_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i, label_false_IF_ICMPGT16_i_i_i_i);
+
+// Block false IF_ICMPGT17.i.i.i.i (label_false_IF_ICMPGT17_i_i_i_i)
+BinaryOperator* int32_251 = BinaryOperator::Create(Instruction::AShr, int32_235, const_int32_59, "", label_false_IF_ICMPGT17_i_i_i_i);
+BinaryOperator* int32_252 = BinaryOperator::Create(Instruction::Add, int32_251, const_int32_70, "", label_false_IF_ICMPGT17_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i, label_false_IF_ICMPGT17_i_i_i_i);
+
+// Block false IF_ICMPGT18.i.i.i.i (label_false_IF_ICMPGT18_i_i_i_i)
+BinaryOperator* int32_254 = BinaryOperator::Create(Instruction::AShr, int32_235, const_int32_71, "", label_false_IF_ICMPGT18_i_i_i_i);
+BinaryOperator* int32_255 = BinaryOperator::Create(Instruction::Add, int32_254, const_int32_72, "", label_false_IF_ICMPGT18_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i, label_false_IF_ICMPGT18_i_i_i_i);
+
+// Block false IF_ICMPGT19.i.i.i.i (label_false_IF_ICMPGT19_i_i_i_i)
+BinaryOperator* int32_257 = BinaryOperator::Create(Instruction::AShr, int32_235, const_int32_73, "", label_false_IF_ICMPGT19_i_i_i_i);
+BinaryOperator* int32_258 = BinaryOperator::Create(Instruction::Add, int32_257, const_int32_74, "", label_false_IF_ICMPGT19_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i, label_false_IF_ICMPGT19_i_i_i_i);
+
+// Block false IF_ICMPGT20.i.i.i.i (label_false_IF_ICMPGT20_i_i_i_i)
+BinaryOperator* int32_260 = BinaryOperator::Create(Instruction::AShr, int32_235, const_int32_61, "", label_false_IF_ICMPGT20_i_i_i_i);
+BinaryOperator* int32_261 = BinaryOperator::Create(Instruction::Add, int32_260, const_int32_75, "", label_false_IF_ICMPGT20_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i, label_false_IF_ICMPGT20_i_i_i_i);
+
+// Block JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I.exit.i.i (label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i)
+PHINode* int32_263 = PHINode::Create(IntegerType::get(mod->getContext(), 32), "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+int32_263->reserveOperandSpace(6);
+int32_263->addIncoming(int32_249, label_false_IF_ICMPGT16_i_i_i_i);
+int32_263->addIncoming(int32_252, label_false_IF_ICMPGT17_i_i_i_i);
+int32_263->addIncoming(int32_255, label_false_IF_ICMPGT18_i_i_i_i);
+int32_263->addIncoming(int32_258, label_false_IF_ICMPGT19_i_i_i_i);
+int32_263->addIncoming(int32_261, label_false_IF_ICMPGT20_i_i_i_i);
+int32_263->addIncoming(int32_247, label_GOTO_or_IF_9_i_i_i_i);
+
+GetElementPtrInst* ptr_264 = GetElementPtrInst::Create(ptr_233, const_int32_70, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+CastInst* ptr_265 = new BitCastInst(ptr_264, PointerTy_7, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+LoadInst* ptr_266 = new LoadInst(ptr_265, "", false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+BinaryOperator* int32_267 = BinaryOperator::Create(Instruction::Add, int32_263, const_int32_50, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+CastInst* ptr_268 = new BitCastInst(ptr_266, PointerTy_24, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+GetElementPtrInst* ptr_269 = GetElementPtrInst::Create(ptr_268, int32_267, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+LoadInst* int32_270 = new LoadInst(ptr_269, "", false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+ICmpInst* int1_271 = new ICmpInst(*label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i, ICmpInst::ICMP_EQ, int32_270, const_int32_55, "");
+BranchInst::Create(label_GOTO_or_IF__i_i, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i, int1_271, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_getSizeClass__I_exit_i_i);
+
+// Block GOTO or IF*.i.i (label_GOTO_or_IF__i_i)
+std::vector ptr_273_params;
+ptr_273_params.push_back(ptr_234);
+ptr_273_params.push_back(int32_94);
+ptr_273_params.push_back(const_int32_55);
+ptr_273_params.push_back(const_int32_55);
+CallInst* ptr_273 = CallInst::Create(func_JnJVM_org_mmtk_utility_alloc_Allocator_allocSlow__III, ptr_273_params.begin(), ptr_273_params.end(), "", label_GOTO_or_IF__i_i);
+ptr_273->setCallingConv(CallingConv::C);
+ptr_273->setTailCall(false);AttrListPtr ptr_273_PAL;
+ptr_273->setAttributes(ptr_273_PAL);
+
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_GOTO_or_IF__i_i);
+
+// Block JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III.exit.i (label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i)
+CastInst* ptr_275 = new IntToPtrInst(int32_270, PointerTy_25, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i);
+CastInst* ptr_276 = new IntToPtrInst(int32_270, PointerTy_29, "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i);
+LoadInst* ptr_277 = new LoadInst(ptr_276, "", false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i);
+CastInst* int32_278 = new PtrToIntInst(ptr_277, IntegerType::get(mod->getContext(), 32), "", label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i);
+ new StoreInst(int32_278, ptr_269, false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i);
+ new StoreInst(const_ptr_76, ptr_276, false, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i);
+
+// Block JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII.exit (label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit)
+PHINode* ptr_282 = PHINode::Create(PointerTy_25, "", label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit);
+ptr_282->reserveOperandSpace(9);
+ptr_282->addIncoming(ptr_228, label_tableswitch5_i_i11);
+ptr_282->addIncoming(ptr_230, label_JnJVM_org_mmtk_plan_MutatorContext_alloc__IIIII_exit_i);
+ptr_282->addIncoming(ptr_217, label_GOTO_or_IF__i14_i_i);
+ptr_282->addIncoming(ptr_175, label_tableswitch3_i_i9);
+ptr_282->addIncoming(ptr_158, label_JnJVM_org_mmtk_utility_alloc_Allocator_fillAlignmentGap__Lorg_vmmagic_unboxed_Address_2Lorg_vmmagic_unboxed_Address_2_exit_i_i_i);
+ptr_282->addIncoming(ptr_170, label_false_IFEQ_i_i_i);
+ptr_282->addIncoming(ptr_145, label_GOTO_or_IF__i_i_i);
+ptr_282->addIncoming(ptr_275, label_JnJVM_org_mmtk_utility_alloc_SegregatedFreeList_alloc__III_exit_i);
+ptr_282->addIncoming(ptr_273, label_GOTO_or_IF__i_i);
+
+CastInst* ptr_283 = new BitCastInst(ptr_282, PointerTy_3, "", label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit);
+ new StoreInst(ptr_283, ptr_res, false, label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit);
+std::vector ptr_285_indices;
+ptr_285_indices.push_back(const_int32_55);
+ptr_285_indices.push_back(const_int32_55);
+Instruction* ptr_285 = GetElementPtrInst::Create(ptr_282, ptr_285_indices.begin(), ptr_285_indices.end(), "", label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit);
+CastInst* ptr_VT_c_i_c = new BitCastInst(ptr__VT, PointerTy_26, "VT.c.i.c", label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit);
+ new StoreInst(ptr_VT_c_i_c, ptr_285, false, label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit);
+LoadInst* ptr_287 = new LoadInst(ptr_res, "", false, label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit);
+SwitchInst* void_288 = SwitchInst::Create(int32_retval_i, label_tableswitch_i_i, 7, label_JnJVM_org_mmtk_plan_marksweep_MSMutator_alloc__IIIII_exit);
+void_288->addCase(const_int32_55, label_false_IFNE_i);
+void_288->addCase(const_int32_57, label_tableswitch1_i_i);
+void_288->addCase(const_int32_53, label_tableswitch2_i_i);
+void_288->addCase(const_int32_59, label_tableswitch3_i_i);
+void_288->addCase(const_int32_60, label_tableswitch4_i_i);
+void_288->addCase(const_int32_61, label_tableswitch5_i_i);
+
+
+// Block tableswitch.i.i (label_tableswitch_i_i)
+CallInst* void_289 = CallInst::Create(func_abort, "", label_tableswitch_i_i);
+void_289->setCallingConv(CallingConv::C);
+void_289->setTailCall(false);AttrListPtr void_289_PAL;
+{
+ SmallVector Attrs;
+ AttributeWithIndex PAWI;
+ PAWI.Index = 4294967295U; PAWI.Attrs = 0 | Attribute::NoReturn | Attribute::NoUnwind;
+ Attrs.push_back(PAWI);
+ void_289_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
+
+}
+void_289->setAttributes(void_289_PAL);
+
+new UnreachableInst(mod->getContext(), label_tableswitch_i_i);
+
+// Block tableswitch1.i.i (label_tableswitch1_i_i)
+LoadInst* ptr_291 = new LoadInst(const_ptr_77, "", false, label_tableswitch1_i_i);
+CastInst* int32_292 = new PtrToIntInst(ptr_291, IntegerType::get(mod->getContext(), 32), "", label_tableswitch1_i_i);
+GetElementPtrInst* ptr_293 = GetElementPtrInst::Create(ptr_287, const_int32_50, "", label_tableswitch1_i_i);
+CastInst* ptr_294 = new BitCastInst(ptr_293, PointerTy_0, "", label_tableswitch1_i_i);
+LoadInst* int8_295 = new LoadInst(ptr_294, "", false, label_tableswitch1_i_i);
+BinaryOperator* int8_296 = BinaryOperator::Create(Instruction::And, int8_295, const_int8_78, "", label_tableswitch1_i_i);
+CastInst* int8_297 = new TruncInst(int32_292, IntegerType::get(mod->getContext(), 8), "", label_tableswitch1_i_i);
+BinaryOperator* int8_298 = BinaryOperator::Create(Instruction::Or, int8_296, int8_297, "", label_tableswitch1_i_i);
+ new StoreInst(int8_298, ptr_294, false, label_tableswitch1_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit, label_tableswitch1_i_i);
+
+// Block tableswitch2.i.i (label_tableswitch2_i_i)
+GetElementPtrInst* ptr_301 = GetElementPtrInst::Create(ptr_287, const_int32_50, "", label_tableswitch2_i_i);
+CastInst* ptr_302 = new BitCastInst(ptr_301, PointerTy_24, "", label_tableswitch2_i_i);
+LoadInst* int32_303 = new LoadInst(ptr_302, "", false, label_tableswitch2_i_i);
+BinaryOperator* int32_304 = BinaryOperator::Create(Instruction::And, int32_303, const_int32_57, "", label_tableswitch2_i_i);
+LoadInst* ptr_305 = new LoadInst(const_ptr_79, "", false, label_tableswitch2_i_i);
+CastInst* int32_306 = new PtrToIntInst(ptr_305, IntegerType::get(mod->getContext(), 32), "", label_tableswitch2_i_i);
+BinaryOperator* int32_307 = BinaryOperator::Create(Instruction::Or, int32_306, int32_304, "", label_tableswitch2_i_i);
+CastInst* ptr_308 = new BitCastInst(ptr_301, PointerTy_0, "", label_tableswitch2_i_i);
+CastInst* int8_trunc = new TruncInst(int32_303, IntegerType::get(mod->getContext(), 8), "trunc", label_tableswitch2_i_i);
+BinaryOperator* int8_309 = BinaryOperator::Create(Instruction::And, int8_trunc, const_int8_78, "", label_tableswitch2_i_i);
+CastInst* int8_310 = new TruncInst(int32_307, IntegerType::get(mod->getContext(), 8), "", label_tableswitch2_i_i);
+BinaryOperator* int8_311 = BinaryOperator::Create(Instruction::Or, int8_310, int8_309, "", label_tableswitch2_i_i);
+ new StoreInst(int8_311, ptr_308, false, label_tableswitch2_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit, label_tableswitch2_i_i);
+
+// Block tableswitch3.i.i (label_tableswitch3_i_i)
+LoadInst* ptr_314 = new LoadInst(const_ptr_80, "", false, label_tableswitch3_i_i);
+CastInst* int32_315 = new PtrToIntInst(ptr_314, IntegerType::get(mod->getContext(), 32), "", label_tableswitch3_i_i);
+BinaryOperator* int32_316 = BinaryOperator::Create(Instruction::Or, int32_315, const_int32_57, "", label_tableswitch3_i_i);
+GetElementPtrInst* ptr_317 = GetElementPtrInst::Create(ptr_287, const_int32_50, "", label_tableswitch3_i_i);
+CastInst* ptr_318 = new BitCastInst(ptr_317, PointerTy_0, "", label_tableswitch3_i_i);
+LoadInst* int8_319 = new LoadInst(ptr_318, "", false, label_tableswitch3_i_i);
+BinaryOperator* int8_320 = BinaryOperator::Create(Instruction::And, int8_319, const_int8_78, "", label_tableswitch3_i_i);
+CastInst* int8_321 = new TruncInst(int32_316, IntegerType::get(mod->getContext(), 8), "", label_tableswitch3_i_i);
+BinaryOperator* int8_322 = BinaryOperator::Create(Instruction::Or, int8_321, int8_320, "", label_tableswitch3_i_i);
+ new StoreInst(int8_322, ptr_318, false, label_tableswitch3_i_i);
+LoadInst* ptr_324 = new LoadInst(const_ptr_81, "", false, label_tableswitch3_i_i);
+CastInst* int32_325 = new PtrToIntInst(ptr_287, IntegerType::get(mod->getContext(), 32), "", label_tableswitch3_i_i);
+BinaryOperator* int32_326 = BinaryOperator::Create(Instruction::And, int32_325, const_int32_82, "", label_tableswitch3_i_i);
+CastInst* ptr_327 = new IntToPtrInst(int32_326, PointerTy_25, "", label_tableswitch3_i_i);
+std::vector ptr_328_indices;
+ptr_328_indices.push_back(const_int32_57);
+ptr_328_indices.push_back(const_int32_50);
+Instruction* ptr_328 = GetElementPtrInst::Create(ptr_324, ptr_328_indices.begin(), ptr_328_indices.end(), "", label_tableswitch3_i_i);
+LoadInst* ptr_329 = new LoadInst(ptr_328, "", false, label_tableswitch3_i_i);
+GetElementPtrInst* ptr_330 = GetElementPtrInst::Create(ptr_329, const_int32_70, "", label_tableswitch3_i_i);
+CastInst* ptr_331 = new BitCastInst(ptr_330, PointerTy_7, "", label_tableswitch3_i_i);
+LoadInst* ptr_332 = new LoadInst(ptr_331, "", false, label_tableswitch3_i_i);
+ICmpInst* int1_333 = new ICmpInst(*label_tableswitch3_i_i, ICmpInst::ICMP_EQ, ptr_332, const_ptr_52, "");
+BranchInst::Create(label_true_IF_NULL_i1_i_i3_i_i, label_true_IFNULL_i5_i_i6_i_i, int1_333, label_tableswitch3_i_i);
+
+// Block true IF*NULL.i1.i.i3.i.i (label_true_IF_NULL_i1_i_i3_i_i)
+std::vector ptr_335_indices;
+ptr_335_indices.push_back(const_int32_55);
+ptr_335_indices.push_back(const_int32_55);
+Instruction* ptr_335 = GetElementPtrInst::Create(ptr_327, ptr_335_indices.begin(), ptr_335_indices.end(), "", label_true_IF_NULL_i1_i_i3_i_i);
+ new StoreInst(const_ptr_83, ptr_335, false, label_true_IF_NULL_i1_i_i3_i_i);
+GetElementPtrInst* ptr_337 = GetElementPtrInst::Create(ptr_329, const_int32_61, "", label_true_IF_NULL_i1_i_i3_i_i);
+CastInst* ptr_338 = new BitCastInst(ptr_337, PointerTy_29, "", label_true_IF_NULL_i1_i_i3_i_i);
+LoadInst* ptr_339 = new LoadInst(ptr_338, "", false, label_true_IF_NULL_i1_i_i3_i_i);
+LoadInst* ptr_340 = new LoadInst(const_ptr_84, "", false, label_true_IF_NULL_i1_i_i3_i_i);
+CastInst* int32_341 = new PtrToIntInst(ptr_340, IntegerType::get(mod->getContext(), 32), "", label_true_IF_NULL_i1_i_i3_i_i);
+BinaryOperator* int32_342 = BinaryOperator::Create(Instruction::Add, int32_341, int32_326, "", label_true_IF_NULL_i1_i_i3_i_i);
+CastInst* ptr_343 = new IntToPtrInst(int32_342, PointerTy_29, "", label_true_IF_NULL_i1_i_i3_i_i);
+ new StoreInst(ptr_339, ptr_343, false, label_true_IF_NULL_i1_i_i3_i_i);
+LoadInst* ptr_345 = new LoadInst(ptr_338, "", false, label_true_IF_NULL_i1_i_i3_i_i);
+ICmpInst* int1_346 = new ICmpInst(*label_true_IF_NULL_i1_i_i3_i_i, ICmpInst::ICMP_EQ, ptr_345, const_ptr_76, "");
+BranchInst::Create(label_GOTO_or_IF_1_i3_i_i5_i_i, label_false_IFNE_i7_i_i8_i_i, int1_346, label_true_IF_NULL_i1_i_i3_i_i);
+
+// Block GOTO or IF*1.i3.i.i5.i.i (label_GOTO_or_IF_1_i3_i_i5_i_i)
+CastInst* ptr_348 = new BitCastInst(ptr_337, PointerTy_32, "", label_GOTO_or_IF_1_i3_i_i5_i_i);
+CastInst* ptr__c_i2_i_i4_i_i = new IntToPtrInst(int32_326, PointerTy_26, ".c.i2.i.i4.i.i", label_GOTO_or_IF_1_i3_i_i5_i_i);
+ new StoreInst(ptr__c_i2_i_i4_i_i, ptr_348, false, label_GOTO_or_IF_1_i3_i_i5_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit, label_true_IFNULL3_i8_i_i9_i_i, int1_333, label_GOTO_or_IF_1_i3_i_i5_i_i);
+
+// Block true IFNULL.i5.i.i6.i.i (label_true_IFNULL_i5_i_i6_i_i)
+GetElementPtrInst* ptr_351 = GetElementPtrInst::Create(ptr_332, const_int32_61, "", label_true_IFNULL_i5_i_i6_i_i);
+CastInst* ptr_352 = new BitCastInst(ptr_351, PointerTy_24, "", label_true_IFNULL_i5_i_i6_i_i);
+BranchInst::Create(label_bb2_i_i34_i, label_true_IFNULL_i5_i_i6_i_i);
+
+// Block bb.i.i32.i (label_bb_i_i32_i)
+Argument* fwdref_355 = new Argument(IntegerType::get(mod->getContext(), 1));
+BranchInst::Create(label_true_IF_NULL_i1_i_i3_i_i, label_bb1_i_i33_i, fwdref_355, label_bb_i_i32_i);
+
+// Block bb1.i.i33.i (label_bb1_i_i33_i)
+Argument* fwdref_357 = new Argument(IntegerType::get(mod->getContext(), 32));
+BinaryOperator* int32_356 = BinaryOperator::Create(Instruction::Add, fwdref_357, const_int32_50, "", label_bb1_i_i33_i);
+BranchInst::Create(label_bb2_i_i34_i, label_bb1_i_i33_i);
+
+// Block bb2.i.i34.i (label_bb2_i_i34_i)
+PHINode* int32_359 = PHINode::Create(IntegerType::get(mod->getContext(), 32), "", label_bb2_i_i34_i);
+int32_359->reserveOperandSpace(2);
+int32_359->addIncoming(const_int32_55, label_true_IFNULL_i5_i_i6_i_i);
+int32_359->addIncoming(int32_356, label_bb1_i_i33_i);
+
+ICmpInst* int1_360 = new ICmpInst(*label_bb2_i_i34_i, ICmpInst::ICMP_ULT, int32_359, const_int32_85, "");
+std::vector void_361_params;
+void_361_params.push_back(const_int1_86);
+void_361_params.push_back(const_int1_86);
+void_361_params.push_back(const_int1_86);
+void_361_params.push_back(const_int1_86);
+void_361_params.push_back(const_int1_86);
+CallInst* void_361 = CallInst::Create(func_llvm_memory_barrier, void_361_params.begin(), void_361_params.end(), "", label_bb2_i_i34_i);
+void_361->setCallingConv(CallingConv::C);
+void_361->setTailCall(false);AttrListPtr void_361_PAL;
+void_361->setAttributes(void_361_PAL);
+
+std::vector int32_362_params;
+int32_362_params.push_back(ptr_352);
+int32_362_params.push_back(const_int32_55);
+int32_362_params.push_back(const_int32_50);
+CallInst* int32_362 = CallInst::Create(func_llvm_atomic_cmp_swap_i32_p0i32, int32_362_params.begin(), int32_362_params.end(), "", label_bb2_i_i34_i);
+int32_362->setCallingConv(CallingConv::C);
+int32_362->setTailCall(false);AttrListPtr int32_362_PAL;
+int32_362->setAttributes(int32_362_PAL);
+
+std::vector void_363_params;
+void_363_params.push_back(const_int1_86);
+void_363_params.push_back(const_int1_86);
+void_363_params.push_back(const_int1_86);
+void_363_params.push_back(const_int1_86);
+void_363_params.push_back(const_int1_86);
+CallInst* void_363 = CallInst::Create(func_llvm_memory_barrier, void_363_params.begin(), void_363_params.end(), "", label_bb2_i_i34_i);
+void_363->setCallingConv(CallingConv::C);
+void_363->setTailCall(false);AttrListPtr void_363_PAL;
+void_363->setAttributes(void_363_PAL);
+
+ICmpInst* int1_364 = new ICmpInst(*label_bb2_i_i34_i, ICmpInst::ICMP_EQ, int32_362, const_int32_55, "");
+BranchInst::Create(label_bb_i_i32_i, label_bb4_preheader_i_i35_i, int1_360, label_bb2_i_i34_i);
+
+// Block bb4.preheader.i.i35.i (label_bb4_preheader_i_i35_i)
+BranchInst::Create(label_true_IF_NULL_i1_i_i3_i_i, label_bb3_i_i36_i, int1_364, label_bb4_preheader_i_i35_i);
+
+// Block bb3.i.i36.i (label_bb3_i_i36_i)
+CallInst* void_367 = CallInst::Create(func__ZN3mvm6Thread5yieldEv, "", label_bb3_i_i36_i);
+void_367->setCallingConv(CallingConv::C);
+void_367->setTailCall(false);AttrListPtr void_367_PAL;
+void_367->setAttributes(void_367_PAL);
+
+std::vector void_368_params;
+void_368_params.push_back(const_int1_86);
+void_368_params.push_back(const_int1_86);
+void_368_params.push_back(const_int1_86);
+void_368_params.push_back(const_int1_86);
+void_368_params.push_back(const_int1_86);
+CallInst* void_368 = CallInst::Create(func_llvm_memory_barrier, void_368_params.begin(), void_368_params.end(), "", label_bb3_i_i36_i);
+void_368->setCallingConv(CallingConv::C);
+void_368->setTailCall(false);AttrListPtr void_368_PAL;
+void_368->setAttributes(void_368_PAL);
+
+std::vector int32_369_params;
+int32_369_params.push_back(ptr_352);
+int32_369_params.push_back(const_int32_55);
+int32_369_params.push_back(const_int32_50);
+CallInst* int32_369 = CallInst::Create(func_llvm_atomic_cmp_swap_i32_p0i32, int32_369_params.begin(), int32_369_params.end(), "", label_bb3_i_i36_i);
+int32_369->setCallingConv(CallingConv::C);
+int32_369->setTailCall(false);AttrListPtr int32_369_PAL;
+int32_369->setAttributes(int32_369_PAL);
+
+std::vector void_370_params;
+void_370_params.push_back(const_int1_86);
+void_370_params.push_back(const_int1_86);
+void_370_params.push_back(const_int1_86);
+void_370_params.push_back(const_int1_86);
+void_370_params.push_back(const_int1_86);
+CallInst* void_370 = CallInst::Create(func_llvm_memory_barrier, void_370_params.begin(), void_370_params.end(), "", label_bb3_i_i36_i);
+void_370->setCallingConv(CallingConv::C);
+void_370->setTailCall(false);AttrListPtr void_370_PAL;
+void_370->setAttributes(void_370_PAL);
+
+ICmpInst* int1_371 = new ICmpInst(*label_bb3_i_i36_i, ICmpInst::ICMP_EQ, int32_369, const_int32_55, "");
+BranchInst::Create(label_true_IF_NULL_i1_i_i3_i_i, label_bb3_i_i36_i, int1_371, label_bb3_i_i36_i);
+
+// Block false IFNE.i7.i.i8.i.i (label_false_IFNE_i7_i_i8_i_i)
+std::vector ptr_373_indices;
+ptr_373_indices.push_back(const_int32_55);
+ptr_373_indices.push_back(const_int32_55);
+Instruction* ptr_373 = GetElementPtrInst::Create(ptr_345, ptr_373_indices.begin(), ptr_373_indices.end(), "", label_false_IFNE_i7_i_i8_i_i);
+CastInst* ptr__c1_i6_i_i7_i_i = new IntToPtrInst(int32_326, PointerTy_26, ".c1.i6.i.i7.i.i", label_false_IFNE_i7_i_i8_i_i);
+ new StoreInst(ptr__c1_i6_i_i7_i_i, ptr_373, false, label_false_IFNE_i7_i_i8_i_i);
+BranchInst::Create(label_GOTO_or_IF_1_i3_i_i5_i_i, label_false_IFNE_i7_i_i8_i_i);
+
+// Block true IFNULL3.i8.i.i9.i.i (label_true_IFNULL3_i8_i_i9_i_i)
+GetElementPtrInst* ptr_376 = GetElementPtrInst::Create(ptr_332, const_int32_61, "", label_true_IFNULL3_i8_i_i9_i_i);
+CastInst* ptr_377 = new BitCastInst(ptr_376, PointerTy_24, "", label_true_IFNULL3_i8_i_i9_i_i);
+ new StoreInst(const_int32_55, ptr_377, false, label_true_IFNULL3_i8_i_i9_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit, label_true_IFNULL3_i8_i_i9_i_i);
+
+// Block tableswitch4.i.i (label_tableswitch4_i_i)
+LoadInst* ptr_380 = new LoadInst(const_ptr_87, "", false, label_tableswitch4_i_i);
+CastInst* int32_381 = new PtrToIntInst(ptr_380, IntegerType::get(mod->getContext(), 32), "", label_tableswitch4_i_i);
+GetElementPtrInst* ptr_382 = GetElementPtrInst::Create(ptr_287, const_int32_50, "", label_tableswitch4_i_i);
+CastInst* ptr_383 = new BitCastInst(ptr_382, PointerTy_0, "", label_tableswitch4_i_i);
+LoadInst* int8_384 = new LoadInst(ptr_383, "", false, label_tableswitch4_i_i);
+BinaryOperator* int8_385 = BinaryOperator::Create(Instruction::And, int8_384, const_int8_78, "", label_tableswitch4_i_i);
+CastInst* int8_386 = new TruncInst(int32_381, IntegerType::get(mod->getContext(), 8), "", label_tableswitch4_i_i);
+BinaryOperator* int8_387 = BinaryOperator::Create(Instruction::Or, int8_385, int8_386, "", label_tableswitch4_i_i);
+ new StoreInst(int8_387, ptr_383, false, label_tableswitch4_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit, label_tableswitch4_i_i);
+
+// Block tableswitch5.i.i (label_tableswitch5_i_i)
+LoadInst* ptr_390 = new LoadInst(const_ptr_88, "", false, label_tableswitch5_i_i);
+CastInst* int32_391 = new PtrToIntInst(ptr_390, IntegerType::get(mod->getContext(), 32), "", label_tableswitch5_i_i);
+BinaryOperator* int32_392 = BinaryOperator::Create(Instruction::Or, int32_391, const_int32_57, "", label_tableswitch5_i_i);
+GetElementPtrInst* ptr_393 = GetElementPtrInst::Create(ptr_287, const_int32_50, "", label_tableswitch5_i_i);
+CastInst* ptr_394 = new BitCastInst(ptr_393, PointerTy_0, "", label_tableswitch5_i_i);
+LoadInst* int8_395 = new LoadInst(ptr_394, "", false, label_tableswitch5_i_i);
+BinaryOperator* int8_396 = BinaryOperator::Create(Instruction::And, int8_395, const_int8_78, "", label_tableswitch5_i_i);
+CastInst* int8_397 = new TruncInst(int32_392, IntegerType::get(mod->getContext(), 8), "", label_tableswitch5_i_i);
+BinaryOperator* int8_398 = BinaryOperator::Create(Instruction::Or, int8_397, int8_396, "", label_tableswitch5_i_i);
+ new StoreInst(int8_398, ptr_394, false, label_tableswitch5_i_i);
+LoadInst* ptr_400 = new LoadInst(const_ptr_89, "", false, label_tableswitch5_i_i);
+CastInst* int32_401 = new PtrToIntInst(ptr_287, IntegerType::get(mod->getContext(), 32), "", label_tableswitch5_i_i);
+BinaryOperator* int32_402 = BinaryOperator::Create(Instruction::And, int32_401, const_int32_82, "", label_tableswitch5_i_i);
+CastInst* ptr_403 = new IntToPtrInst(int32_402, PointerTy_25, "", label_tableswitch5_i_i);
+std::vector ptr_404_indices;
+ptr_404_indices.push_back(const_int32_57);
+ptr_404_indices.push_back(const_int32_50);
+Instruction* ptr_404 = GetElementPtrInst::Create(ptr_400, ptr_404_indices.begin(), ptr_404_indices.end(), "", label_tableswitch5_i_i);
+LoadInst* ptr_405 = new LoadInst(ptr_404, "", false, label_tableswitch5_i_i);
+GetElementPtrInst* ptr_406 = GetElementPtrInst::Create(ptr_405, const_int32_70, "", label_tableswitch5_i_i);
+CastInst* ptr_407 = new BitCastInst(ptr_406, PointerTy_7, "", label_tableswitch5_i_i);
+LoadInst* ptr_408 = new LoadInst(ptr_407, "", false, label_tableswitch5_i_i);
+ICmpInst* int1_409 = new ICmpInst(*label_tableswitch5_i_i, ICmpInst::ICMP_EQ, ptr_408, const_ptr_52, "");
+BranchInst::Create(label_true_IF_NULL_i1_i_i_i_i, label_true_IFNULL_i5_i_i_i_i, int1_409, label_tableswitch5_i_i);
+
+// Block true IF*NULL.i1.i.i.i.i (label_true_IF_NULL_i1_i_i_i_i)
+std::vector ptr_411_indices;
+ptr_411_indices.push_back(const_int32_55);
+ptr_411_indices.push_back(const_int32_55);
+Instruction* ptr_411 = GetElementPtrInst::Create(ptr_403, ptr_411_indices.begin(), ptr_411_indices.end(), "", label_true_IF_NULL_i1_i_i_i_i);
+ new StoreInst(const_ptr_83, ptr_411, false, label_true_IF_NULL_i1_i_i_i_i);
+GetElementPtrInst* ptr_413 = GetElementPtrInst::Create(ptr_405, const_int32_61, "", label_true_IF_NULL_i1_i_i_i_i);
+CastInst* ptr_414 = new BitCastInst(ptr_413, PointerTy_29, "", label_true_IF_NULL_i1_i_i_i_i);
+LoadInst* ptr_415 = new LoadInst(ptr_414, "", false, label_true_IF_NULL_i1_i_i_i_i);
+LoadInst* ptr_416 = new LoadInst(const_ptr_84, "", false, label_true_IF_NULL_i1_i_i_i_i);
+CastInst* int32_417 = new PtrToIntInst(ptr_416, IntegerType::get(mod->getContext(), 32), "", label_true_IF_NULL_i1_i_i_i_i);
+BinaryOperator* int32_418 = BinaryOperator::Create(Instruction::Add, int32_417, int32_402, "", label_true_IF_NULL_i1_i_i_i_i);
+CastInst* ptr_419 = new IntToPtrInst(int32_418, PointerTy_29, "", label_true_IF_NULL_i1_i_i_i_i);
+ new StoreInst(ptr_415, ptr_419, false, label_true_IF_NULL_i1_i_i_i_i);
+LoadInst* ptr_421 = new LoadInst(ptr_414, "", false, label_true_IF_NULL_i1_i_i_i_i);
+ICmpInst* int1_422 = new ICmpInst(*label_true_IF_NULL_i1_i_i_i_i, ICmpInst::ICMP_EQ, ptr_421, const_ptr_76, "");
+BranchInst::Create(label_GOTO_or_IF_1_i3_i_i_i_i, label_false_IFNE_i7_i_i_i_i, int1_422, label_true_IF_NULL_i1_i_i_i_i);
+
+// Block GOTO or IF*1.i3.i.i.i.i (label_GOTO_or_IF_1_i3_i_i_i_i)
+CastInst* ptr_424 = new BitCastInst(ptr_413, PointerTy_32, "", label_GOTO_or_IF_1_i3_i_i_i_i);
+CastInst* ptr__c_i2_i_i_i_i = new IntToPtrInst(int32_402, PointerTy_26, ".c.i2.i.i.i.i", label_GOTO_or_IF_1_i3_i_i_i_i);
+ new StoreInst(ptr__c_i2_i_i_i_i, ptr_424, false, label_GOTO_or_IF_1_i3_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit, label_true_IFNULL3_i8_i_i_i_i, int1_409, label_GOTO_or_IF_1_i3_i_i_i_i);
+
+// Block true IFNULL.i5.i.i.i.i (label_true_IFNULL_i5_i_i_i_i)
+GetElementPtrInst* ptr_427 = GetElementPtrInst::Create(ptr_408, const_int32_61, "", label_true_IFNULL_i5_i_i_i_i);
+CastInst* ptr_428 = new BitCastInst(ptr_427, PointerTy_24, "", label_true_IFNULL_i5_i_i_i_i);
+BranchInst::Create(label_bb2_i_i_i, label_true_IFNULL_i5_i_i_i_i);
+
+// Block bb.i.i.i (label_bb_i_i_i)
+Argument* fwdref_431 = new Argument(IntegerType::get(mod->getContext(), 1));
+BranchInst::Create(label_true_IF_NULL_i1_i_i_i_i, label_bb1_i_i_i, fwdref_431, label_bb_i_i_i);
+
+// Block bb1.i.i.i (label_bb1_i_i_i)
+Argument* fwdref_433 = new Argument(IntegerType::get(mod->getContext(), 32));
+BinaryOperator* int32_432 = BinaryOperator::Create(Instruction::Add, fwdref_433, const_int32_50, "", label_bb1_i_i_i);
+BranchInst::Create(label_bb2_i_i_i, label_bb1_i_i_i);
+
+// Block bb2.i.i.i (label_bb2_i_i_i)
+PHINode* int32_435 = PHINode::Create(IntegerType::get(mod->getContext(), 32), "", label_bb2_i_i_i);
+int32_435->reserveOperandSpace(2);
+int32_435->addIncoming(const_int32_55, label_true_IFNULL_i5_i_i_i_i);
+int32_435->addIncoming(int32_432, label_bb1_i_i_i);
+
+ICmpInst* int1_436 = new ICmpInst(*label_bb2_i_i_i, ICmpInst::ICMP_ULT, int32_435, const_int32_85, "");
+std::vector void_437_params;
+void_437_params.push_back(const_int1_86);
+void_437_params.push_back(const_int1_86);
+void_437_params.push_back(const_int1_86);
+void_437_params.push_back(const_int1_86);
+void_437_params.push_back(const_int1_86);
+CallInst* void_437 = CallInst::Create(func_llvm_memory_barrier, void_437_params.begin(), void_437_params.end(), "", label_bb2_i_i_i);
+void_437->setCallingConv(CallingConv::C);
+void_437->setTailCall(false);AttrListPtr void_437_PAL;
+void_437->setAttributes(void_437_PAL);
+
+std::vector int32_438_params;
+int32_438_params.push_back(ptr_428);
+int32_438_params.push_back(const_int32_55);
+int32_438_params.push_back(const_int32_50);
+CallInst* int32_438 = CallInst::Create(func_llvm_atomic_cmp_swap_i32_p0i32, int32_438_params.begin(), int32_438_params.end(), "", label_bb2_i_i_i);
+int32_438->setCallingConv(CallingConv::C);
+int32_438->setTailCall(false);AttrListPtr int32_438_PAL;
+int32_438->setAttributes(int32_438_PAL);
+
+std::vector void_439_params;
+void_439_params.push_back(const_int1_86);
+void_439_params.push_back(const_int1_86);
+void_439_params.push_back(const_int1_86);
+void_439_params.push_back(const_int1_86);
+void_439_params.push_back(const_int1_86);
+CallInst* void_439 = CallInst::Create(func_llvm_memory_barrier, void_439_params.begin(), void_439_params.end(), "", label_bb2_i_i_i);
+void_439->setCallingConv(CallingConv::C);
+void_439->setTailCall(false);AttrListPtr void_439_PAL;
+void_439->setAttributes(void_439_PAL);
+
+ICmpInst* int1_440 = new ICmpInst(*label_bb2_i_i_i, ICmpInst::ICMP_EQ, int32_438, const_int32_55, "");
+BranchInst::Create(label_bb_i_i_i, label_bb4_preheader_i_i_i, int1_436, label_bb2_i_i_i);
+
+// Block bb4.preheader.i.i.i (label_bb4_preheader_i_i_i)
+BranchInst::Create(label_true_IF_NULL_i1_i_i_i_i, label_bb3_i_i_i, int1_440, label_bb4_preheader_i_i_i);
+
+// Block bb3.i.i.i (label_bb3_i_i_i)
+CallInst* void_443 = CallInst::Create(func__ZN3mvm6Thread5yieldEv, "", label_bb3_i_i_i);
+void_443->setCallingConv(CallingConv::C);
+void_443->setTailCall(false);AttrListPtr void_443_PAL;
+void_443->setAttributes(void_443_PAL);
+
+std::vector void_444_params;
+void_444_params.push_back(const_int1_86);
+void_444_params.push_back(const_int1_86);
+void_444_params.push_back(const_int1_86);
+void_444_params.push_back(const_int1_86);
+void_444_params.push_back(const_int1_86);
+CallInst* void_444 = CallInst::Create(func_llvm_memory_barrier, void_444_params.begin(), void_444_params.end(), "", label_bb3_i_i_i);
+void_444->setCallingConv(CallingConv::C);
+void_444->setTailCall(false);AttrListPtr void_444_PAL;
+void_444->setAttributes(void_444_PAL);
+
+std::vector int32_445_params;
+int32_445_params.push_back(ptr_428);
+int32_445_params.push_back(const_int32_55);
+int32_445_params.push_back(const_int32_50);
+CallInst* int32_445 = CallInst::Create(func_llvm_atomic_cmp_swap_i32_p0i32, int32_445_params.begin(), int32_445_params.end(), "", label_bb3_i_i_i);
+int32_445->setCallingConv(CallingConv::C);
+int32_445->setTailCall(false);AttrListPtr int32_445_PAL;
+int32_445->setAttributes(int32_445_PAL);
+
+std::vector void_446_params;
+void_446_params.push_back(const_int1_86);
+void_446_params.push_back(const_int1_86);
+void_446_params.push_back(const_int1_86);
+void_446_params.push_back(const_int1_86);
+void_446_params.push_back(const_int1_86);
+CallInst* void_446 = CallInst::Create(func_llvm_memory_barrier, void_446_params.begin(), void_446_params.end(), "", label_bb3_i_i_i);
+void_446->setCallingConv(CallingConv::C);
+void_446->setTailCall(false);AttrListPtr void_446_PAL;
+void_446->setAttributes(void_446_PAL);
+
+ICmpInst* int1_447 = new ICmpInst(*label_bb3_i_i_i, ICmpInst::ICMP_EQ, int32_445, const_int32_55, "");
+BranchInst::Create(label_true_IF_NULL_i1_i_i_i_i, label_bb3_i_i_i, int1_447, label_bb3_i_i_i);
+
+// Block false IFNE.i7.i.i.i.i (label_false_IFNE_i7_i_i_i_i)
+std::vector ptr_449_indices;
+ptr_449_indices.push_back(const_int32_55);
+ptr_449_indices.push_back(const_int32_55);
+Instruction* ptr_449 = GetElementPtrInst::Create(ptr_421, ptr_449_indices.begin(), ptr_449_indices.end(), "", label_false_IFNE_i7_i_i_i_i);
+CastInst* ptr__c1_i6_i_i_i_i = new IntToPtrInst(int32_402, PointerTy_26, ".c1.i6.i.i.i.i", label_false_IFNE_i7_i_i_i_i);
+ new StoreInst(ptr__c1_i6_i_i_i_i, ptr_449, false, label_false_IFNE_i7_i_i_i_i);
+BranchInst::Create(label_GOTO_or_IF_1_i3_i_i_i_i, label_false_IFNE_i7_i_i_i_i);
+
+// Block true IFNULL3.i8.i.i.i.i (label_true_IFNULL3_i8_i_i_i_i)
+GetElementPtrInst* ptr_452 = GetElementPtrInst::Create(ptr_408, const_int32_61, "", label_true_IFNULL3_i8_i_i_i_i);
+CastInst* ptr_453 = new BitCastInst(ptr_452, PointerTy_24, "", label_true_IFNULL3_i8_i_i_i_i);
+ new StoreInst(const_int32_55, ptr_453, false, label_true_IFNULL3_i8_i_i_i_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit, label_true_IFNULL3_i8_i_i_i_i);
+
+// Block false IFNE.i (label_false_IFNE_i)
+LoadInst* ptr_456 = new LoadInst(const_ptr_90, "", false, label_false_IFNE_i);
+CastInst* int32_457 = new PtrToIntInst(ptr_456, IntegerType::get(mod->getContext(), 32), "", label_false_IFNE_i);
+GetElementPtrInst* ptr_458 = GetElementPtrInst::Create(ptr_287, const_int32_50, "", label_false_IFNE_i);
+CastInst* ptr_459 = new BitCastInst(ptr_458, PointerTy_0, "", label_false_IFNE_i);
+LoadInst* int8_460 = new LoadInst(ptr_459, "", false, label_false_IFNE_i);
+BinaryOperator* int8_461 = BinaryOperator::Create(Instruction::And, int8_460, const_int8_78, "", label_false_IFNE_i);
+CastInst* int8_462 = new TruncInst(int32_457, IntegerType::get(mod->getContext(), 8), "", label_false_IFNE_i);
+BinaryOperator* int8_463 = BinaryOperator::Create(Instruction::Or, int8_461, int8_462, "", label_false_IFNE_i);
+ new StoreInst(int8_463, ptr_459, false, label_false_IFNE_i);
+BranchInst::Create(label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit, label_false_IFNE_i);
+
+// Block JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II.exit (label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit)
+LoadInst* ptr_466 = new LoadInst(ptr_res, "", false, label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit);
+CastInst* ptr_467 = new BitCastInst(ptr_466, PointerTy_0, "", label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit);
+ReturnInst::Create(mod->getContext(), ptr_467, label_JnJVM_org_mmtk_plan_marksweep_MSMutator_postAlloc__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II_exit);
+
+// Resolve Forward References
+fwdref_355->replaceAllUsesWith(int1_364); delete fwdref_355;
+fwdref_433->replaceAllUsesWith(int32_435); delete fwdref_433;
+fwdref_357->replaceAllUsesWith(int32_359); delete fwdref_357;
+fwdref_431->replaceAllUsesWith(int1_440); delete fwdref_431;
+return func_gcmalloc;
+}
From nicolas.geoffray at lip6.fr Mon Mar 8 13:26:47 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Mon, 08 Mar 2010 21:26:47 -0000
Subject: [vmkit-commits] [vmkit] r97987 - in /vmkit/trunk: Makefile.rules
include/mvm/JIT.h lib/J3/Compiler/J3Intrinsics.cpp
lib/J3/Compiler/JavaAOTCompiler.cpp lib/J3/Compiler/JavaJITCompiler.cpp
lib/J3/Compiler/JavaLLVMCompiler.cpp lib/J3/Compiler/LLVMInfo.cpp
lib/Mvm/Compiler/InlineMalloc.cpp lib/Mvm/Compiler/JIT.cpp
tools/j3/Main.cpp tools/vmjc/vmjc.cpp tools/vmkit/Launcher.cpp
Message-ID: <20100308212647.93AB82A6C12C@llvm.org>
Author: geoffray
Date: Mon Mar 8 15:26:47 2010
New Revision: 97987
URL: http://llvm.org/viewvc/llvm-project?rev=97987&view=rev
Log:
Create a LLVMContext for each compiler created, hence for each class loader.
Modified:
vmkit/trunk/Makefile.rules
vmkit/trunk/include/mvm/JIT.h
vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp
vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp
vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp
vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp
vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
vmkit/trunk/lib/Mvm/Compiler/InlineMalloc.cpp
vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
vmkit/trunk/tools/j3/Main.cpp
vmkit/trunk/tools/vmjc/vmjc.cpp
vmkit/trunk/tools/vmkit/Launcher.cpp
Modified: vmkit/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.rules?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/Makefile.rules (original)
+++ vmkit/trunk/Makefile.rules Mon Mar 8 15:26:47 2010
@@ -137,6 +137,7 @@
$(Verb) $(LOPT) -load=$(LibDir)/MMTKMagic$(SHLIBEXT) -std-compile-opts -LowerJavaRT -f $(JARNAME).bc -o $(JARNAME)-optimized.bc
$(Verb) $(LLVMLD) -r -o $(LibDir)/FinalMMTk.bc $(LibDir)/MMTKAlloc.bc $(JARNAME)-optimized.bc $(LibDir)/MMTKRuntime.bc
$(Verb) $(LOPT) -std-compile-opts $(LibDir)/FinalMMTk.bc -o $(LibDir)/FinalMMTk.bc
+ #$(Verb) $(LLC) -march=cpp -cppgen=function -cppfor=gcmalloc $(LibDir)/FinalMMTk.bc -o $(PROJ_SRC_ROOT)/lib/Mvm/Compiler/MMTkInline.inc
endif
Modified: vmkit/trunk/include/mvm/JIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/JIT.h?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/JIT.h (original)
+++ vmkit/trunk/include/mvm/JIT.h Mon Mar 8 15:26:47 2010
@@ -200,7 +200,7 @@
static void copyDefinitions(llvm::Module* Dst, llvm::Module* Src);
- static void AddStandardCompilePasses();
+ static void addCommandLinePasses(llvm::FunctionPassManager* PM);
static const char* getHostTriple();
};
Modified: vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp Mon Mar 8 15:26:47 2010
@@ -33,74 +33,68 @@
J3Intrinsics::J3Intrinsics(llvm::Module* module) :
BaseIntrinsics(module) {
+ j3::llvm_runtime::makeLLVMModuleContents(module);
- llvm::Module* globalModule = mvm::MvmModule::globalModule;
-
- if (!globalModule->getTypeByName("JavaThread")) {
- j3::llvm_runtime::makeLLVMModuleContents(globalModule);
- mvm::MvmModule::copyDefinitions(module, globalModule);
- }
-
- VTType = PointerType::getUnqual(globalModule->getTypeByName("VT"));
+ VTType = PointerType::getUnqual(module->getTypeByName("VT"));
LLVMContext& Context = module->getContext();
#ifdef ISOLATE_SHARING
JnjvmType =
- PointerType::getUnqual(globalModule->getTypeByName("Jnjvm"));
+ PointerType::getUnqual(module->getTypeByName("Jnjvm"));
#endif
ConstantPoolType = ptrPtrType;
JavaObjectType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaObject"));
+ PointerType::getUnqual(module->getTypeByName("JavaObject"));
JavaArrayType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaArray"));
+ PointerType::getUnqual(module->getTypeByName("JavaArray"));
JavaCommonClassType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaCommonClass"));
+ PointerType::getUnqual(module->getTypeByName("JavaCommonClass"));
JavaClassPrimitiveType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaClassPrimitive"));
+ PointerType::getUnqual(module->getTypeByName("JavaClassPrimitive"));
JavaClassArrayType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaClassArray"));
+ PointerType::getUnqual(module->getTypeByName("JavaClassArray"));
JavaClassType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaClass"));
+ PointerType::getUnqual(module->getTypeByName("JavaClass"));
JavaArrayUInt8Type =
- PointerType::getUnqual(globalModule->getTypeByName("ArrayUInt8"));
+ PointerType::getUnqual(module->getTypeByName("ArrayUInt8"));
JavaArraySInt8Type =
- PointerType::getUnqual(globalModule->getTypeByName("ArraySInt8"));
+ PointerType::getUnqual(module->getTypeByName("ArraySInt8"));
JavaArrayUInt16Type =
- PointerType::getUnqual(globalModule->getTypeByName("ArrayUInt16"));
+ PointerType::getUnqual(module->getTypeByName("ArrayUInt16"));
JavaArraySInt16Type =
- PointerType::getUnqual(globalModule->getTypeByName("ArraySInt16"));
+ PointerType::getUnqual(module->getTypeByName("ArraySInt16"));
JavaArrayUInt32Type =
- PointerType::getUnqual(globalModule->getTypeByName("ArrayUInt32"));
+ PointerType::getUnqual(module->getTypeByName("ArrayUInt32"));
JavaArraySInt32Type =
- PointerType::getUnqual(globalModule->getTypeByName("ArraySInt32"));
+ PointerType::getUnqual(module->getTypeByName("ArraySInt32"));
JavaArrayLongType =
- PointerType::getUnqual(globalModule->getTypeByName("ArrayLong"));
+ PointerType::getUnqual(module->getTypeByName("ArrayLong"));
JavaArrayFloatType =
- PointerType::getUnqual(globalModule->getTypeByName("ArrayFloat"));
+ PointerType::getUnqual(module->getTypeByName("ArrayFloat"));
JavaArrayDoubleType =
- PointerType::getUnqual(globalModule->getTypeByName("ArrayDouble"));
+ PointerType::getUnqual(module->getTypeByName("ArrayDouble"));
JavaArrayObjectType =
- PointerType::getUnqual(globalModule->getTypeByName("ArrayObject"));
+ PointerType::getUnqual(module->getTypeByName("ArrayObject"));
JavaFieldType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaField"));
+ PointerType::getUnqual(module->getTypeByName("JavaField"));
JavaMethodType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaMethod"));
+ PointerType::getUnqual(module->getTypeByName("JavaMethod"));
UTF8Type =
- PointerType::getUnqual(globalModule->getTypeByName("UTF8"));
+ PointerType::getUnqual(module->getTypeByName("UTF8"));
AttributType =
- PointerType::getUnqual(globalModule->getTypeByName("Attribut"));
+ PointerType::getUnqual(module->getTypeByName("Attribut"));
JavaThreadType =
- PointerType::getUnqual(globalModule->getTypeByName("JavaThread"));
+ PointerType::getUnqual(module->getTypeByName("JavaThread"));
MutatorThreadType =
- PointerType::getUnqual(globalModule->getTypeByName("MutatorThread"));
+ PointerType::getUnqual(module->getTypeByName("MutatorThread"));
CodeLineInfoType =
- PointerType::getUnqual(globalModule->getTypeByName("CodeLineInfo"));
+ PointerType::getUnqual(module->getTypeByName("CodeLineInfo"));
JavaObjectNullConstant =
Constant::getNullValue(J3Intrinsics::JavaObjectType);
@@ -152,25 +146,6 @@
ClassReadyConstant = ConstantInt::get(Type::getInt8Ty(Context), ready);
- globalModule->addTypeName("JavaObject", JavaObjectType->getContainedType(0));
- globalModule->addTypeName("JavaArray", JavaArrayType->getContainedType(0));
- globalModule->addTypeName("JavaCommonClass",
- JavaCommonClassType->getContainedType(0));
- globalModule->addTypeName("JavaClass", JavaClassType->getContainedType(0));
- globalModule->addTypeName("JavaClassPrimitive",
- JavaClassPrimitiveType->getContainedType(0));
- globalModule->addTypeName("JavaClassArray",
- JavaClassArrayType->getContainedType(0));
- globalModule->addTypeName("ArrayUInt8", JavaArrayUInt8Type->getContainedType(0));
- globalModule->addTypeName("ArraySInt8", JavaArraySInt8Type->getContainedType(0));
- globalModule->addTypeName("ArrayUInt16", JavaArrayUInt16Type->getContainedType(0));
- globalModule->addTypeName("ArraySInt16", JavaArraySInt16Type->getContainedType(0));
- globalModule->addTypeName("ArraySInt32", JavaArraySInt32Type->getContainedType(0));
- globalModule->addTypeName("ArrayLong", JavaArrayLongType->getContainedType(0));
- globalModule->addTypeName("ArrayFloat", JavaArrayFloatType->getContainedType(0));
- globalModule->addTypeName("ArrayDouble", JavaArrayDoubleType->getContainedType(0));
- globalModule->addTypeName("ArrayObject", JavaArrayObjectType->getContainedType(0));
-
InterfaceLookupFunction = module->getFunction("j3InterfaceLookup");
MultiCallNewFunction = module->getFunction("j3MultiCallNew");
ForceLoadedCheckFunction = module->getFunction("forceLoadedCheck");
Modified: vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp Mon Mar 8 15:26:47 2010
@@ -354,7 +354,7 @@
Module& Mod = *getLLVMModule();
varGV = new GlobalVariable(Mod, Ty, false, GlobalValue::InternalLinkage,
- 0, "");
+ 0, "final object");
Constant* C = ConstantExpr::getBitCast(varGV,
JavaIntrinsics.JavaObjectType);
@@ -1592,7 +1592,8 @@
std::vector llvmArgs;
llvmArgs.push_back(JavaIntrinsics.ptrType); // class loader.
- const FunctionType* FTy = FunctionType::get(Type::getVoidTy(getLLVMContext()), llvmArgs, false);
+ const FunctionType* FTy = FunctionType::get(Type::getVoidTy(getLLVMContext()),
+ llvmArgs, false);
StaticInitializer = Function::Create(FTy, GlobalValue::InternalLinkage,
"Init", getLLVMModule());
@@ -1616,7 +1617,6 @@
"printJavaObject", getLLVMModule());
addJavaPasses();
-
}
void JavaAOTCompiler::printStats() {
Modified: vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp Mon Mar 8 15:26:47 2010
@@ -424,7 +424,6 @@
newArgv[1] = mainClass;
JavaJITCompiler* Comp = JavaJITCompiler::CreateCompiler("JITModule");
- mvm::MvmModule::AddStandardCompilePasses();
JnjvmClassLoader* JCL = mvm::VirtualMachine::initialiseJVM(Comp);
mvm::VirtualMachine* vm = mvm::VirtualMachine::createJVM(JCL);
vm->runApplication(argc + 1, newArgv);
Modified: vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp Mon Mar 8 15:26:47 2010
@@ -24,7 +24,7 @@
using namespace llvm;
JavaLLVMCompiler::JavaLLVMCompiler(const std::string& str) :
- TheModule(new llvm::Module(str, getGlobalContext())),
+ TheModule(new llvm::Module(str, *(new LLVMContext()))),
DebugFactory(new DIFactory(*TheModule)),
JavaIntrinsics(TheModule) {
@@ -70,7 +70,6 @@
mvm::MvmModule::runPasses(func, JavaNativeFunctionPasses);
} else {
jit.javaCompile();
- mvm::MvmModule::runPasses(func, mvm::MvmModule::globalFunctionPasses);
mvm::MvmModule::runPasses(func, JavaFunctionPasses);
}
func->setLinkage(GlobalValue::ExternalLinkage);
@@ -123,7 +122,7 @@
JavaNativeFunctionPasses->add(createLowerConstantCallsPass(getIntrinsics()));
JavaFunctionPasses = new FunctionPassManager(TheModule);
- JavaFunctionPasses->add(new TargetData(TheModule));
+ mvm::MvmModule::addCommandLinePasses(JavaFunctionPasses);
if (cooperativeGC)
JavaFunctionPasses->add(mvm::createLoopSafePointsPass());
Modified: vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp Mon Mar 8 15:26:47 2010
@@ -20,7 +20,6 @@
#include "mvm/JIT.h"
#include "JavaConstantPool.h"
-#include "JavaJIT.h"
#include "JavaString.h"
#include "JavaThread.h"
#include "JavaTypes.h"
@@ -28,7 +27,7 @@
#include "Jnjvm.h"
#include "Reader.h"
-#include "j3/JavaCompiler.h"
+#include "j3/JavaLLVMCompiler.h"
#include "j3/LLVMInfo.h"
#include
@@ -42,9 +41,7 @@
const TargetData* targetData = mvm::MvmModule::TheTargetData;
const StructLayout* sl = 0;
const StructType* structType = 0;
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)classDef->classLoader->getCompiler();
- LLVMContext& context = Mod->getLLVMModule()->getContext();
+ LLVMContext& context = Compiler->getLLVMModule()->getContext();
if (classDef->super) {
LLVMClassInfo* CLI = Compiler->getClassInfo(classDef->super);
@@ -53,9 +50,8 @@
for (uint32 i = 0; i < classDef->nbVirtualFields; ++i) {
JavaField& field = classDef->virtualFields[i];
- field.num = i + 1;
Typedef* type = field.getSignature();
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(type);
+ LLVMAssessorInfo& LAI = Compiler->getTypedefInfo(type);
fields.push_back(LAI.llvmType);
}
@@ -65,26 +61,30 @@
sl = targetData->getStructLayout(structType);
} else {
- virtualType = Mod->getIntrinsics()->JavaObjectType;
+ virtualType = Compiler->getIntrinsics()->JavaObjectType;
assert(virtualType && "intrinsics not iniitalized");
structType = dyn_cast(virtualType->getContainedType(0));
sl = targetData->getStructLayout(structType);
}
-
- for (uint32 i = 0; i < classDef->nbVirtualFields; ++i) {
- JavaField& field = classDef->virtualFields[i];
- field.ptrOffset = sl->getElementOffset(i + 1);
- }
-
uint64 size = mvm::MvmModule::getTypeSize(structType);
- classDef->virtualSize = (uint32)size;
- classDef->alignment = sl->getAlignment();
virtualSizeConstant = ConstantInt::get(Type::getInt32Ty(context), size);
+
+ // TODO: put that elsewhere.
+ if (Compiler == classDef->classLoader->getCompiler()) {
+ for (uint32 i = 0; i < classDef->nbVirtualFields; ++i) {
+ JavaField& field = classDef->virtualFields[i];
+ field.ptrOffset = sl->getElementOffset(i + 1);
+ field.num = i + 1;
+ }
+
+ classDef->virtualSize = (uint32)size;
+ classDef->alignment = sl->getAlignment();
- Mod->makeVT(classDef);
- Mod->makeIMT(classDef);
+ Compiler->makeVT(classDef);
+ Compiler->makeIMT(classDef);
+ }
}
return virtualType;
@@ -96,15 +96,12 @@
Class* cl = (Class*)classDef;
std::vector fields;
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)classDef->classLoader->getCompiler();
- LLVMContext& context = Mod->getLLVMModule()->getContext();
+ LLVMContext& context = Compiler->getLLVMModule()->getContext();
for (uint32 i = 0; i < classDef->nbStaticFields; ++i) {
JavaField& field = classDef->staticFields[i];
- field.num = i;
Typedef* type = field.getSignature();
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(type);
+ LLVMAssessorInfo& LAI = Compiler->getTypedefInfo(type);
fields.push_back(LAI.llvmType);
}
@@ -113,13 +110,17 @@
const TargetData* targetData = mvm::MvmModule::TheTargetData;
const StructLayout* sl = targetData->getStructLayout(structType);
- for (uint32 i = 0; i < classDef->nbStaticFields; ++i) {
- JavaField& field = classDef->staticFields[i];
- field.ptrOffset = sl->getElementOffset(i);
- }
+ // TODO: put that elsewhere.
+ if (Compiler == classDef->classLoader->getCompiler()) {
+ for (uint32 i = 0; i < classDef->nbStaticFields; ++i) {
+ JavaField& field = classDef->staticFields[i];
+ field.num = i;
+ field.ptrOffset = sl->getElementOffset(i);
+ }
- uint64 size = mvm::MvmModule::getTypeSize(structType);
- cl->staticSize = size;
+ uint64 size = mvm::MvmModule::getTypeSize(structType);
+ cl->staticSize = size;
+ }
}
return staticType;
}
@@ -158,25 +159,13 @@
memcpy(buf, "JnJVM", 5);
}
- methodFunction = Compiler->getLLVMModule()->getFunction(buf);
- if (!methodFunction) {
- methodFunction = Function::Create(getFunctionType(),
- GlobalValue::ExternalWeakLinkage, buf,
- Compiler->getLLVMModule());
- } else {
- assert(methodFunction->getFunctionType() == getFunctionType() &&
- "Type mismatch");
- if (methodFunction->isDeclaration()) {
- methodFunction->setLinkage(GlobalValue::ExternalWeakLinkage);
- }
- }
-
+ methodFunction = Function::Create(getFunctionType(),
+ GlobalValue::ExternalWeakLinkage, buf,
+ Compiler->getLLVMModule());
} else {
-
methodFunction = Function::Create(getFunctionType(),
GlobalValue::ExternalWeakLinkage,
"", Compiler->getLLVMModule());
-
}
if (Compiler->useCooperativeGC()) {
@@ -211,11 +200,9 @@
Constant* LLVMMethodInfo::getOffset() {
if (!offsetConstant) {
- JnjvmClassLoader* JCL = methodDef->classDef->classLoader;
- JavaLLVMCompiler* Mod = (JavaLLVMCompiler*)JCL->getCompiler();
- LLVMContext& context = Mod->getLLVMModule()->getContext();
+ LLVMContext& context = Compiler->getLLVMModule()->getContext();
- Mod->resolveVirtualClass(methodDef->classDef);
+ Compiler->resolveVirtualClass(methodDef->classDef);
offsetConstant = ConstantInt::get(Type::getInt32Ty(context),
methodDef->offset);
}
@@ -224,14 +211,12 @@
Constant* LLVMFieldInfo::getOffset() {
if (!offsetConstant) {
- JnjvmClassLoader* JCL = fieldDef->classDef->classLoader;
- JavaLLVMCompiler* Mod = (JavaLLVMCompiler*)JCL->getCompiler();
- LLVMContext& context = Mod->getLLVMModule()->getContext();
+ LLVMContext& context = Compiler->getLLVMModule()->getContext();
if (isStatic(fieldDef->access)) {
- Mod->resolveStaticClass(fieldDef->classDef);
+ Compiler->resolveStaticClass(fieldDef->classDef);
} else {
- Mod->resolveVirtualClass(fieldDef->classDef);
+ Compiler->resolveVirtualClass(fieldDef->classDef);
}
offsetConstant = ConstantInt::get(Type::getInt32Ty(context), fieldDef->num);
@@ -246,14 +231,12 @@
std::vector llvmArgs;
uint32 size = signature->nbArguments;
Typedef* const* arguments = signature->getArgumentsType();
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)signature->initialLoader->getCompiler();
- llvmArgs.push_back(Mod->getIntrinsics()->JavaObjectType);
+ llvmArgs.push_back(Compiler->getIntrinsics()->JavaObjectType);
for (uint32 i = 0; i < size; ++i) {
Typedef* type = arguments[i];
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(type);
+ LLVMAssessorInfo& LAI = Compiler->getTypedefInfo(type);
llvmArgs.push_back(LAI.llvmType);
}
@@ -261,7 +244,8 @@
llvmArgs.push_back(Mod->getIntrinsics()->ConstantPoolType);
#endif
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(signature->getReturnType());
+ LLVMAssessorInfo& LAI =
+ Compiler->getTypedefInfo(signature->getReturnType());
virtualType = FunctionType::get(LAI.llvmType, llvmArgs, false);
mvm::MvmModule::unprotectIR();
}
@@ -275,21 +259,20 @@
std::vector llvmArgs;
uint32 size = signature->nbArguments;
Typedef* const* arguments = signature->getArgumentsType();
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)signature->initialLoader->getCompiler();
for (uint32 i = 0; i < size; ++i) {
Typedef* type = arguments[i];
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(type);
+ LLVMAssessorInfo& LAI = Compiler->getTypedefInfo(type);
llvmArgs.push_back(LAI.llvmType);
}
#if defined(ISOLATE_SHARING)
// cached constant pool
- llvmArgs.push_back(Mod->getIntrinsics()->ConstantPoolType);
+ llvmArgs.push_back(Compiler->getIntrinsics()->ConstantPoolType);
#endif
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(signature->getReturnType());
+ LLVMAssessorInfo& LAI =
+ Compiler->getTypedefInfo(signature->getReturnType());
staticType = FunctionType::get(LAI.llvmType, llvmArgs, false);
mvm::MvmModule::unprotectIR();
}
@@ -303,20 +286,18 @@
std::vector llvmArgs;
uint32 size = signature->nbArguments;
Typedef* const* arguments = signature->getArgumentsType();
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)signature->initialLoader->getCompiler();
const llvm::Type* Ty =
- PointerType::getUnqual(Mod->getIntrinsics()->JavaObjectType);
+ PointerType::getUnqual(Compiler->getIntrinsics()->JavaObjectType);
- llvmArgs.push_back(Mod->getIntrinsics()->ptrType); // JNIEnv
+ llvmArgs.push_back(Compiler->getIntrinsics()->ptrType); // JNIEnv
llvmArgs.push_back(Ty); // Class
for (uint32 i = 0; i < size; ++i) {
Typedef* type = arguments[i];
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(type);
+ LLVMAssessorInfo& LAI = Compiler->getTypedefInfo(type);
const llvm::Type* Ty = LAI.llvmType;
- if (Ty == Mod->getIntrinsics()->JavaObjectType) {
+ if (Ty == Compiler->getIntrinsics()->JavaObjectType) {
llvmArgs.push_back(LAI.llvmTypePtr);
} else {
llvmArgs.push_back(LAI.llvmType);
@@ -325,12 +306,13 @@
#if defined(ISOLATE_SHARING)
// cached constant pool
- llvmArgs.push_back(Mod->getIntrinsics()->ConstantPoolType);
+ llvmArgs.push_back(Compiler->getIntrinsics()->ConstantPoolType);
#endif
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(signature->getReturnType());
+ LLVMAssessorInfo& LAI =
+ Compiler->getTypedefInfo(signature->getReturnType());
const llvm::Type* RetType =
- LAI.llvmType == Mod->getIntrinsics()->JavaObjectType ?
+ LAI.llvmType == Compiler->getIntrinsics()->JavaObjectType ?
LAI.llvmTypePtr : LAI.llvmType;
nativeType = FunctionType::get(RetType, llvmArgs, false);
mvm::MvmModule::unprotectIR();
@@ -343,24 +325,22 @@
std::vector Args;
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)signature->initialLoader->getCompiler();
- LLVMContext& context = Mod->getLLVMModule()->getContext();
- J3Intrinsics& Intrinsics = *Mod->getIntrinsics();
+ LLVMContext& context = Compiler->getLLVMModule()->getContext();
+ J3Intrinsics& Intrinsics = *Compiler->getIntrinsics();
Function* res = 0;
- if (Mod->isStaticCompiling()) {
+ if (Compiler->isStaticCompiling()) {
const char* type = virt ? "virtual_buf" : "static_buf";
char* buf = (char*)alloca((signature->keyName->size << 1) + 1 + 11);
signature->nativeName(buf, type);
res = Function::Create(virt ? getVirtualBufType() : getStaticBufType(),
GlobalValue::ExternalLinkage, buf,
- Mod->getLLVMModule());
+ Compiler->getLLVMModule());
} else {
res = Function::Create(virt ? getVirtualBufType() : getStaticBufType(),
GlobalValue::ExternalLinkage, "",
- Mod->getLLVMModule());
+ Compiler->getLLVMModule());
}
BasicBlock* currentBlock = BasicBlock::Create(context, "enter", res);
@@ -382,7 +362,7 @@
Typedef* const* arguments = signature->getArgumentsType();
for (uint32 i = 0; i < signature->nbArguments; ++i) {
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(arguments[i]);
+ LLVMAssessorInfo& LAI = Compiler->getTypedefInfo(arguments[i]);
Value* arg = new LoadInst(ptr, "", currentBlock);
if (arguments[i]->isReference()) {
@@ -406,7 +386,7 @@
currentBlock = endBlock;
arg = node;
} else if (arguments[i]->isFloat()) {
- arg = new TruncInst(arg, Mod->AssessorInfo[I_INT].llvmType,
+ arg = new TruncInst(arg, Compiler->AssessorInfo[I_INT].llvmType,
"", currentBlock);
arg = new BitCastInst(arg, LAI.llvmType, "", currentBlock);
} else if (arguments[i]->isDouble()) {
@@ -415,7 +395,7 @@
arg = new TruncInst(arg, LAI.llvmType, "", currentBlock);
}
Args.push_back(arg);
- ptr = GetElementPtrInst::Create(ptr, Mod->getIntrinsics()->constantOne,"",
+ ptr = GetElementPtrInst::Create(ptr, Intrinsics.constantOne,"",
currentBlock);
}
@@ -437,11 +417,9 @@
std::vector Args;
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)signature->initialLoader->getCompiler();
- J3Intrinsics& Intrinsics = *Mod->getIntrinsics();
+ J3Intrinsics& Intrinsics = *Compiler->getIntrinsics();
std::string name;
- if (Mod->isStaticCompiling()) {
+ if (Compiler->isStaticCompiling()) {
name += UTF8Buffer(signature->keyName).cString();
name += virt ? "virtual_ap" : "static_ap";
} else {
@@ -451,8 +429,8 @@
Function* res = Function::Create(virt ? getVirtualBufType() :
getStaticBufType(),
GlobalValue::InternalLinkage, name,
- Mod->getLLVMModule());
- LLVMContext& context = Mod->getLLVMModule()->getContext();
+ Compiler->getLLVMModule());
+ LLVMContext& context = Compiler->getLLVMModule()->getContext();
BasicBlock* currentBlock = BasicBlock::Create(context, "enter", res);
Function::arg_iterator i = res->arg_begin();
@@ -472,7 +450,7 @@
Typedef* const* arguments = signature->getArgumentsType();
for (uint32 i = 0; i < signature->nbArguments; ++i) {
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(arguments[i]);
+ LLVMAssessorInfo& LAI = Compiler->getTypedefInfo(arguments[i]);
Value* arg = new VAArgInst(ap, LAI.llvmType, "", currentBlock);
if (arguments[i]->isReference()) {
arg = new IntToPtrInst(arg, Intrinsics.JavaObjectType, "", currentBlock);
@@ -517,11 +495,9 @@
std::vector Args;
std::vector FunctionArgs;
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)signature->initialLoader->getCompiler();
- J3Intrinsics& Intrinsics = *Mod->getIntrinsics();
+ J3Intrinsics& Intrinsics = *Compiler->getIntrinsics();
std::string name;
- if (Mod->isStaticCompiling()) {
+ if (Compiler->isStaticCompiling()) {
name += UTF8Buffer(signature->keyName).cString();
name += virt ? "virtual_stub" : special ? "special_stub" : "static_stub";
} else {
@@ -531,8 +507,8 @@
Function* stub = Function::Create((virt || special) ? getVirtualType() :
getStaticType(),
GlobalValue::InternalLinkage, name,
- Mod->getLLVMModule());
- LLVMContext& context = Mod->getLLVMModule()->getContext();
+ Compiler->getLLVMModule());
+ LLVMContext& context = Compiler->getLLVMModule()->getContext();
BasicBlock* currentBlock = BasicBlock::Create(context, "enter", stub);
BasicBlock* endBlock = BasicBlock::Create(context, "end", stub);
@@ -551,7 +527,7 @@
for (; arg != stub->arg_end() ; ++arg) {
FunctionArgs.push_back(arg);
- if (Mod->useCooperativeGC()) {
+ if (Compiler->useCooperativeGC()) {
if (arg->getType() == Intrinsics.JavaObjectType) {
Value* GCArgs[2] = {
new BitCastInst(arg, Intrinsics.ptrPtrType, "", currentBlock),
@@ -620,13 +596,12 @@
// Lock here because we are called by arbitrary code
mvm::MvmModule::protectIR();
std::vector Args;
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)signature->initialLoader->getCompiler();
- Args.push_back(Mod->getIntrinsics()->ConstantPoolType); // ctp
+ Args.push_back(Compiler->getIntrinsics()->ConstantPoolType); // ctp
Args.push_back(getVirtualPtrType());
- Args.push_back(Mod->getIntrinsics()->JavaObjectType);
- Args.push_back(Mod->AssessorInfo[I_LONG].llvmTypePtr);
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(signature->getReturnType());
+ Args.push_back(Compiler->getIntrinsics()->JavaObjectType);
+ Args.push_back(Compiler->AssessorInfo[I_LONG].llvmTypePtr);
+ LLVMAssessorInfo& LAI =
+ Compiler->getTypedefInfo(signature->getReturnType());
virtualBufType = FunctionType::get(LAI.llvmType, Args, false);
mvm::MvmModule::unprotectIR();
}
@@ -637,13 +612,12 @@
if (!staticBufType) {
// Lock here because we are called by arbitrary code
mvm::MvmModule::protectIR();
- JavaLLVMCompiler* Mod =
- (JavaLLVMCompiler*)signature->initialLoader->getCompiler();
std::vector Args;
- Args.push_back(Mod->getIntrinsics()->ConstantPoolType); // ctp
+ Args.push_back(Compiler->getIntrinsics()->ConstantPoolType); // ctp
Args.push_back(getStaticPtrType());
- Args.push_back(Mod->AssessorInfo[I_LONG].llvmTypePtr);
- LLVMAssessorInfo& LAI = Mod->getTypedefInfo(signature->getReturnType());
+ Args.push_back(Compiler->AssessorInfo[I_LONG].llvmTypePtr);
+ LLVMAssessorInfo& LAI =
+ Compiler->getTypedefInfo(signature->getReturnType());
staticBufType = FunctionType::get(LAI.llvmType, Args, false);
mvm::MvmModule::unprotectIR();
}
@@ -656,7 +630,7 @@
mvm::MvmModule::protectIR();
if (!virtualBufFunction) {
virtualBufFunction = createFunctionCallBuf(true);
- if (!signature->initialLoader->getCompiler()->isStaticCompiling()) {
+ if (!Compiler->isStaticCompiling()) {
signature->setVirtualCallBuf((intptr_t)
mvm::MvmModule::executionEngine->getPointerToGlobal(virtualBufFunction));
// Now that it's compiled, we don't need the IR anymore
@@ -673,7 +647,7 @@
mvm::MvmModule::protectIR();
if (!virtualAPFunction) {
virtualAPFunction = createFunctionCallAP(true);
- if (!signature->initialLoader->getCompiler()->isStaticCompiling()) {
+ if (!Compiler->isStaticCompiling()) {
signature->setVirtualCallAP((intptr_t)
mvm::MvmModule::executionEngine->getPointerToGlobal(virtualAPFunction));
// Now that it's compiled, we don't need the IR anymore
@@ -690,7 +664,7 @@
mvm::MvmModule::protectIR();
if (!staticBufFunction) {
staticBufFunction = createFunctionCallBuf(false);
- if (!signature->initialLoader->getCompiler()->isStaticCompiling()) {
+ if (!Compiler->isStaticCompiling()) {
signature->setStaticCallBuf((intptr_t)
mvm::MvmModule::executionEngine->getPointerToGlobal(staticBufFunction));
// Now that it's compiled, we don't need the IR anymore
@@ -707,7 +681,7 @@
mvm::MvmModule::protectIR();
if (!staticAPFunction) {
staticAPFunction = createFunctionCallAP(false);
- if (!signature->initialLoader->getCompiler()->isStaticCompiling()) {
+ if (!Compiler->isStaticCompiling()) {
signature->setStaticCallAP((intptr_t)
mvm::MvmModule::executionEngine->getPointerToGlobal(staticAPFunction));
// Now that it's compiled, we don't need the IR anymore
@@ -724,7 +698,7 @@
mvm::MvmModule::protectIR();
if (!staticStubFunction) {
staticStubFunction = createFunctionStub(false, false);
- if (!signature->initialLoader->getCompiler()->isStaticCompiling()) {
+ if (!Compiler->isStaticCompiling()) {
signature->setStaticCallStub((intptr_t)
mvm::MvmModule::executionEngine->getPointerToGlobal(staticStubFunction));
// Now that it's compiled, we don't need the IR anymore
@@ -741,7 +715,7 @@
mvm::MvmModule::protectIR();
if (!specialStubFunction) {
specialStubFunction = createFunctionStub(true, false);
- if (!signature->initialLoader->getCompiler()->isStaticCompiling()) {
+ if (!Compiler->isStaticCompiling()) {
signature->setSpecialCallStub((intptr_t)
mvm::MvmModule::executionEngine->getPointerToGlobal(specialStubFunction));
// Now that it's compiled, we don't need the IR anymore
@@ -758,7 +732,7 @@
mvm::MvmModule::protectIR();
if (!virtualStubFunction) {
virtualStubFunction = createFunctionStub(false, true);
- if (!signature->initialLoader->getCompiler()->isStaticCompiling()) {
+ if (!Compiler->isStaticCompiling()) {
signature->setVirtualCallStub((intptr_t)
mvm::MvmModule::executionEngine->getPointerToGlobal(virtualStubFunction));
// Now that it's compiled, we don't need the IR anymore
@@ -814,8 +788,7 @@
PointerType::getUnqual(Type::getDoubleTy(getLLVMContext()));
AssessorInfo[I_DOUBLE].logSizeInBytesConstant = 3;
- AssessorInfo[I_TAB].llvmType = PointerType::getUnqual(
- mvm::MvmModule::globalModule->getTypeByName("JavaObject"));
+ AssessorInfo[I_TAB].llvmType = JavaIntrinsics.JavaObjectType;
AssessorInfo[I_TAB].llvmTypePtr =
PointerType::getUnqual(AssessorInfo[I_TAB].llvmType);
AssessorInfo[I_TAB].logSizeInBytesConstant = sizeof(JavaObject*) == 8 ? 3 : 2;
Modified: vmkit/trunk/lib/Mvm/Compiler/InlineMalloc.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/InlineMalloc.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/InlineMalloc.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/InlineMalloc.cpp Mon Mar 8 15:26:47 2010
@@ -41,8 +41,8 @@
bool InlineMalloc::runOnFunction(Function& F) {
- Function* Malloc = mvm::MvmModule::globalModule->getFunction("gcmalloc");
- if (Malloc->isDeclaration()) return false;
+ Function* Malloc = F.getParent()->getFunction("gcmalloc");
+ if (!Malloc || Malloc->isDeclaration()) return false;
bool Changed = false;
for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; BI++) {
BasicBlock *Cur = BI;
@@ -53,9 +53,8 @@
Instruction* CI = Call.getInstruction();
if (CI) {
Function* F = Call.getCalledFunction();
- if (F && F->getName() == "gcmalloc") {
+ if (F == Malloc) {
if (dyn_cast(Call.getArgument(0))) {
- Call.setCalledFunction(mvm::MvmModule::globalModule->getFunction("gcmalloc"));
Changed |= InlineFunction(Call, 0, mvm::MvmModule::TheTargetData);
break;
}
Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Mon Mar 8 15:26:47 2010
@@ -29,7 +29,8 @@
#include
#include
#include
-#include "llvm/Support/SourceMgr.h"
+#include
+#include
#include
#include
#include
@@ -55,6 +56,10 @@
namespace llvm_runtime {
#include "LLVMRuntime.inc"
}
+
+ namespace mmtk_runtime {
+ #include "MMTkInline.inc"
+ }
void linkVmkitGC();
}
@@ -109,7 +114,7 @@
void MvmModule::loadBytecodeFile(const std::string& str) {
SMDiagnostic Err;
- Module* M = ParseIRFile(str, Err, getGlobalContext());
+ Module* M = ParseIRFile(str, Err, globalModule->getContext());
if (M) {
M->setTargetTriple(getHostTriple());
Linker::LinkModules(globalModule, M, 0);
@@ -164,7 +169,6 @@
globalFunctionPasses = new FunctionPassManager(globalModule);
- mvm::llvm_runtime::makeLLVMModuleContents(globalModule);
//LLVMContext& Context = globalModule->getContext();
//MetadataTypeKind = Context.getMDKindID("HighLevelType");
@@ -325,7 +329,35 @@
module->setTargetTriple(MvmModule::globalModule->getTargetTriple());
LLVMContext& Context = module->getContext();
- MvmModule::copyDefinitions(module, MvmModule::globalModule);
+ if (MutatorThread::MMTkCollectorSize) {
+ // If we have found MMTk, read the gcmalloc function and set the address of
+ // global variables and functions used by gcmalloc.
+ mvm::mmtk_runtime::makeLLVMFunction(module);
+ if (MvmModule::executionEngine) {
+ for (Module::global_iterator i = module->global_begin(),
+ e = module->global_end(); i != e; ++i) {
+ if (i->isDeclaration()) {
+ GlobalVariable* GV =
+ MvmModule::globalModule->getGlobalVariable(i->getName(), true);
+ assert(GV && "GV can not be found");
+ void* ptr = MvmModule::executionEngine->getPointerToGlobal(GV);
+ MvmModule::executionEngine->updateGlobalMapping(i, ptr);
+ }
+ }
+ for (Module::iterator i = module->begin(), e = module->end();
+ i != e; ++i) {
+ if (i->isDeclaration() && !i->isIntrinsic()) {
+ Function* F =
+ MvmModule::globalModule->getFunction(i->getName());
+ assert(F && "Function can not be found");
+ void* ptr = MvmModule::executionEngine->getPointerToFunction(F);
+ MvmModule::executionEngine->updateGlobalMapping(i, ptr);
+ }
+ }
+ }
+ }
+ mvm::llvm_runtime::makeLLVMModuleContents(module);
+
// Type declaration
ptrType = PointerType::getUnqual(Type::getInt8Ty(Context));
@@ -454,6 +486,8 @@
assert(AllocateUnresolvedFunction && "No allocateUnresolved function");
AddFinalizationCandidate = module->getFunction("addFinalizationCandidate");
assert(AddFinalizationCandidate && "No addFinalizationCandidate function");
+
+ MvmModule::copyDefinitions(module, MvmModule::globalModule);
}
const llvm::TargetData* MvmModule::TheTargetData;
@@ -485,10 +519,6 @@
PM->add(P);
}
-namespace mvm {
- llvm::FunctionPass* createInlineMallocPass();
-}
-
// This is equivalent to:
// opt -simplifycfg -mem2reg -instcombine -jump-threading -simplifycfg
// -scalarrepl -instcombine -condprop -simplifycfg -predsimplify
@@ -496,17 +526,8 @@
// -instcombine -gvn -sccp -simplifycfg -instcombine -condprop -dse -adce
// -simplifycfg
//
-void MvmModule::AddStandardCompilePasses() {
- FunctionPassManager* PM = globalFunctionPasses;
- PM->add(new TargetData(*MvmModule::TheTargetData));
-
- addPass(PM, createVerifierPass()); // Verify that input is correct
-
-#ifdef WITH_MMTK
- addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
- addPass(PM, createInlineMallocPass());
-#endif
-
+static void AddStandardCompilePasses(FunctionPassManager* PM) {
+
addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
addPass(PM, createPromoteMemoryToRegisterPass());// Kill useless allocas
@@ -538,10 +559,68 @@
addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores
addPass(PM, createAggressiveDCEPass()); // Delete dead instructions
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
+}
+static cl::opt
+DisableOptimizations("disable-opt",
+ cl::desc("Do not run any optimization passes"));
+
+cl::opt
+StandardCompileOpts("std-compile-opts",
+ cl::desc("Include the standard compile time optimizations"));
- PM->doInitialization();
+// The OptimizationList is automatically populated with registered Passes by the
+// PassNameParser.
+//
+static llvm::cl::list
+PassList(llvm::cl::desc("Optimizations available:"));
+
+namespace mvm {
+ llvm::FunctionPass* createInlineMallocPass();
+}
+
+void MvmModule::addCommandLinePasses(FunctionPassManager* PM) {
+ addPass(PM, new TargetData(*MvmModule::TheTargetData));
+
+ addPass(PM, createVerifierPass()); // Verify that input is correct
+
+#ifdef WITH_MMTK
+ addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
+ addPass(PM, createInlineMallocPass());
+#endif
+ // Create a new optimization pass for each one specified on the command line
+ for (unsigned i = 0; i < PassList.size(); ++i) {
+ // Check to see if -std-compile-opts was specified before this option. If
+ // so, handle it.
+ if (StandardCompileOpts &&
+ StandardCompileOpts.getPosition() < PassList.getPosition(i)) {
+ if (!DisableOptimizations) AddStandardCompilePasses(PM);
+ StandardCompileOpts = false;
+ }
+
+ const PassInfo *PassInf = PassList[i];
+ Pass *P = 0;
+ if (PassInf->getNormalCtor())
+ P = PassInf->getNormalCtor()();
+ else
+ errs() << "cannot create pass: "
+ << PassInf->getPassName() << "\n";
+ if (P) {
+ bool isModulePass = (P->getPassKind() == PT_Module);
+ if (isModulePass)
+ errs() << "vmkit does not support module pass: "
+ << PassInf->getPassName() << "\n";
+ else addPass(PM, P);
+
+ }
+ }
+
+ // If -std-compile-opts was specified at the end of the pass list, add them.
+ if (StandardCompileOpts) {
+ AddStandardCompilePasses(PM);
+ }
+ PM->doInitialization();
}
// We protect the creation of IR with the executionEngine lock because
@@ -560,53 +639,26 @@
void MvmModule::copyDefinitions(Module* Dst, Module* Src) {
- // Loop over all of the functions in the src module, mapping them over
- for (Module::const_iterator I = Src->begin(), E = Src->end(); I != E; ++I) {
- const Function *SF = I; // SrcFunction
- if (SF->isDeclaration()) {
- Function* F = Function::Create(SF->getFunctionType(),
- GlobalValue::ExternalLinkage,
- SF->getName(), Dst);
- F->setAttributes(SF->getAttributes());
- }
- }
-
Function* SF = Src->getFunction("gcmalloc");
- if (SF && !SF->isDeclaration()) {
- Function* F = Function::Create(SF->getFunctionType(),
- GlobalValue::ExternalLinkage,
- SF->getName(), Dst);
- F->setAttributes(SF->getAttributes());
- if (executionEngine) {
- void* ptr = executionEngine->getPointerToFunction(SF);
- executionEngine->updateGlobalMapping(F, ptr);
- }
+ Function* DF = Dst->getFunction("gcmalloc");
+ if (SF && DF && executionEngine && !SF->isDeclaration()) {
+ void* ptr = executionEngine->getPointerToFunction(SF);
+ executionEngine->updateGlobalMapping(DF, ptr);
}
SF = Src->getFunction("gcmallocUnresolved");
- if (SF && !SF->isDeclaration()) {
- Function* F = Function::Create(SF->getFunctionType(),
- GlobalValue::ExternalLinkage,
- SF->getName(), Dst);
- F->setAttributes(SF->getAttributes());
- if (executionEngine) {
- void* ptr = executionEngine->getPointerToFunction(SF);
- executionEngine->updateGlobalMapping(F, ptr);
- }
+ DF = Dst->getFunction("gcmallocUnresolved");
+ if (SF && DF && executionEngine && !SF->isDeclaration()) {
+ void* ptr = executionEngine->getPointerToFunction(SF);
+ executionEngine->updateGlobalMapping(DF, ptr);
}
SF = Src->getFunction("addFinalizationCandidate");
- if (SF && !SF->isDeclaration()) {
- Function* F = Function::Create(SF->getFunctionType(),
- GlobalValue::ExternalLinkage,
- SF->getName(), Dst);
- F->setAttributes(SF->getAttributes());
- if (executionEngine) {
- void* ptr = executionEngine->getPointerToFunction(SF);
- executionEngine->updateGlobalMapping(F, ptr);
- }
+ DF = Dst->getFunction("addFinalizationCandidate");
+ if (SF && DF && executionEngine && !SF->isDeclaration()) {
+ void* ptr = executionEngine->getPointerToFunction(SF);
+ executionEngine->updateGlobalMapping(DF, ptr);
}
-
}
void JITMethodInfo::scan(void* TL, void* ip, void* addr) {
Modified: vmkit/trunk/tools/j3/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/j3/Main.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/tools/j3/Main.cpp (original)
+++ vmkit/trunk/tools/j3/Main.cpp Mon Mar 8 15:26:47 2010
@@ -17,8 +17,10 @@
#include "../../lib/J3/VMCore/JnjvmClassLoader.h"
#include "../../lib/J3/VMCore/Jnjvm.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
+extern llvm::cl::opt StandardCompileOpts;
using namespace j3;
using namespace mvm;
@@ -31,7 +33,7 @@
Collector::initialise();
// Tell the compiler to run all optimizations.
- MvmModule::AddStandardCompilePasses();
+ StandardCompileOpts = true;
// Create the allocator that will allocate the bootstrap loader and the JVM.
mvm::BumpPtrAllocator Allocator;
Modified: vmkit/trunk/tools/vmjc/vmjc.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/vmjc/vmjc.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/tools/vmjc/vmjc.cpp (original)
+++ vmkit/trunk/tools/vmjc/vmjc.cpp Mon Mar 8 15:26:47 2010
@@ -74,22 +74,6 @@
static cl::opt
DisableOutput("disable-output", cl::desc("Disable output"), cl::init(false));
-
-// The OptimizationList is automatically populated with registered Passes by the
-// PassNameParser.
-//
-static llvm::cl::list
-PassList(llvm::cl::desc("Optimizations available:"));
-
-
-static cl::opt
-DisableOptimizations("disable-opt",
- cl::desc("Do not run any optimization passes"));
-
-static cl::opt
-StandardCompileOpts("std-compile-opts",
- cl::desc("Include the standard compile time optimizations"));
-
static cl::opt
TargetTriple("mtriple", cl::desc("Override target triple for module"));
@@ -122,53 +106,6 @@
WithClinit("with-clinit", cl::desc("Classes to clinit"), cl::ZeroOrMore,
cl::CommaSeparated);
-
-inline void addPass(FunctionPassManager *PM, Pass *P) {
- // Add the pass to the pass manager...
- PM->add(P);
-}
-
-
-void addCommandLinePass(char** argv) {
- FunctionPassManager* Passes = mvm::MvmModule::globalFunctionPasses;
- Passes->add(new TargetData(*mvm::MvmModule::TheTargetData));
-
- // Create a new optimization pass for each one specified on the command line
- for (unsigned i = 0; i < PassList.size(); ++i) {
- // Check to see if -std-compile-opts was specified before this option. If
- // so, handle it.
- if (StandardCompileOpts &&
- StandardCompileOpts.getPosition() < PassList.getPosition(i)) {
- if (!DisableOptimizations) mvm::MvmModule::AddStandardCompilePasses();
- StandardCompileOpts = false;
- }
-
- const PassInfo *PassInf = PassList[i];
- Pass *P = 0;
- if (PassInf->getNormalCtor())
- P = PassInf->getNormalCtor()();
- else
- errs() << argv[0] << ": cannot create pass: "
- << PassInf->getPassName() << "\n";
- if (P) {
- bool isModulePass = (P->getPassKind() == PT_Module);
- if (isModulePass)
- errs() << argv[0] << ": vmkit does not support module pass: "
- << PassInf->getPassName() << "\n";
- else addPass(Passes, P);
-
- }
- }
-
- // If -std-compile-opts was specified at the end of the pass list, add them.
- if (StandardCompileOpts) {
- mvm::MvmModule::AddStandardCompilePasses();
- }
-
- Passes->doInitialization();
-}
-
-
int main(int argc, char **argv) {
llvm_shutdown_obj X; // Call llvm_shutdown() on exit.
try {
@@ -243,7 +180,6 @@
mvm::Collector::initialise();
JnjvmClassLoader* JCL = mvm::VirtualMachine::initialiseJVM(Comp, false);
- addCommandLinePass(argv);
if (DisableExceptions) Comp->disableExceptions();
if (DisableStubs) Comp->generateStubs = false;
Modified: vmkit/trunk/tools/vmkit/Launcher.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/vmkit/Launcher.cpp?rev=97987&r1=97986&r2=97987&view=diff
==============================================================================
--- vmkit/trunk/tools/vmkit/Launcher.cpp (original)
+++ vmkit/trunk/tools/vmkit/Launcher.cpp Mon Mar 8 15:26:47 2010
@@ -36,14 +36,6 @@
Interactive, RunJava, RunNet
};
-// The OptimizationList is automatically populated with registered Passes by the
-// PassNameParser.
-//
-static llvm::cl::list
-PassList(llvm::cl::desc("Optimizations available:"));
-
-
-
static llvm::cl::opt VMToRun(llvm::cl::desc("Choose VM to run:"),
llvm::cl::values(
clEnumValN(Interactive , "i", "Run in interactive mode"),
@@ -56,59 +48,6 @@
"potentially sacrificing code quality"),
cl::init(false));
-static cl::opt
-DisableOptimizations("disable-opt",
- cl::desc("Do not run any optimization passes"));
-
-static cl::opt
-StandardCompileOpts("std-compile-opts",
- cl::desc("Include the standard compile time optimizations"));
-
-inline void addPass(FunctionPassManager *PM, Pass *P) {
- // Add the pass to the pass manager...
- PM->add(P);
-}
-
-
-void addCommandLinePass(char** argv) {
- FunctionPassManager* Passes = mvm::MvmModule::globalFunctionPasses;
-
- Passes->add(new TargetData(*mvm::MvmModule::TheTargetData));
- // Create a new optimization pass for each one specified on the command line
- for (unsigned i = 0; i < PassList.size(); ++i) {
- // Check to see if -std-compile-opts was specified before this option. If
- // so, handle it.
- if (StandardCompileOpts &&
- StandardCompileOpts.getPosition() < PassList.getPosition(i)) {
- if (!DisableOptimizations) mvm::MvmModule::AddStandardCompilePasses();
- StandardCompileOpts = false;
- }
-
- const PassInfo *PassInf = PassList[i];
- Pass *P = 0;
- if (PassInf->getNormalCtor())
- P = PassInf->getNormalCtor()();
- else
- errs() << argv[0] << ": cannot create pass: "
- << PassInf->getPassName() << "\n";
- if (P) {
- bool isModulePass = (P->getPassKind() == PT_Module);
- if (isModulePass)
- errs() << argv[0] << ": vmkit does not support module pass: "
- << PassInf->getPassName() << "\n";
- else addPass(Passes, P);
-
- }
- }
-
- // If -std-compile-opts was specified at the end of the pass list, add them.
- if (StandardCompileOpts) {
- mvm::MvmModule::AddStandardCompilePasses();
- }
- Passes->doInitialization();
-
-}
-
int found(char** argv, int argc, const char* name) {
int i = 1;
for (; i < argc; i++) {
@@ -141,7 +80,6 @@
#if WITH_J3
JavaJITCompiler* Comp = JavaJITCompiler::CreateCompiler("JITModule");
JnjvmClassLoader* JCL = mvm::VirtualMachine::initialiseJVM(Comp);
- addCommandLinePass(argv);
mvm::VirtualMachine* vm = mvm::VirtualMachine::createJVM(JCL);
vm->runApplication(argc, argv);
vm->waitForExit();
@@ -158,7 +96,6 @@
#if WITH_J3
JavaJITCompiler* Comp = JavaJITCompiler::CreateCompiler("JITModule");
JnjvmClassLoader* JCL = mvm::VirtualMachine::initialiseJVM(Comp);
- addCommandLinePass(argv);
MyCl.vmlets["java"] = (create_vm_t)(mvm::VirtualMachine::createJVM);
MyCl.compilers["java"] = (mvm::Object*)JCL;
#endif
From nicolas.geoffray at lip6.fr Fri Mar 12 13:10:34 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Fri, 12 Mar 2010 21:10:34 -0000
Subject: [vmkit-commits] [vmkit] r98389 -
/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
Message-ID: <20100312211034.6743B2A6C12E@llvm.org>
Author: geoffray
Date: Fri Mar 12 15:10:34 2010
New Revision: 98389
URL: http://llvm.org/viewvc/llvm-project?rev=98389&view=rev
Log:
Fix build.
Modified:
vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=98389&r1=98388&r2=98389&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Fri Mar 12 15:10:34 2010
@@ -329,6 +329,7 @@
module->setTargetTriple(MvmModule::globalModule->getTargetTriple());
LLVMContext& Context = module->getContext();
+#ifdef WITH_MMTK
if (MutatorThread::MMTkCollectorSize) {
// If we have found MMTk, read the gcmalloc function and set the address of
// global variables and functions used by gcmalloc.
@@ -356,6 +357,7 @@
}
}
}
+#endif
mvm::llvm_runtime::makeLLVMModuleContents(module);
From nicolas.geoffray at lip6.fr Sun Mar 14 14:51:18 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sun, 14 Mar 2010 21:51:18 -0000
Subject: [vmkit-commits] [vmkit] r98515 - in /vmkit/trunk/lib/J3/Classpath:
ClasspathConstructor.inc ClasspathMethod.inc
Message-ID: <20100314215118.AA03E2A6C12C@llvm.org>
Author: geoffray
Date: Sun Mar 14 16:51:18 2010
New Revision: 98515
URL: http://llvm.org/viewvc/llvm-project?rev=98515&view=rev
Log:
Initialize the buffer with null.
Modified:
vmkit/trunk/lib/J3/Classpath/ClasspathConstructor.inc
vmkit/trunk/lib/J3/Classpath/ClasspathMethod.inc
Modified: vmkit/trunk/lib/J3/Classpath/ClasspathConstructor.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Classpath/ClasspathConstructor.inc?rev=98515&r1=98514&r2=98515&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Classpath/ClasspathConstructor.inc (original)
+++ vmkit/trunk/lib/J3/Classpath/ClasspathConstructor.inc Sun Mar 14 16:51:18 2010
@@ -97,6 +97,7 @@
// Allocate a buffer to store the arguments.
jvalue* buf = size ? (jvalue*)alloca(size * sizeof(jvalue)) : 0;
+ if (size) memset(buf, 0, size * sizeof(jvalue));
if (nbArgs == size) {
UserCommonClass* _cl = UserCommonClass::resolvedImplClass(vm, Clazz, false);
Modified: vmkit/trunk/lib/J3/Classpath/ClasspathMethod.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Classpath/ClasspathMethod.inc?rev=98515&r1=98514&r2=98515&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Classpath/ClasspathMethod.inc (original)
+++ vmkit/trunk/lib/J3/Classpath/ClasspathMethod.inc Sun Mar 14 16:51:18 2010
@@ -116,6 +116,7 @@
sint32 size = sign->nbArguments;
jvalue* buf = size ? (jvalue*)alloca(size * sizeof(jvalue)) : 0;
+ if (size) memset(buf, 0, size * sizeof(jvalue));
if (nbArgs == size) {
UserCommonClass* _cl = UserCommonClass::resolvedImplClass(vm, Cl, false);
From nicolas.geoffray at lip6.fr Sun Mar 14 14:52:21 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sun, 14 Mar 2010 21:52:21 -0000
Subject: [vmkit-commits] [vmkit] r98516 -
/vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp
Message-ID: <20100314215221.47A032A6C12C@llvm.org>
Author: geoffray
Date: Sun Mar 14 16:52:21 2010
New Revision: 98516
URL: http://llvm.org/viewvc/llvm-project?rev=98516&view=rev
Log:
No need to delete the materializer, the module will.
Modified:
vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp
Modified: vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp?rev=98516&r1=98515&r2=98516&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp Sun Mar 14 16:52:21 2010
@@ -33,7 +33,7 @@
}
JavaLLVMLazyJITCompiler::~JavaLLVMLazyJITCompiler() {
- delete TheMaterializer;
+ // The module already destroys the materializer.
}
void* JavaLLVMLazyJITCompiler::loadMethod(void* handle, const char* symbol) {
From nicolas.geoffray at lip6.fr Sun Mar 14 14:54:57 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sun, 14 Mar 2010 21:54:57 -0000
Subject: [vmkit-commits] [vmkit] r98517 -
/vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp
Message-ID: <20100314215457.22E032A6C12C@llvm.org>
Author: geoffray
Date: Sun Mar 14 16:54:56 2010
New Revision: 98517
URL: http://llvm.org/viewvc/llvm-project?rev=98517&view=rev
Log:
Lookup the GC info instead of getting the first one.
Modified:
vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp
Modified: vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp?rev=98517&r1=98516&r2=98517&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp Sun Mar 14 16:54:56 2010
@@ -82,12 +82,14 @@
mvm::BumpPtrAllocator& Alloc =
currentCompiledMethod->classDef->classLoader->allocator;
llvm::GCFunctionInfo* GFI = 0;
- // We know the last GC info is for this method.
if (F.hasGC()) {
GCStrategy::iterator I = mvm::MvmModule::TheGCStrategy->end();
I--;
- DEBUG(errs() << (*I)->getFunction().getName() << '\n');
- DEBUG(errs() << F.getName() << '\n');
+ // TODO: see why this is not true in a non- LLVM lazy mode.
+ while (&(*I)->getFunction() != &F) {
+ assert(I != mvm::MvmModule::TheGCStrategy->begin() && "No GC info");
+ I--;
+ }
assert(&(*I)->getFunction() == &F &&
"GC Info and method do not correspond");
GFI = *I;
@@ -116,6 +118,7 @@
}
void setCurrentCompiledMethod(JavaMethod* meth, llvm::Function* func) {
+ assert(currentCompiledMethod == NULL && "Recursive compilation detected");
currentCompiledMethod = meth;
currentCompiledFunction = func;
}
From nicolas.geoffray at lip6.fr Sun Mar 14 14:59:30 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sun, 14 Mar 2010 21:59:30 -0000
Subject: [vmkit-commits] [vmkit] r98518 - in /vmkit/trunk:
lib/Mvm/Compiler/JIT.cpp mmtk/mmtk-j3/Memory.cpp
Message-ID: <20100314215930.E33DF2A6C12C@llvm.org>
Author: geoffray
Date: Sun Mar 14 16:59:30 2010
New Revision: 98518
URL: http://llvm.org/viewvc/llvm-project?rev=98518&view=rev
Log:
Allocate MMTk memory early on, to avoid collisions.
Modified:
vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
vmkit/trunk/mmtk/mmtk-j3/Memory.cpp
Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=98518&r1=98517&r2=98518&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Sun Mar 14 16:59:30 2010
@@ -44,6 +44,8 @@
#include "MutatorThread.h"
#include "MvmGC.h"
+#include
+
using namespace mvm;
using namespace llvm;
@@ -181,6 +183,20 @@
#ifdef WITH_MMTK
llvm::GlobalVariable* GV = globalModule->getGlobalVariable("MMTkCollectorSize", false);
if (GV && executionEngine) {
+ // Allocate the memory for MMTk right now, to avoid conflicts with
+ // other allocators.
+#if defined (__MACH__)
+ uint32 flags = MAP_PRIVATE | MAP_ANON | MAP_FIXED;
+#else
+ uint32 flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED;
+#endif
+ void* baseAddr = mmap((void*)0x30000000, 0x50000000, PROT_READ | PROT_WRITE,
+ flags, -1, 0);
+ if (baseAddr == MAP_FAILED) {
+ perror("mmap");
+ abort();
+ }
+
ConstantInt* C = dyn_cast(GV->getInitializer());
uint64_t val = C->getZExtValue();
MutatorThread::MMTkCollectorSize = val;
Modified: vmkit/trunk/mmtk/mmtk-j3/Memory.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/mmtk/mmtk-j3/Memory.cpp?rev=98518&r1=98517&r2=98518&view=diff
==============================================================================
--- vmkit/trunk/mmtk/mmtk-j3/Memory.cpp (original)
+++ vmkit/trunk/mmtk/mmtk-j3/Memory.cpp Sun Mar 14 16:59:30 2010
@@ -34,18 +34,7 @@
Java_org_j3_mmtk_Memory_dzmmap__Lorg_vmmagic_unboxed_Address_2I(JavaObject* M,
void* start,
sint32 size) {
-#if defined (__MACH__)
- uint32 flags = MAP_PRIVATE | MAP_ANON | MAP_FIXED;
-#else
- uint32 flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED;
-#endif
- void* baseAddr = mmap((void*)start, size, PROT_READ | PROT_WRITE, flags,
- -1, 0);
- if (baseAddr == MAP_FAILED) {
- perror("mmap");
- JavaThread::get()->printBacktrace(); abort();
- }
-
+ // Already mmapped during initialization.
return 0;
}
From nicolas.geoffray at lip6.fr Mon Mar 15 19:54:13 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Tue, 16 Mar 2010 02:54:13 -0000
Subject: [vmkit-commits] [vmkit] r98606 - in /vmkit/trunk:
lib/Mvm/Compiler/JIT.cpp mmtk/mmtk-j3/Memory.cpp
Message-ID: <20100316025413.BA19B2A6C12C@llvm.org>
Author: geoffray
Date: Mon Mar 15 21:54:13 2010
New Revision: 98606
URL: http://llvm.org/viewvc/llvm-project?rev=98606&view=rev
Log:
Mmap something that can be mmapped currently. This will need to be changed
to something better.
Modified:
vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
vmkit/trunk/mmtk/mmtk-j3/Memory.cpp
Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=98606&r1=98605&r2=98606&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Mon Mar 15 21:54:13 2010
@@ -190,7 +190,7 @@
#else
uint32 flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED;
#endif
- void* baseAddr = mmap((void*)0x30000000, 0x50000000, PROT_READ | PROT_WRITE,
+ void* baseAddr = mmap((void*)0x30000000, 0x40000000, PROT_READ | PROT_WRITE,
flags, -1, 0);
if (baseAddr == MAP_FAILED) {
perror("mmap");
Modified: vmkit/trunk/mmtk/mmtk-j3/Memory.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/mmtk/mmtk-j3/Memory.cpp?rev=98606&r1=98605&r2=98606&view=diff
==============================================================================
--- vmkit/trunk/mmtk/mmtk-j3/Memory.cpp (original)
+++ vmkit/trunk/mmtk/mmtk-j3/Memory.cpp Mon Mar 15 21:54:13 2010
@@ -19,7 +19,7 @@
}
extern "C" uintptr_t Java_org_j3_mmtk_Memory_getHeapEndConstant__ () {
- return (uintptr_t)0x80000000;
+ return (uintptr_t)0x70000000;
}
extern "C" uintptr_t Java_org_j3_mmtk_Memory_getAvailableStartConstant__ () {
@@ -27,7 +27,7 @@
}
extern "C" uintptr_t Java_org_j3_mmtk_Memory_getAvailableEndConstant__ () {
- return (uintptr_t)0x80000000;
+ return (uintptr_t)0x70000000;
}
extern "C" sint32
From nicolas.geoffray at lip6.fr Mon Mar 15 20:10:39 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Tue, 16 Mar 2010 03:10:39 -0000
Subject: [vmkit-commits] [vmkit] r98607 -
/vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp
Message-ID: <20100316031039.707DB2A6C12C@llvm.org>
Author: geoffray
Date: Mon Mar 15 22:10:39 2010
New Revision: 98607
URL: http://llvm.org/viewvc/llvm-project?rev=98607&view=rev
Log:
Delete the context when deleting the compiler.
Modified:
vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp
Modified: vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp?rev=98607&r1=98606&r2=98607&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp Mon Mar 15 22:10:39 2010
@@ -99,10 +99,12 @@
}
JavaLLVMCompiler::~JavaLLVMCompiler() {
+ LLVMContext* Context = &(TheModule->getContext());
delete TheModule;
delete DebugFactory;
delete JavaFunctionPasses;
delete JavaNativeFunctionPasses;
+ delete Context;
}
namespace mvm {
From nicolas.geoffray at lip6.fr Sat Mar 20 14:33:26 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sat, 20 Mar 2010 21:33:26 -0000
Subject: [vmkit-commits] [vmkit] r99091 -
/vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
Message-ID: <20100320213326.A38AE2A6C12C@llvm.org>
Author: geoffray
Date: Sat Mar 20 16:33:26 2010
New Revision: 99091
URL: http://llvm.org/viewvc/llvm-project?rev=99091&view=rev
Log:
Attach gc info to stubs.
Modified:
vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
Modified: vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp?rev=99091&r1=99090&r2=99091&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp Sat Mar 20 16:33:26 2010
@@ -62,7 +62,7 @@
} else {
virtualType = Compiler->getIntrinsics()->JavaObjectType;
- assert(virtualType && "intrinsics not iniitalized");
+ assert(virtualType && "intrinsics not initalized");
structType = dyn_cast(virtualType->getContainedType(0));
sl = targetData->getStructLayout(structType);
@@ -409,7 +409,7 @@
ReturnInst::Create(context, val, currentBlock);
else
ReturnInst::Create(context, currentBlock);
-
+
return res;
}
@@ -487,6 +487,10 @@
else
ReturnInst::Create(context, currentBlock);
+ if (Compiler->useCooperativeGC()) {
+ res->setGC("vmkit");
+ }
+
return res;
}
@@ -494,6 +498,7 @@
std::vector Args;
std::vector FunctionArgs;
+ std::vector TempArgs;
J3Intrinsics& Intrinsics = *Compiler->getIntrinsics();
std::string name;
@@ -518,26 +523,28 @@
node = PHINode::Create(stub->getReturnType(), "", endBlock);
}
- Function::arg_iterator arg = stub->arg_begin();
- Value *obj = NULL;
- if (virt) {
- obj = arg;
- Args.push_back(obj);
- }
- for (; arg != stub->arg_end() ; ++arg) {
- FunctionArgs.push_back(arg);
- if (Compiler->useCooperativeGC()) {
- if (arg->getType() == Intrinsics.JavaObjectType) {
- Value* GCArgs[2] = {
- new BitCastInst(arg, Intrinsics.ptrPtrType, "", currentBlock),
- Intrinsics.constantPtrNull
- };
+ for (Function::arg_iterator arg = stub->arg_begin();
+ arg != stub->arg_end(); ++arg) {
+ Value* temp = arg;
+ if (Compiler->useCooperativeGC() &&
+ arg->getType() == Intrinsics.JavaObjectType) {
+ temp = new AllocaInst(Intrinsics.JavaObjectType, "", currentBlock);
+ new StoreInst(arg, temp, "", currentBlock);
+ Value* GCArgs[2] = {
+ new BitCastInst(temp, Intrinsics.ptrPtrType, "", currentBlock),
+ Intrinsics.constantPtrNull
+ };
- CallInst::Create(Intrinsics.llvm_gc_gcroot, GCArgs, GCArgs + 2, "",
- currentBlock);
- }
+ CallInst::Create(Intrinsics.llvm_gc_gcroot, GCArgs, GCArgs + 2, "",
+ currentBlock);
}
+
+ TempArgs.push_back(temp);
+ }
+
+ if (virt && Compiler->useCooperativeGC()) {
+ Args.push_back(new LoadInst(TempArgs[0], "", false, currentBlock));
}
Value* val = CallInst::Create(virt ? Intrinsics.ResolveVirtualStubFunction :
@@ -554,6 +561,17 @@
currentBlock = callBlock;
Value* Func = new BitCastInst(val, stub->getType(), "", currentBlock);
+
+ int i = 0;
+ for (Function::arg_iterator arg = stub->arg_begin();
+ arg != stub->arg_end(); ++arg, ++i) {
+ Value* temp = arg;
+ if (Compiler->useCooperativeGC() &&
+ arg->getType() == Intrinsics.JavaObjectType) {
+ temp = new LoadInst(TempArgs[i], "", false, currentBlock);
+ }
+ FunctionArgs.push_back(temp);
+ }
Value* res = CallInst::Create(Func, FunctionArgs.begin(), FunctionArgs.end(),
"", currentBlock);
if (node) node->addIncoming(res, currentBlock);
@@ -566,6 +584,10 @@
ReturnInst::Create(context, currentBlock);
}
+ if (Compiler->useCooperativeGC()) {
+ stub->setGC("vmkit");
+ }
+
return stub;
}
From nicolas.geoffray at lip6.fr Sun Mar 21 07:55:37 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sun, 21 Mar 2010 14:55:37 -0000
Subject: [vmkit-commits] [vmkit] r99120 -
/vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
Message-ID: <20100321145537.5121A2A6C12C@llvm.org>
Author: geoffray
Date: Sun Mar 21 09:55:37 2010
New Revision: 99120
URL: http://llvm.org/viewvc/llvm-project?rev=99120&view=rev
Log:
Fix build.
Modified:
vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
Modified: vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp?rev=99120&r1=99119&r2=99120&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp Sun Mar 21 09:55:37 2010
@@ -543,8 +543,12 @@
TempArgs.push_back(temp);
}
- if (virt && Compiler->useCooperativeGC()) {
- Args.push_back(new LoadInst(TempArgs[0], "", false, currentBlock));
+ if (virt) {
+ if (Compiler->useCooperativeGC()) {
+ Args.push_back(new LoadInst(TempArgs[0], "", false, currentBlock));
+ }else {
+ Args.push_back(TempArgs[0]);
+ }
}
Value* val = CallInst::Create(virt ? Intrinsics.ResolveVirtualStubFunction :
From nicolas.geoffray at lip6.fr Sun Mar 21 08:01:19 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sun, 21 Mar 2010 15:01:19 -0000
Subject: [vmkit-commits] [vmkit] r99121 - in /vmkit/trunk/www: index.html
publications/vmkit.html pubs.html
Message-ID: <20100321150119.680CF2A6C12C@llvm.org>
Author: geoffray
Date: Sun Mar 21 10:01:19 2010
New Revision: 99121
URL: http://llvm.org/viewvc/llvm-project?rev=99121&view=rev
Log:
Add VMKit paper.
Added:
vmkit/trunk/www/publications/vmkit.html
Modified:
vmkit/trunk/www/index.html
vmkit/trunk/www/pubs.html
Modified: vmkit/trunk/www/index.html
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/index.html?rev=99121&r1=99120&r2=99121&view=diff
==============================================================================
--- vmkit/trunk/www/index.html (original)
+++ vmkit/trunk/www/index.html Sun Mar 21 10:01:19 2010
@@ -58,6 +58,12 @@
able to execute these VMs. VMKit is a proof of concept implementation
towards that direction.
+ Paper on the design of VMKit:
+
+
The PhD thesis that initiated VMKit:
Nicolas Geoffray's PhD thesis
Added: vmkit/trunk/www/publications/vmkit.html
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/publications/vmkit.html?rev=99121&view=auto
==============================================================================
--- vmkit/trunk/www/publications/vmkit.html (added)
+++ vmkit/trunk/www/publications/vmkit.html Sun Mar 21 10:01:19 2010
@@ -0,0 +1,62 @@
+
+
+
+
+
+ VMKit: a Substrate for Managed Runtime Enviroments
+
+
+
+
+ VMKit: a Substrate for Managed Runtime Environments
+
+
+ Nicolas Geoffray
+
+
+Abstract:
+
+Managed Runtime Environments (MREs), such as the JVM and the CLI, form an
+attractive environment for program execution, by providing portability and
+safety, via the use of a bytecode language and automatic memory management,
+as well as good performance, via just-in-time (JIT) compilation.
+Nevertheless, developing a fully featured MRE, including e.g.
+a garbage collector and JIT compiler, is a herculean
+task. As a result, new languages cannot easily take advantage of the
+benefits of MREs, and it is difficult to experiment with
+extensions of existing MRE based languages.
+
+This paper describes and evaluates VMKit, a first attempt to build a common
+substrate that eases the development of high-level MREs. We have successfully
+used VMKit to build two MREs: a Java Virtual Machine and a Common
+Language Runtime. We provide an extensive study of the lessons learned in
+developing this infrastructure, and assess the ease of implementing new
+MREs or MRE extensions and the resulting performance. In
+particular, it took one of the authors only one month to develop a Common
+Language Runtime using VMKit. VMKit furthermore has performance comparable
+to the well established open source MREs Cacao, Apache Harmony and Mono, and is
+1.2 to 3 times slower than JikesRVM on most of the DaCapo
+benchmarks.
+
+
+
+Bibtex:
+
+ at inproceedings{geoffray10vmkit,
+ author = {N. Geoffray and G. Thomas and J.Lawall and G. Muller and B. Folliot},
+ title = {{VMKit: a Substrate for Managed Runtime Environments}},
+ booktitle = {Virtual Execution Environment Conference (VEE 2010)},
+ publisher = {ACM Press},
+ year = {2010},
+ month = {March},
+ address = {Pittsburgh, USA}
+}
+
+
+Download:
+
+
+
+
Modified: vmkit/trunk/www/pubs.html
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/pubs.html?rev=99121&r1=99120&r2=99121&view=diff
==============================================================================
--- vmkit/trunk/www/pubs.html (original)
+++ vmkit/trunk/www/pubs.html Sun Mar 21 10:01:19 2010
@@ -16,6 +16,12 @@
VMKit related publications
+2010
+
+ VMKit: a Substrate for Managed Runtime Environments
+ Nicolas Geoffray, Gael Thomas, Julia Lawall, Gilles Muller, Bertil Folliot
+ Proc. of the Virtual Execution Environments Conference (VEE'10), Pittsburgh, USA, Mar. 2010
+
2009
Fostering Systems Research with Managed Runtimes
From nicolas.geoffray at lip6.fr Sun Mar 21 08:02:11 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sun, 21 Mar 2010 15:02:11 -0000
Subject: [vmkit-commits] [vmkit] r99122 -
/vmkit/trunk/www/publications/vmkit.html
Message-ID: <20100321150211.50E5C2A6C12C@llvm.org>
Author: geoffray
Date: Sun Mar 21 10:02:11 2010
New Revision: 99122
URL: http://llvm.org/viewvc/llvm-project?rev=99122&view=rev
Log:
Update authors.
Modified:
vmkit/trunk/www/publications/vmkit.html
Modified: vmkit/trunk/www/publications/vmkit.html
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/publications/vmkit.html?rev=99122&r1=99121&r2=99122&view=diff
==============================================================================
--- vmkit/trunk/www/publications/vmkit.html (original)
+++ vmkit/trunk/www/publications/vmkit.html Sun Mar 21 10:02:11 2010
@@ -11,7 +11,7 @@
VMKit: a Substrate for Managed Runtime Environments
- Nicolas Geoffray
+ Nicolas Geoffray, Gael Thomas, Julia Lawall, Gilles Muller and Bertil Folliot
Abstract:
From nicolas.geoffray at lip6.fr Sun Mar 21 08:21:42 2010
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Sun, 21 Mar 2010 15:21:42 -0000
Subject: [vmkit-commits] [vmkit] r99125 -
/vmkit/trunk/www/publications/vmkit.html
Message-ID: <20100321152142.1E0F62A6C12C@llvm.org>
Author: geoffray
Date: Sun Mar 21 10:21:41 2010
New Revision: 99125
URL: http://llvm.org/viewvc/llvm-project?rev=99125&view=rev
Log:
Fix typo in link.
Modified:
vmkit/trunk/www/publications/vmkit.html
Modified: vmkit/trunk/www/publications/vmkit.html
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/publications/vmkit.html?rev=99125&r1=99124&r2=99125&view=diff
==============================================================================
--- vmkit/trunk/www/publications/vmkit.html (original)
+++ vmkit/trunk/www/publications/vmkit.html Sun Mar 21 10:21:41 2010
@@ -55,7 +55,7 @@
Download: