[vmkit-commits] [vmkit] r119496 - in /vmkit/branches/multi-vm: include/j3/J3Intrinsics.h include/mvm/JIT.h lib/J3/Compiler/J3Intrinsics.cpp lib/J3/LLVMRuntime/Makefile lib/J3/LLVMRuntime/runtime-default-thread.ll lib/J3/LLVMRuntime/runtime-default.ll lib/J3/LLVMRuntime/runtime-mmtk-thread.ll lib/Mvm/Compiler/JIT.cpp lib/Mvm/Compiler/LLVMRuntime.ll lib/Mvm/Compiler/Makefile lib/Mvm/Compiler/mvm-runtime.ll lib/Mvm/Compiler/runtime-default-thread.ll lib/Mvm/Compiler/runtime-mmtk-thread.ll

Gael Thomas gael.thomas at lip6.fr
Wed Nov 17 05:36:30 PST 2010


Author: gthomas
Date: Wed Nov 17 07:36:29 2010
New Revision: 119496

URL: http://llvm.org/viewvc/llvm-project?rev=119496&view=rev
Log:
move mvm runtime types in mvm

Added:
    vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll
      - copied, changed from r119494, vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll
    vmkit/branches/multi-vm/lib/Mvm/Compiler/runtime-default-thread.ll
      - copied unchanged from r119494, vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default-thread.ll
    vmkit/branches/multi-vm/lib/Mvm/Compiler/runtime-mmtk-thread.ll
      - copied unchanged from r119494, vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-mmtk-thread.ll
Removed:
    vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default-thread.ll
    vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-mmtk-thread.ll
    vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll
Modified:
    vmkit/branches/multi-vm/include/j3/J3Intrinsics.h
    vmkit/branches/multi-vm/include/mvm/JIT.h
    vmkit/branches/multi-vm/lib/J3/Compiler/J3Intrinsics.cpp
    vmkit/branches/multi-vm/lib/J3/LLVMRuntime/Makefile
    vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default.ll
    vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp
    vmkit/branches/multi-vm/lib/Mvm/Compiler/Makefile

Modified: vmkit/branches/multi-vm/include/j3/J3Intrinsics.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/j3/J3Intrinsics.h?rev=119496&r1=119495&r2=119496&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/j3/J3Intrinsics.h (original)
+++ vmkit/branches/multi-vm/include/j3/J3Intrinsics.h Wed Nov 17 07:36:29 2010
@@ -28,7 +28,6 @@
   const llvm::Type* JavaArrayDoubleType;
   const llvm::Type* JavaArrayObjectType;
   
-  const llvm::Type* VTType;
   const llvm::Type* JavaObjectType;
   const llvm::Type* JavaArrayType;
   const llvm::Type* JavaCommonClassType;
@@ -42,7 +41,6 @@
   const llvm::Type* JavaFieldType;
   const llvm::Type* AttributType;
   const llvm::Type* JavaThreadType;
-  const llvm::Type* MutatorThreadType;
   
 #ifdef ISOLATE_SHARING
   const llvm::Type* JnjvmType;

Modified: vmkit/branches/multi-vm/include/mvm/JIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/JIT.h?rev=119496&r1=119495&r2=119496&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/JIT.h (original)
+++ vmkit/branches/multi-vm/include/mvm/JIT.h Wed Nov 17 07:36:29 2010
@@ -172,6 +172,9 @@
   const llvm::PointerType* ptrPtrType;
   const llvm::Type* arrayPtrType;
   const llvm::Type* pointerSizeType;
+
+  const llvm::Type* MutatorThreadType;
+  const llvm::Type* VTType;
 };
 
 

Modified: vmkit/branches/multi-vm/lib/J3/Compiler/J3Intrinsics.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Compiler/J3Intrinsics.cpp?rev=119496&r1=119495&r2=119496&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Compiler/J3Intrinsics.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/Compiler/J3Intrinsics.cpp Wed Nov 17 07:36:29 2010
@@ -35,7 +35,6 @@
   BaseIntrinsics(module) {
   j3::llvm_runtime::makeLLVMModuleContents(module);
   
-  VTType = PointerType::getUnqual(module->getTypeByName("VT"));
   LLVMContext& Context = module->getContext();
 
 #ifdef ISOLATE_SHARING
@@ -90,8 +89,6 @@
     PointerType::getUnqual(module->getTypeByName("Attribut"));
   JavaThreadType =
     PointerType::getUnqual(module->getTypeByName("JavaThread"));
-  MutatorThreadType =
-    PointerType::getUnqual(module->getTypeByName("MutatorThread"));
   
   CodeLineInfoType =
     PointerType::getUnqual(module->getTypeByName("CodeLineInfo"));

Modified: vmkit/branches/multi-vm/lib/J3/LLVMRuntime/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/LLVMRuntime/Makefile?rev=119496&r1=119495&r2=119496&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/LLVMRuntime/Makefile (original)
+++ vmkit/branches/multi-vm/lib/J3/LLVMRuntime/Makefile Wed Nov 17 07:36:29 2010
@@ -10,13 +10,8 @@
 
 include $(LEVEL)/Makefile.config
 
-VMKIT_RUNTIME = $(PROJ_SRC_DIR)/runtime-default.ll
-
-ifeq ($(GC_MMTK), 1)
-VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-mmtk-thread.ll
-else
-VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-default-thread.ll
-endif
+VMKIT_RUNTIME = $(PROJ_SRC_DIR)/../../Mvm/Compiler/LLVMRuntime.gen.ll \
+								$(PROJ_SRC_DIR)/runtime-default.ll
 
 ifeq ($(ISOLATE_BUILD), 1)
 VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-isolate.ll

Removed: vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default-thread.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default-thread.ll?rev=119495&view=auto
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default-thread.ll (original)
+++ vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default-thread.ll (removed)
@@ -1,2 +0,0 @@
-;;; Field 0: the thread
-%MutatorThread = type { %Thread }

Modified: vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default.ll?rev=119496&r1=119495&r2=119496&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default.ll (original)
+++ vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-default.ll Wed Nov 17 07:36:29 2010
@@ -2,9 +2,6 @@
 ;;;;;;;;;;;;;;;;;;;;;;;; Type definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-;;; A virtual table is an array of function pointers.
-%VT = type [0 x i32 (...)*]
-
 ;;; The root of all Java Objects: a VT and a lock.
 %JavaObject = type { %VT*, i8* }
 
@@ -27,23 +24,6 @@
 ;;; Field 3: The static instance
 %TaskClassMirror = type { i8, i1, i8* }
 
-%CircularBase = type { %VT*, %CircularBase*, %CircularBase* }
-
-;;; Field 0:  the parent (circular base)
-;;; Field 1:  size_t IsolateID
-;;; Field 2:  void*  MyVM
-;;; Field 3:  void*  baseSP
-;;; Field 4:  char   doYield
-;;; Field 5:  char   inRV
-;;; Field 6:  char   joinedRV
-;;; Field 7:  void*  lastSP
-;;; Field 8:  void*  internalThreadID
-;;; field 9:  void*  routine
-;;; field 10: void*  lastKnownFrame
-;;; field 11: void*  lastExceptionBuffer
-;;; field 12: void*  vmData
-%Thread = type { %CircularBase, i32, i8*, i8*, i8, i8, i8, i8*, i8*, i8*, i8*, i8*, i8* }
-
 %JavaThread = type { %MutatorThread, i8*, %JavaObject* }
 
 

Removed: vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-mmtk-thread.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-mmtk-thread.ll?rev=119495&view=auto
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-mmtk-thread.ll (original)
+++ vmkit/branches/multi-vm/lib/J3/LLVMRuntime/runtime-mmtk-thread.ll (removed)
@@ -1,7 +0,0 @@
-%BumpPtrAllocator = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
-
-;;; Field 0: the thread
-;;; field 1: allocator
-;;; field 2: MutatorContext
-;;; field 3: realRoutine
-%MutatorThread = type { %Thread, %BumpPtrAllocator, i8*, i8* }

Modified: vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp?rev=119496&r1=119495&r2=119496&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp Wed Nov 17 07:36:29 2010
@@ -322,6 +322,9 @@
   assert(AllocateUnresolvedFunction && "No allocateUnresolved function");
   AddFinalizationCandidate = module->getFunction("addFinalizationCandidate");
   assert(AddFinalizationCandidate && "No addFinalizationCandidate function");
+
+  VTType            = PointerType::getUnqual(module->getTypeByName("VT"));
+  MutatorThreadType = PointerType::getUnqual(module->getTypeByName("MutatorThread"));
 }
 
 const llvm::TargetData* MvmModule::TheTargetData;

Removed: vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll?rev=119495&view=auto
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll (removed)
@@ -1,87 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Common types ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;; A virtual table is an array of function pointers.
-%VT = type [0 x i32 (...)*]
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Printing functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-declare void @printFloat(float)
-declare void @printDouble(double)
-declare void @printLong(i64)
-declare void @printInt(i32)
-declare void @printObject(i8*)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Exceptions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-declare void @_Unwind_Resume_or_Rethrow(i8*)
-declare i8*  @llvm.eh.exception() nounwind
-declare i32  @llvm.eh.selector.i32(i8*, i8*, ...) nounwind
-declare i64  @llvm.eh.selector.i64(i8*, i8*, ...) nounwind
-declare void @__gxx_personality_v0()
-declare i8*  @__cxa_begin_catch(i8*)
-declare void @__cxa_end_catch()
-declare i32  @setjmp(i8*)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Math ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-declare double @llvm.sqrt.f64(double) nounwind
-declare double @llvm.sin.f64(double) nounwind
-declare double @llvm.cos.f64(double) nounwind
-declare double @tan(double)
-declare double @asin(double)
-declare double @acos(double)
-declare double @atan(double)
-declare double @exp(double)
-declare double @log(double)
-declare double @ceil(double)
-declare double @floor(double)
-declare double @cbrt(double)
-declare double @cosh(double)
-declare double @expm1(double)
-declare double @log10(double)
-declare double @log1p(double)
-declare double @sinh(double)
-declare double @tanh(double)
-declare double @fabs(double)
-declare double @rint(double)
-declare double @hypot(double, double)
-declare double @pow(double, double)
-declare double @atan2(double, double)
-declare float  @fabsf(float)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Memory ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-declare void @llvm.memcpy.i32(i8 *, i8 *, i32, i32) nounwind
-declare void @llvm.memset.i32(i8 *, i8, i32, i32) nounwind
-declare i8*  @llvm.frameaddress(i32) nounwind readnone
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Atomic ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-declare i8  @llvm.atomic.cmp.swap.i8.p0i8(i8*, i8, i8) nounwind
-declare i16 @llvm.atomic.cmp.swap.i16.p0i16(i16*, i16, i16) nounwind
-declare i32 @llvm.atomic.cmp.swap.i32.p0i32(i32*, i32, i32) nounwind
-declare i64 @llvm.atomic.cmp.swap.i64.p0i64(i64*, i64, i64) nounwind
-
-declare void @unconditionalSafePoint() nounwind
-declare void @conditionalSafePoint() nounwind
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; GC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-declare void @llvm.gcroot(i8**, i8*)
-declare i8* @gcmalloc(i32, i8*)
-declare i8* @gcmallocUnresolved(i32, i8*)
-declare void @addFinalizationCandidate(i8*)

Modified: vmkit/branches/multi-vm/lib/Mvm/Compiler/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/Makefile?rev=119496&r1=119495&r2=119496&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/Makefile (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/Makefile Wed Nov 17 07:36:29 2010
@@ -16,7 +16,14 @@
   LIBRARYNAME = MvmCompiler
 endif
 
-VMKIT_RUNTIME = $(PROJ_SRC_DIR)/LLVMRuntime.ll
+VMKIT_RUNTIME = $(PROJ_SRC_DIR)/mvm-runtime.ll
+
+ifeq ($(GC_MMTK), 1)
+VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-mmtk-thread.ll
+else
+VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-default-thread.ll
+endif
+
 BUILT_SOURCES = LLVMRuntime.inc
 
 include $(LEVEL)/Makefile.common

Copied: vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll (from r119494, vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll)
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll?p2=vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll&p1=vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll&r1=119494&r2=119496&rev=119496&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/LLVMRuntime.ll (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll Wed Nov 17 07:36:29 2010
@@ -5,6 +5,23 @@
 ;;; A virtual table is an array of function pointers.
 %VT = type [0 x i32 (...)*]
 
+%CircularBase = type { %VT*, %CircularBase*, %CircularBase* }
+
+;;; Field 0:  the parent (circular base)
+;;; Field 1:  size_t IsolateID
+;;; Field 2:  void*  MyVM
+;;; Field 3:  void*  baseSP
+;;; Field 4:  char   doYield
+;;; Field 5:  char   inRV
+;;; Field 6:  char   joinedRV
+;;; Field 7:  void*  lastSP
+;;; Field 8:  void*  internalThreadID
+;;; field 9:  void*  routine
+;;; field 10: void*  lastKnownFrame
+;;; field 11: void*  lastExceptionBuffer
+;;; field 12: void*  vmData
+%Thread = type { %CircularBase, i32, i8*, i8*, i8, i8, i8, i8*, i8*, i8*, i8*, i8*, i8* }
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Printing functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;





More information about the vmkit-commits mailing list