[llvm-commits] [llvm] r57484 - /llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp

Nuno Lopes nunoplopes at sapo.pt
Tue Oct 14 03:04:53 PDT 2008


Author: nlopes
Date: Tue Oct 14 05:04:52 2008
New Revision: 57484

URL: http://llvm.org/viewvc/llvm-project?rev=57484&view=rev
Log:
little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()

Modified:
    llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp

Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=57484&r1=57483&r2=57484&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Tue Oct 14 05:04:52 2008
@@ -963,7 +963,7 @@
           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);
       }
     }
     





More information about the llvm-commits mailing list