aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.h4
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp6
-rw-r--r--lib/ExecutionEngine/JIT/JIT.h5
3 files changed, 15 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h
index e146135..8af2361 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -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);
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 7596c43..d9866c8 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -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
+}
diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h
index 414d1c6..b0c26b0 100644
--- a/lib/ExecutionEngine/JIT/JIT.h
+++ b/lib/ExecutionEngine/JIT/JIT.h
@@ -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);