[PATCH] D158686: [BOLT] Give precedence to first AddressMap entries

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 12:00:05 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGb5ac1697c88b: [BOLT] Give precedence to first AddressMap entries (authored by rafauler).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158686

Files:
  bolt/lib/Core/AddressMap.cpp


Index: bolt/lib/Core/AddressMap.cpp
===================================================================
--- bolt/lib/Core/AddressMap.cpp
+++ bolt/lib/Core/AddressMap.cpp
@@ -52,7 +52,8 @@
   while (Cursor && !DE.eof(Cursor)) {
     const auto Input = DE.getAddress(Cursor);
     const auto Output = DE.getAddress(Cursor);
-    Parsed.Map.insert({Input, Output});
+    if (!Parsed.Map.count(Input))
+      Parsed.Map.insert({Input, Output});
   }
 
   assert(Cursor && "Error reading address map section");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158686.553221.patch
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230824/09ffa890/attachment.bin>


More information about the llvm-commits mailing list