Implement ExecutionEngine::freeMachineCodeForFunction()
authorMisha Brukman <brukman+llvm@gmail.com>
Sun, 7 Nov 2004 23:58:46 +0000 (23:58 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Sun, 7 Nov 2004 23:58:46 +0000 (23:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17601 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/Interpreter/Interpreter.h
lib/ExecutionEngine/JIT/JIT.cpp
lib/ExecutionEngine/JIT/JIT.h

index e146135cf5f5866c962ae258f232c7b6704e1545..8af2361ebaebe5170fe99f9fbf459b70bedff59d 100644 (file)
@@ -120,6 +120,10 @@ public:
     return getPointerToFunction(F);
   }
 
+  /// freeMachineCodeForFunction - The interpreter does not generate any code.
+  ///
+  void freeMachineCodeForFunction(Function *F) { }
+  
   // Methods used to execute code:
   // Place a call on the stack
   void callFunction(Function *F, const std::vector<GenericValue> &ArgVals);
index 7596c4379731e79d2cfde04f7099a46c291fdf7c..d9866c87ee4225a83189a76ef5cf28f13cf02536 100644 (file)
@@ -330,3 +330,9 @@ void *JIT::recompileAndRelinkFunction(Function *F) {
   TJI.replaceMachineCodeForFunction(OldAddr, Addr);
   return Addr;
 }
+
+/// freeMachineCodeForFunction - release machine code memory for given Function
+///
+void JIT::freeMachineCodeForFunction(Function *F) {
+  // currently a no-op
+}
index 414d1c6e6832ebffec18d716699be11482afc32f..b0c26b0d2cc8d17ab426d9dba8edccd9f6868ca0 100644 (file)
@@ -90,6 +90,11 @@ public:
   ///
   void *recompileAndRelinkFunction(Function *F);
 
+  /// freeMachineCodeForFunction - deallocate memory used to code-generate this
+  /// Function.
+  ///
+  void freeMachineCodeForFunction(Function *F);
+
 private:
   static MachineCodeEmitter *createEmitter(JIT &J);
   void runJITOnFunction (Function *F);