[PATCH] D87245: [LLD][ELF] Fix performance of MarkLive::scanEhFrameSection

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 01:51:55 PDT 2020


andrewng updated this revision to Diff 290432.
andrewng edited the summary of this revision.
andrewng added a comment.

Address review comments.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87245/new/

https://reviews.llvm.org/D87245

Files:
  lld/ELF/MarkLive.cpp


Index: lld/ELF/MarkLive.cpp
===================================================================
--- lld/ELF/MarkLive.cpp
+++ lld/ELF/MarkLive.cpp
@@ -152,9 +152,9 @@
     // a LSDA. We only need to keep the LSDA alive, so ignore anything that
     // points to executable sections.
     uint64_t pieceEnd = piece.inputOff + piece.size;
-    for (size_t j = firstRelI, end2 = rels.size(); j < end2; ++j)
-      if (rels[j].r_offset < pieceEnd)
-        resolveReloc(eh, rels[j], true);
+    for (size_t j = firstRelI, end2 = rels.size();
+         j < end2 && rels[j].r_offset < pieceEnd; ++j)
+      resolveReloc(eh, rels[j], true);
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87245.290432.patch
Type: text/x-patch
Size: 643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200908/501b8b86/attachment.bin>


More information about the llvm-commits mailing list