#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/PassManager.h"
-#include <map>
namespace llvm {
JITState *jitstate;
JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji,
- JITMemoryManager *JMM);
+ JITMemoryManager *JMM, bool Fast);
public:
~JIT();
/// create - Create an return a new JIT compiler if there is one available
/// for the current target. Otherwise, return null.
///
- static ExecutionEngine *create(ModuleProvider *MP, std::string *Err) {
- return createJIT(MP, Err, 0);
+ static ExecutionEngine *create(ModuleProvider *MP, std::string *Err,
+ bool Fast = false) {
+ return createJIT(MP, Err, 0, Fast);
}
virtual void addModuleProvider(ModuleProvider *MP);
MachineCodeEmitter *getCodeEmitter() const { return MCE; }
static ExecutionEngine *createJIT(ModuleProvider *MP, std::string *Err,
- JITMemoryManager *JMM);
+ JITMemoryManager *JMM, bool Fast);
private:
static MachineCodeEmitter *createEmitter(JIT &J, JITMemoryManager *JMM);
void runJITOnFunction (Function *F);
+
+protected:
+
+ /// getMemoryforGV - Allocate memory for a global variable.
+ virtual char* getMemoryForGV(const GlobalVariable* GV);
+
};
} // End llvm namespace