Make JIT::runFunction handle functions with non-C calling conventions.
[oota-llvm.git] / lib / ExecutionEngine / JIT / JIT.h
index a7105e3f218fe1542c44cb74e280da18f09ef2df..2eee2e980ce88112b369201cc7b68f5ef76df519 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
 #include "llvm/PassManager.h"
-#include <map>
 
 namespace llvm {
 
@@ -57,7 +56,7 @@ class JIT : public ExecutionEngine {
   JITState *jitstate;
 
   JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji, 
-      JITMemoryManager *JMM);
+      JITMemoryManager *JMM, bool Fast);
 public:
   ~JIT();
 
@@ -72,8 +71,9 @@ public:
   /// 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);
@@ -129,11 +129,17 @@ public:
   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