aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-02 21:44:14 +0000
committerChris Lattner <sabre@nondot.org>2006-05-02 21:44:14 +0000
commita726c7f1fd3c3b75bbb3df8faa7676ef09cb15c8 (patch)
tree66d1b64ec4c4752af8b14f79751f4c4df89dcafe /lib/ExecutionEngine
parentd3f0aefc33965d3d0ca6f92af4ebaea354b063c4 (diff)
downloadexternal_llvm-a726c7f1fd3c3b75bbb3df8faa7676ef09cb15c8.zip
external_llvm-a726c7f1fd3c3b75bbb3df8faa7676ef09cb15c8.tar.gz
external_llvm-a726c7f1fd3c3b75bbb3df8faa7676ef09cb15c8.tar.bz2
Minor cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp28
1 files changed, 11 insertions, 17 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 108b6b8..f4abd28 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -54,10 +54,10 @@ namespace {
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 @@ namespace {
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 @@ JITMemoryManager::~JITMemoryManager() {
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 @@ void JITMemoryManager::endFunctionBody(unsigned char *FunctionEnd) {
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 @@ namespace {
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);