Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Feb 27, 2025

@llvm/pr-subscribers-llvm-support

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/129000.diff

1 Files Affected:

  • (modified) llvm/lib/Support/DAGDeltaAlgorithm.cpp (+3-2)
diff --git a/llvm/lib/Support/DAGDeltaAlgorithm.cpp b/llvm/lib/Support/DAGDeltaAlgorithm.cpp
index 8b23b05913291..48302b8cb0621 100644
--- a/llvm/lib/Support/DAGDeltaAlgorithm.cpp
+++ b/llvm/lib/Support/DAGDeltaAlgorithm.cpp
@@ -201,8 +201,9 @@ DAGDeltaAlgorithmImpl::DAGDeltaAlgorithmImpl(
     std::set<change_ty> &ChangeSuccs = SuccClosure[Change];
     for (pred_iterator_ty it = pred_begin(Change),
            ie = pred_end(Change); it != ie; ++it) {
-      SuccClosure[*it].insert(Change);
-      SuccClosure[*it].insert(ChangeSuccs.begin(), ChangeSuccs.end());
+      auto &SC = SuccClosure[*it];
+      SC.insert(Change);
+      SC.insert(ChangeSuccs.begin(), ChangeSuccs.end());
       Worklist.push_back(*it);
     }
   }

@HCalculators

This comment was marked as spam.

@kazutakahirata kazutakahirata merged commit 3ce3872 into llvm:main Feb 27, 2025
13 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_repeated_hash_lookups_llvm_Support branch February 27, 2025 09:46
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants