[lld] r247964 - COFF: Remove useless micro-optimization.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 19:15:35 PDT 2015
Author: ruiu
Date: Thu Sep 17 21:15:34 2015
New Revision: 247964
URL: http://llvm.org/viewvc/llvm-project?rev=247964&view=rev
Log:
COFF: Remove useless micro-optimization.
This patch simplifies code by removing micro-optimization that doesn't
contribute to speed.
Modified:
lld/trunk/COFF/ICF.cpp
Modified: lld/trunk/COFF/ICF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/ICF.cpp?rev=247964&r1=247963&r2=247964&view=diff
==============================================================================
--- lld/trunk/COFF/ICF.cpp (original)
+++ lld/trunk/COFF/ICF.cpp Thu Sep 17 21:15:34 2015
@@ -137,8 +137,6 @@ bool ICF::equalsVariable(const SectionCh
auto Eq = [&](const coff_relocation &R1, const coff_relocation &R2) {
SymbolBody *B1 = A->File->getSymbolBody(R1.SymbolTableIndex)->repl();
SymbolBody *B2 = B->File->getSymbolBody(R2.SymbolTableIndex)->repl();
- if (B1 == B2)
- return true;
auto *D1 = dyn_cast<DefinedRegular>(B1);
auto *D2 = dyn_cast<DefinedRegular>(B2);
return D1 && D2 && D1->getChunk()->GroupID == D2->getChunk()->GroupID;
More information about the llvm-commits
mailing list