summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-11-07 23:58:46 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-11-07 23:58:46 +0000
commit624685d9a1ad18e4f9e29692c4c2bb754685c186 (patch)
treeb007c09c065e3f3ca6e108b57fa10aa09603a414 /llvm/lib/ExecutionEngine
parent0dcaaafa0b5c3c56fd4534cf7be76c5c2e99f2c2 (diff)
downloadbcm5719-llvm-624685d9a1ad18e4f9e29692c4c2bb754685c186.tar.gz
bcm5719-llvm-624685d9a1ad18e4f9e29692c4c2bb754685c186.zip
Implement ExecutionEngine::freeMachineCodeForFunction()
llvm-svn: 17601
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Interpreter.h4
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp6
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.h5
3 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
index e146135cf5f..8af2361ebae 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/llvm/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/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index 7596c437973..d9866c87ee4 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/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/llvm/lib/ExecutionEngine/JIT/JIT.h b/llvm/lib/ExecutionEngine/JIT/JIT.h
index 414d1c6e683..b0c26b0d2cc 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.h
+++ b/llvm/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);
OpenPOWER on IntegriCloud