[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue May 2 14:44:28 PDT 2006
Changes in directory llvm/lib/ExecutionEngine/JIT:
JITEmitter.cpp updated: 1.86 -> 1.87
---
Log message:
Minor cleanups, no functionality change.
---
Diffs of the changes: (+11 -17)
JITEmitter.cpp | 28 +++++++++++-----------------
1 files changed, 11 insertions(+), 17 deletions(-)
Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.86 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.87
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.86 Tue May 2 13:27:26 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Tue May 2 16:44:14 2006
@@ -54,10 +54,10 @@
class JITMemoryManager {
std::list<sys::MemoryBlock> Blocks; // List of blocks allocated by the JIT
unsigned char *FunctionBase; // Start of the function body area
- unsigned char *GlobalBase; // Start of the Global area
+ unsigned char *GlobalBase; // Start of the Global area
unsigned char *ConstantBase; // Memory allocated for constant pools
unsigned char *CurStubPtr, *CurFunctionPtr, *CurConstantPtr, *CurGlobalPtr;
- unsigned char *GOTBase; //Target Specific reserved memory
+ unsigned char *GOTBase; // Target Specific reserved memory
// centralize memory block allocation
sys::MemoryBlock getNewMemoryBlock(unsigned size);
@@ -72,9 +72,13 @@
unsigned Alignment);
inline unsigned char *startFunctionBody();
inline void endFunctionBody(unsigned char *FunctionEnd);
- inline unsigned char* getGOTBase() const;
-
- inline bool isManagingGOT() const;
+
+ unsigned char *getGOTBase() const {
+ return GOTBase;
+ }
+ bool isManagingGOT() const {
+ return GOTBase != NULL;
+ }
};
}
@@ -117,7 +121,7 @@
unsigned char *JITMemoryManager::allocateStub(unsigned StubSize) {
CurStubPtr -= StubSize;
if (CurStubPtr < FunctionBase) {
- //FIXME: allocate a new block
+ // FIXME: allocate a new block
std::cerr << "JIT ran out of memory for function stubs!\n";
abort();
}
@@ -169,14 +173,6 @@
CurFunctionPtr = FunctionEnd;
}
-unsigned char* JITMemoryManager::getGOTBase() const {
- return GOTBase;
-}
-
-bool JITMemoryManager::isManagingGOT() const {
- return GOTBase != NULL;
-}
-
sys::MemoryBlock JITMemoryManager::getNewMemoryBlock(unsigned size) {
const sys::MemoryBlock* BOld = 0;
if (Blocks.size())
@@ -439,9 +435,7 @@
public:
JITEmitter(JIT &jit) : MemMgr(jit.getJITInfo().needsGOT()) {
TheJIT = &jit;
- DEBUG(std::cerr <<
- (MemMgr.isManagingGOT() ? "JIT is managing GOT\n"
- : "JIT is not managing GOT\n"));
+ DEBUG(if (MemMgr.isManagingGOT()) std::cerr << "JIT is managing a GOT\n");
}
virtual void startFunction(MachineFunction &F);
More information about the llvm-commits
mailing list