[llvm-commits] [vmkit] r51246 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaArray.cpp JavaIsolate.cpp JavaJIT.cpp JavaJIT.h JavaJITInitialise.cpp JavaRuntimeJIT.cpp JavaThread.cpp JavaThread.h Jnjvm.h JnjvmModule.cpp JnjvmModule.h JnjvmModuleProvider.cpp JnjvmModuleProvider.h Makefile.am
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Mon May 19 05:42:17 PDT 2008
Author: geoffray
Date: Mon May 19 07:42:17 2008
New Revision: 51246
URL: http://llvm.org/viewvc/llvm-project?rev=51246&view=rev
Log:
The less Jnjvm core files know about LLVM, the better.
Removed:
vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h
vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h
vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h
vmkit/trunk/lib/JnJVM/VMCore/Makefile.am
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp Mon May 19 07:42:17 2008
@@ -41,13 +41,17 @@
ClassArray* JavaArray::ofString = 0;
ClassArray* JavaArray::ofObject = 0;
+// This will force linking runtime methods
+extern "C" void negativeArraySizeException(sint32 val);
+extern "C" void outOfMemoryError(sint32 val);
+
#ifndef MULTIPLE_VM
#define ACONS(name, elmt, primSize) \
name *name::acons(sint32 n, ClassArray* atype, Jnjvm* vm) { \
if (n < 0) \
- JavaThread::get()->isolate->negativeArraySizeException(n); \
+ negativeArraySizeException(n); \
else if (n > JavaArray::MaxArraySize) \
- JavaThread::get()->isolate->outOfMemoryError(n); \
+ outOfMemoryError(n); \
name* res = (name*) \
(Object*) operator new(sizeof(name) + n * primSize, name::VT); \
res->initialise(atype); \
@@ -58,9 +62,9 @@
#define ACONS(name, elmt, primSize) \
name *name::acons(sint32 n, ClassArray* atype, Jnjvm* vm) { \
if (n < 0) \
- JavaThread::get()->isolate->negativeArraySizeException(n); \
+ negativeArraySizeException(n); \
else if (n > JavaArray::MaxArraySize) \
- JavaThread::get()->isolate->outOfMemoryError(n); \
+ outOfMemoryError(n); \
name* res = (name*) \
(Object*) vm->allocateObject(sizeof(name) + n * primSize, name::VT); \
res->initialise(atype); \
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Mon May 19 07:42:17 2008
@@ -9,11 +9,6 @@
#include <jni.h>
-#include "llvm/Module.h"
-#include "llvm/PassManager.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Target/TargetData.h"
-
#include "mvm/JIT.h"
#include "mvm/MvmMemoryManager.h"
#include "mvm/Threads/Locks.h"
@@ -448,14 +443,7 @@
isolate->analyseClasspathEnv(isolate->bootClasspathEnv);
isolate->module = new JnjvmModule("Isolate JnJVM");
- std::string str =
- mvm::jit::executionEngine->getTargetData()->getStringRepresentation();
- isolate->module->setDataLayout(str);
- isolate->protectModule = mvm::Lock::allocNormal();
isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module);
- mvm::jit::protectEngine->lock();
- mvm::jit::executionEngine->addModuleProvider(isolate->TheModuleProvider);
- mvm::jit::protectEngine->unlock();
isolate->bootstrapThread = vm_new(isolate, JavaThread)();
isolate->bootstrapThread->initialise(0, isolate);
@@ -517,15 +505,9 @@
isolate->protectModule = mvm::Lock::allocNormal();
isolate->module = new JnjvmModule("Bootstrap JnJVM");
- std::string str =
- mvm::jit::executionEngine->getTargetData()->getStringRepresentation();
- isolate->module->setDataLayout(str);
isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module);
- mvm::jit::protectEngine->lock();
- mvm::jit::executionEngine->addModuleProvider(isolate->TheModuleProvider);
- mvm::jit::protectEngine->unlock();
isolate->module->initialise();
-
+
isolate->bootstrapThread = vm_new(isolate, JavaThread)();
isolate->bootstrapThread->initialise(0, isolate);
void* baseSP = mvm::Thread::get()->baseSP;
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Mon May 19 07:42:17 2008
@@ -730,7 +730,6 @@
}
func->setLinkage(GlobalValue::ExternalLinkage);
- mvm::jit::runPasses(llvmFunction, JavaThread::get()->perFunctionPasses);
/*
if (compilingMethod->name ==
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h Mon May 19 07:42:17 2008
@@ -219,8 +219,6 @@
static void printBacktrace();
static int getBacktrace(void** array, int size);
static JavaMethod* IPToJavaMethod(void* ip);
- static void initialise();
- static void AddStandardCompilePasses(llvm::FunctionPassManager*);
};
enum Opcode {
Removed: vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp?rev=51245&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp (removed)
@@ -1,97 +0,0 @@
-//===------JavaJITInitialise.cpp - Initialization of LLVM objects ---------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <stddef.h>
-
-#include "llvm/CallingConv.h"
-#include "llvm/Instructions.h"
-#include "llvm/LinkAllPasses.h"
-#include "llvm/Module.h"
-#include "llvm/ParameterAttributes.h"
-#include "llvm/Analysis/LoopPass.h"
-#include "llvm/Support/MutexGuard.h"
-
-
-#include "mvm/JIT.h"
-#include "mvm/Method.h"
-
-#include "JavaArray.h"
-#include "JavaCache.h"
-#include "JavaClass.h"
-#include "JavaJIT.h"
-#include "JavaObject.h"
-#include "JavaThread.h"
-#include "Jnjvm.h"
-#include "JnjvmModuleProvider.h"
-#ifdef SERVICE_VM
-#include "ServiceDomain.h"
-#endif
-
-using namespace jnjvm;
-using namespace llvm;
-
-namespace mvm {
-
-llvm::FunctionPass* createEscapeAnalysisPass(llvm::Function*, llvm::Function*);
-llvm::FunctionPass* createLowerConstantCallsPass();
-//llvm::FunctionPass* createArrayChecksPass();
-
-}
-
-static void addPass(FunctionPassManager *PM, Pass *P) {
- // Add the pass to the pass manager...
- PM->add(P);
-}
-
-void JavaJIT::AddStandardCompilePasses(FunctionPassManager *PM) {
- llvm::MutexGuard locked(mvm::jit::executionEngine->lock);
- // LLVM does not allow calling functions from other modules in verifier
- //PM->add(llvm::createVerifierPass()); // Verify that input is correct
-
- addPass(PM, llvm::createCFGSimplificationPass()); // Clean up disgusting code
- addPass(PM, llvm::createPromoteMemoryToRegisterPass());// Kill useless allocas
- addPass(PM, llvm::createInstructionCombiningPass()); // Clean up after IPCP & DAE
- addPass(PM, llvm::createCFGSimplificationPass()); // Clean up after IPCP & DAE
-
- addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code
- addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations
- addPass(PM, createInstructionCombiningPass()); // Cleanup for scalarrepl.
- addPass(PM, createJumpThreadingPass()); // Thread jumps.
- addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
- addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas
- addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
- addPass(PM, createCondPropagationPass()); // Propagate conditionals
-
- addPass(PM, createTailCallEliminationPass()); // Eliminate tail calls
- addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
- addPass(PM, createReassociatePass()); // Reassociate expressions
- addPass(PM, createLoopRotatePass());
- addPass(PM, createLICMPass()); // Hoist loop invariants
- addPass(PM, createLoopUnswitchPass()); // Unswitch loops.
- addPass(PM, createLoopIndexSplitPass()); // Index split loops.
- addPass(PM, createIndVarSimplifyPass()); // Canonicalize indvars
- addPass(PM, createLoopDeletionPass()); // Delete dead loops
- addPass(PM, createLoopUnrollPass()); // Unroll small loops
- addPass(PM, createInstructionCombiningPass()); // Clean up after the unroller
- addPass(PM, createGVNPass()); // Remove redundancies
- addPass(PM, createMemCpyOptPass()); // Remove memcpy / form memset
- addPass(PM, createSCCPPass()); // Constant prop with SCCP
-
- addPass(PM, mvm::createLowerConstantCallsPass());
-
- // Run instcombine after redundancy elimination to exploit opportunities
- // opened up by them.
- addPass(PM, createInstructionCombiningPass());
- addPass(PM, createCondPropagationPass()); // Propagate conditionals
-
- addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores
- addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
- addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
-}
-
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp Mon May 19 07:42:17 2008
@@ -201,11 +201,6 @@
return vm->getClassDelegatee(cl);
}
-void JavaJIT::initialise() {
- void* p;
- p = (void*)&runtimeUTF8ToStr;
-}
-
extern "C" Class* newLookup(Class* caller, uint32 index, Class** toAlloc,
uint32 clinit) {
JavaCtpInfo* ctpInfo = caller->ctpInfo;
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp Mon May 19 07:42:17 2008
@@ -7,10 +7,6 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/PassManager.h"
-#include "llvm/Analysis/Passes.h"
-#include "llvm/Target/TargetData.h"
-
#include "mvm/JIT.h"
#include "mvm/PrintBuffer.h"
#include "mvm/Threads/Key.h"
@@ -22,8 +18,6 @@
#include "JavaObject.h"
#include "JavaThread.h"
#include "Jnjvm.h"
-#include "JnjvmModule.h"
-#include "JnjvmModuleProvider.h"
using namespace jnjvm;
@@ -35,9 +29,10 @@
buf->write("Thread:");
javaThread->print(buf);
}
-
+
void JavaThread::destroyer(size_t sz) {
- delete perFunctionPasses;
+ delete lock;
+ delete varcond;
}
JavaThread* JavaThread::get() {
@@ -53,10 +48,6 @@
this->state = StateRunning;
this->self = mvm::Thread::self();
this->pendingException = 0;
- ModuleProvider* MP = isolate->TheModuleProvider;
- this->perFunctionPasses = new llvm::FunctionPassManager(MP);
- this->perFunctionPasses->add(new llvm::TargetData(isolate->module));
- JavaJIT::AddStandardCompilePasses(this->perFunctionPasses);
}
JavaObject* JavaThread::currentThread() {
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h Mon May 19 07:42:17 2008
@@ -12,8 +12,6 @@
#include <setjmp.h>
-#include "llvm/PassManager.h"
-
#include "mvm/Object.h"
#include "mvm/Threads/Cond.h"
#include "mvm/Threads/Key.h"
@@ -43,7 +41,6 @@
unsigned int self;
unsigned int interruptFlag;
unsigned int state;
- llvm::FunctionPassManager* perFunctionPasses;
std::vector<jmp_buf*> sjlj_buffers;
static const unsigned int StateRunning;
Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h Mon May 19 07:42:17 2008
@@ -265,6 +265,7 @@
JnjvmModule* module;
JnjvmModuleProvider* TheModuleProvider;
+
#ifndef MULTIPLE_GC
void* allocateObject(unsigned int sz, VirtualTable* VT) {
return gc::operator new(sz, VT);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Mon May 19 07:42:17 2008
@@ -1060,3 +1060,10 @@
void* JnjvmModule::getMethod(JavaMethod* meth) {
return getMethodInfo(meth)->getMethod();
}
+
+JnjvmModule::JnjvmModule(const std::string &ModuleID) : llvm::Module(ModuleID) {
+ std::string str =
+ mvm::jit::executionEngine->getTargetData()->getStringRepresentation();
+ setDataLayout(str);
+}
+
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Mon May 19 07:42:17 2008
@@ -236,6 +236,7 @@
public:
+
static llvm::ConstantInt* JavaArraySizeOffsetConstant;
static llvm::ConstantInt* JavaArrayElementsOffsetConstant;
static llvm::ConstantInt* JavaObjectLockOffsetConstant;
@@ -345,7 +346,7 @@
LLVMServiceInfo* getServiceInfo(ServiceDomain*);
#endif
- explicit JnjvmModule(const std::string &ModuleID) : llvm::Module(ModuleID) {}
+ explicit JnjvmModule(const std::string &ModuleID);
void initialise();
};
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp Mon May 19 07:42:17 2008
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/LinkAllPasses.h"
+#include "llvm/Analysis/LoopPass.h"
+#include "llvm/Support/MutexGuard.h"
+
#include "mvm/JIT.h"
#include "JavaAccess.h"
@@ -111,6 +115,7 @@
jit.nativeCompile();
} else {
jit.javaCompile();
+ mvm::jit::runPasses(func, perFunctionPasses);
}
}
@@ -140,3 +145,70 @@
void JnjvmModuleProvider::addFunction(Function* F, JavaMethod* meth) {
functions.insert(std::make_pair(F, meth));
}
+
+
+namespace mvm {
+ llvm::FunctionPass* createEscapeAnalysisPass(llvm::Function*, llvm::Function*);
+ llvm::FunctionPass* createLowerConstantCallsPass();
+}
+
+static void addPass(FunctionPassManager *PM, Pass *P) {
+ // Add the pass to the pass manager...
+ PM->add(P);
+}
+
+static void AddStandardCompilePasses(FunctionPassManager *PM) {
+ llvm::MutexGuard locked(mvm::jit::executionEngine->lock);
+ // LLVM does not allow calling functions from other modules in verifier
+ //PM->add(llvm::createVerifierPass()); // Verify that input is correct
+
+ addPass(PM, llvm::createCFGSimplificationPass()); // Clean up disgusting code
+ addPass(PM, llvm::createPromoteMemoryToRegisterPass());// Kill useless allocas
+ addPass(PM, llvm::createInstructionCombiningPass()); // Clean up after IPCP & DAE
+ addPass(PM, llvm::createCFGSimplificationPass()); // Clean up after IPCP & DAE
+
+ addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code
+ addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations
+ addPass(PM, createInstructionCombiningPass()); // Cleanup for scalarrepl.
+ addPass(PM, createJumpThreadingPass()); // Thread jumps.
+ addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
+ addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas
+ addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
+ addPass(PM, createCondPropagationPass()); // Propagate conditionals
+
+ addPass(PM, createTailCallEliminationPass()); // Eliminate tail calls
+ addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
+ addPass(PM, createReassociatePass()); // Reassociate expressions
+ addPass(PM, createLoopRotatePass());
+ addPass(PM, createLICMPass()); // Hoist loop invariants
+ addPass(PM, createLoopUnswitchPass()); // Unswitch loops.
+ addPass(PM, createLoopIndexSplitPass()); // Index split loops.
+ addPass(PM, createIndVarSimplifyPass()); // Canonicalize indvars
+ addPass(PM, createLoopDeletionPass()); // Delete dead loops
+ addPass(PM, createLoopUnrollPass()); // Unroll small loops
+ addPass(PM, createInstructionCombiningPass()); // Clean up after the unroller
+ addPass(PM, createGVNPass()); // Remove redundancies
+ addPass(PM, createMemCpyOptPass()); // Remove memcpy / form memset
+ addPass(PM, createSCCPPass()); // Constant prop with SCCP
+
+ addPass(PM, mvm::createLowerConstantCallsPass());
+
+ // Run instcombine after redundancy elimination to exploit opportunities
+ // opened up by them.
+ addPass(PM, createInstructionCombiningPass());
+ addPass(PM, createCondPropagationPass()); // Propagate conditionals
+
+ addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores
+ addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
+ addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
+}
+
+JnjvmModuleProvider::JnjvmModuleProvider(JnjvmModule *m) {
+ TheModule = (Module*)m;
+ mvm::jit::protectEngine->lock();
+ mvm::jit::executionEngine->addModuleProvider(this);
+ mvm::jit::protectEngine->unlock();
+ perFunctionPasses = new llvm::FunctionPassManager(this);
+ perFunctionPasses->add(new llvm::TargetData(m));
+ AddStandardCompilePasses(perFunctionPasses);
+}
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h Mon May 19 07:42:17 2008
@@ -20,33 +20,6 @@
class JnjvmModule;
-class FunctionMap :
- public LockedMap<llvm::Function*, std::pair<Class*, uint32>*,
- std::less<llvm::Function*> > {
-public:
- static VirtualTable* VT;
-
- FunctionMap() {
- lock = mvm::Lock::allocNormal();
- }
-
- virtual void TRACER;
-};
-
-class FunctionDefMap :
- public LockedMap<llvm::Function*, JavaMethod*,
- std::less<llvm::Function*> > {
-public:
- static VirtualTable* VT;
-
- FunctionDefMap() {
- lock = mvm::Lock::allocNormal();
- }
-
- virtual void TRACER;
-};
-
-
class JnjvmModuleProvider : public ModuleProvider {
private:
JavaMethod* staticLookup(Class* caller, uint32 index);
@@ -63,12 +36,11 @@
typedef std::map<llvm::Function*, std::pair<Class*, uint32> >::iterator
callback_iterator;
+ llvm::FunctionPassManager* perFunctionPasses;
public:
- JnjvmModuleProvider(JnjvmModule *m) {
- TheModule = (Module*)m;
- }
+ JnjvmModuleProvider(JnjvmModule *m);
llvm::Function* addCallback(Class* cl, uint32 index, Signdef* sign,
bool stat);
Modified: vmkit/trunk/lib/JnJVM/VMCore/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Makefile.am?rev=51246&r1=51245&r2=51246&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/Makefile.am (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/Makefile.am Mon May 19 07:42:17 2008
@@ -12,7 +12,7 @@
JavaIsolate.h JavaIsolate.cpp JavaString.h JavaString.cpp JavaInitialise.cpp JavaJITOpcodes.cpp \
JavaBacktrace.cpp NativeUtil.h NativeUtil.cpp Jni.cpp \
JavaCache.h JavaCache.cpp JavaUpcalls.h JavaUpcalls.cpp \
- JnjvmModuleProvider.h JnjvmModuleProvider.cpp JavaRuntimeJIT.cpp JavaMetaJIT.cpp JavaJITInitialise.cpp \
+ JnjvmModuleProvider.h JnjvmModuleProvider.cpp JavaRuntimeJIT.cpp JavaMetaJIT.cpp \
LowerConstantCalls.cpp JnjvmModule.h JnjvmModule.cpp
if SERVICE_BUILD
More information about the llvm-commits
mailing list