[llvm] r222758 - Remove a bit of duplicated code.
Rafael Espindola
rafael.espindola at gmail.com
Tue Nov 25 05:19:46 PST 2014
Author: rafael
Date: Tue Nov 25 07:19:46 2014
New Revision: 222758
URL: http://llvm.org/viewvc/llvm-project?rev=222758&view=rev
Log:
Remove a bit of duplicated code.
Exactly the same checks are present in areTypesIsomorphic.
This might have been a premature performance optimization. I cannot reproduce
any slowdown with this patch.
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=222758&r1=222757&r2=222758&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Tue Nov 25 07:19:46 2014
@@ -96,14 +96,6 @@ private:
}
void TypeMapTy::addTypeMapping(Type *DstTy, Type *SrcTy) {
- Type *&Entry = MappedTypes[SrcTy];
- if (Entry) return;
-
- if (DstTy == SrcTy) {
- Entry = DstTy;
- return;
- }
-
// Check to see if these types are recursively isomorphic and establish a
// mapping between them if so.
if (areTypesIsomorphic(DstTy, SrcTy)) {
More information about the llvm-commits
mailing list