summaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-10-14 10:04:52 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-10-14 10:04:52 +0000
commitc8ed902298b79e8a740e4f707f13089cf5ce1295 (patch)
tree97c3b42a10f9d7789e03d802f09b3d429290985d /lib/ExecutionEngine
parent9ba237990633f092385adc815d1f6cc4680eb9f7 (diff)
downloadexternal_llvm-c8ed902298b79e8a740e4f707f13089cf5ce1295.zip
external_llvm-c8ed902298b79e8a740e4f707f13089cf5ce1295.tar.gz
external_llvm-c8ed902298b79e8a740e4f707f13089cf5ce1295.tar.bz2
little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57484 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index acc89c9..55151cb 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -963,7 +963,7 @@ void ExecutionEngine::emitGlobals() {
LinkedGlobalsMap[std::make_pair(GV->getName(), GV->getType())];
void *Ptr = getPointerToGlobalIfAvailable(CGV);
assert(Ptr && "Canonical global wasn't codegen'd!");
- addGlobalMapping(GV, getPointerToGlobalIfAvailable(CGV));
+ addGlobalMapping(GV, Ptr);
}
}