[vmkit-commits] [vmkit] r96185 - in /vmkit/trunk: Makefile.rules include/j3/JnjvmModule.h include/j3/LLVMMaterializer.h lib/J3/Compiler/JavaJITCompiler.cpp lib/J3/Compiler/LLVMMaterializer.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sun Feb 14 11:57:50 PST 2010
Author: geoffray
Date: Sun Feb 14 13:57:49 2010
New Revision: 96185
URL: http://llvm.org/viewvc/llvm-project?rev=96185&view=rev
Log:
Compile lazily when compiling MMTk.
Modified:
vmkit/trunk/Makefile.rules
vmkit/trunk/include/j3/JnjvmModule.h
vmkit/trunk/include/j3/LLVMMaterializer.h
vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp
vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp
Modified: vmkit/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.rules?rev=96185&r1=96184&r2=96185&view=diff
==============================================================================
--- vmkit/trunk/Makefile.rules (original)
+++ vmkit/trunk/Makefile.rules Sun Feb 14 13:57:49 2010
@@ -133,7 +133,7 @@
$(Verb) $(ANT)
$(Echo) Building $(BuildMode) $(JARNAME).jar $(notdir $@)
$(Verb) $(LOPT) -load=$(LibDir)/JITGCPass$(SHLIBEXT) -std-compile-opts -JITGCPass -f $(LibDir)/MMTKAlloc.bc -o $(LibDir)/MMTKAlloc.bc
- $(Verb) $(VMJC) -std-compile-opts $(ADDITIONAL_ARGS) -load=$(LibDir)/MMTKFake$(SHLIBEXT) -load=$(LibDir)/MMTKMagic$(SHLIBEXT) -LowerMagic -verify $(JARNAME).jar -disable-exceptions -disable-cooperativegc -with-clinit=org/mmtk/vm/VM,org/mmtk/utility/*,org/mmtk/policy/*,org/j3/config/* -Dmmtk.hostjvm=org.j3.mmtk.Factory -o $(JARNAME).bc -Dmmtk.properties=vmkit.properties -disable-stubs -assume-compiled
+ $(Verb) $(VMJC) -std-compile-opts $(ADDITIONAL_ARGS) -load=$(LibDir)/MMTKFake$(SHLIBEXT) -load=$(LibDir)/MMTKMagic$(SHLIBEXT) -LowerMagic -verify $(JARNAME).jar -disable-exceptions -disable-cooperativegc -with-clinit=org/mmtk/vm/VM,org/mmtk/utility/*,org/mmtk/policy/*,org/j3/config/* -Dmmtk.hostjvm=org.j3.mmtk.Factory -o $(JARNAME).bc -Dmmtk.properties=vmkit.properties -disable-stubs -assume-compiled -llvm-lazy
$(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
Modified: vmkit/trunk/include/j3/JnjvmModule.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/JnjvmModule.h?rev=96185&r1=96184&r2=96185&view=diff
==============================================================================
--- vmkit/trunk/include/j3/JnjvmModule.h (original)
+++ vmkit/trunk/include/j3/JnjvmModule.h Sun Feb 14 13:57:49 2010
@@ -597,9 +597,7 @@
return new mvm::UnpreciseStackScanner();
}
#endif
-
- virtual void* loadMethod(void* handle, const char* symbol);
-
+
static JavaJITCompiler* CreateCompiler(const std::string& ModuleID);
};
Modified: vmkit/trunk/include/j3/LLVMMaterializer.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/LLVMMaterializer.h?rev=96185&r1=96184&r2=96185&view=diff
==============================================================================
--- vmkit/trunk/include/j3/LLVMMaterializer.h (original)
+++ vmkit/trunk/include/j3/LLVMMaterializer.h Sun Feb 14 13:57:49 2010
@@ -45,6 +45,8 @@
JavaLLVMLazyJITCompiler(const std::string& ModuleID);
virtual ~JavaLLVMLazyJITCompiler();
+
+ virtual void* loadMethod(void* handle, const char* symbol);
friend class LLVMMaterializer;
};
Modified: vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp?rev=96185&r1=96184&r2=96185&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp Sun Feb 14 13:57:49 2010
@@ -409,16 +409,6 @@
return 0;
}
-void* JavaJITCompiler::loadMethod(void* handle, const char* symbol) {
- Function* F = mvm::MvmModule::globalModule->getFunction(symbol);
- if (F) {
- void* res = mvm::MvmModule::executionEngine->getPointerToFunction(F);
- return res;
- }
-
- return JavaCompiler::loadMethod(handle, symbol);
-}
-
uintptr_t JavaJ3LazyJITCompiler::getPointerOrStub(JavaMethod& meth,
int side) {
return meth.getSignature()->getVirtualCallStub();
Modified: vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp?rev=96185&r1=96184&r2=96185&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LLVMMaterializer.cpp Sun Feb 14 13:57:49 2010
@@ -36,6 +36,16 @@
delete TheMaterializer;
}
+void* JavaLLVMLazyJITCompiler::loadMethod(void* handle, const char* symbol) {
+ Function* F = mvm::MvmModule::globalModule->getFunction(symbol);
+ if (F) {
+ void* res = mvm::MvmModule::executionEngine->getPointerToFunctionOrStub(F);
+ return res;
+ }
+
+ return JavaCompiler::loadMethod(handle, symbol);
+}
+
uintptr_t JavaLLVMLazyJITCompiler::getPointerOrStub(JavaMethod& meth,
int side) {
ExecutionEngine* EE = mvm::MvmModule::executionEngine;
More information about the vmkit-commits
mailing list