[llvm] 099a11f - [ExecutionEngine] Avoid repeated hash lookups (NFC) (#131959)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 19 07:13:45 PDT 2025


Author: Kazu Hirata
Date: 2025-03-19T07:13:42-07:00
New Revision: 099a11f4ab02d13fba6e5c36fdb89881075b6216

URL: https://github.com/llvm/llvm-project/commit/099a11f4ab02d13fba6e5c36fdb89881075b6216
DIFF: https://github.com/llvm/llvm-project/commit/099a11f4ab02d13fba6e5c36fdb89881075b6216.diff

LOG: [ExecutionEngine] Avoid repeated hash lookups (NFC) (#131959)

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp
index e2669fd1fc86b..11a9cca4a9b4f 100644
--- a/llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp
@@ -274,6 +274,6 @@ Error ReOptimizeLayer::handleRemoveResources(JITDylib &JD, ResourceKey K) {
 void ReOptimizeLayer::handleTransferResources(JITDylib &JD, ResourceKey DstK,
                                               ResourceKey SrcK) {
   std::unique_lock<std::mutex> Lock(Mutex);
-  MUResources[DstK].insert(MUResources[SrcK].begin(), MUResources[SrcK].end());
+  MUResources[DstK].insert_range(MUResources[SrcK]);
   MUResources.erase(SrcK);
 }


        


More information about the llvm-commits mailing list