[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp JITEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon May 8 15:01:06 PDT 2006
Changes in directory llvm/lib/ExecutionEngine/JIT:
JIT.cpp updated: 1.64 -> 1.65
JITEmitter.cpp updated: 1.96 -> 1.97
---
Log message:
Move some methods out of line so that MutexGuard.h isn't needed in a public header.
---
Diffs of the changes: (+10 -6)
JIT.cpp | 6 +-----
JITEmitter.cpp | 10 +++++++++-
2 files changed, 10 insertions(+), 6 deletions(-)
Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.64 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.65
--- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.64 Thu May 4 16:18:40 2006
+++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Mon May 8 17:00:52 2006
@@ -22,6 +22,7 @@
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/ExecutionEngine/GenericValue.h"
+#include "llvm/Support/MutexGuard.h"
#include "llvm/System/DynamicLibrary.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetJITInfo.h"
@@ -349,8 +350,3 @@
return Addr;
}
-/// freeMachineCodeForFunction - release machine code memory for given Function
-///
-void JIT::freeMachineCodeForFunction(Function *F) {
- // currently a no-op
-}
Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.96 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.97
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.96 Wed May 3 13:55:56 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Mon May 8 17:00:52 2006
@@ -26,6 +26,7 @@
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetJITInfo.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/MutexGuard.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/System/Memory.h"
#include <algorithm>
@@ -336,7 +337,14 @@
return getJITResolver(MCE).getFunctionStub(F);
}
-
+/// freeMachineCodeForFunction - release machine code memory for given Function.
+///
+void JIT::freeMachineCodeForFunction(Function *F) {
+ // Delete translation for this from the ExecutionEngine, so it will get
+ // retranslated next time it is used.
+ updateGlobalMapping(F, 0);
+
+}
//===----------------------------------------------------------------------===//
// JITEmitter code.
More information about the llvm-commits
mailing list