diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-07-12 00:31:47 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-07-12 00:31:47 +0000 |
| commit | 156907198e0bf699e6b39be3994caa4950b3e2aa (patch) | |
| tree | 136aee8a2ab9b70f4da9a51e63fc0453c8b88e2e /llvm/lib/ExecutionEngine | |
| parent | 6e662083d91f32d5661ce7cedce82c8660b016ff (diff) | |
| download | bcm5719-llvm-156907198e0bf699e6b39be3994caa4950b3e2aa.tar.gz bcm5719-llvm-156907198e0bf699e6b39be3994caa4950b3e2aa.zip | |
Remove non-portable optimization that isn't worth it
llvm-svn: 29115
Diffstat (limited to 'llvm/lib/ExecutionEngine')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 2bf0e13baf4..d2d8b499530 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -309,11 +309,7 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) { // space. Ptr = malloc(S+A); unsigned MisAligned = ((intptr_t)Ptr & (A-1)); - unsigned Offset = MisAligned ? (A-MisAligned) : 0; - - // Trim the tail off the memory block. - realloc(Ptr, S+Offset); - Ptr = (char*)Ptr + Offset; + Ptr = (char*)Ptr + (MisAligned ? (A-MisAligned) : 0); } state.getPendingGlobals(locked).push_back(GV); } |

