[llvm] e1d205a - [SCCP] Simplify code with DenseMap::operator[] (NFC) (#112473)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 00:09:17 PDT 2024
Author: Kazu Hirata
Date: 2024-10-16T00:09:12-07:00
New Revision: e1d205a3855898b413978ee457f37e361ae981bd
URL: https://github.com/llvm/llvm-project/commit/e1d205a3855898b413978ee457f37e361ae981bd
DIFF: https://github.com/llvm/llvm-project/commit/e1d205a3855898b413978ee457f37e361ae981bd.diff
LOG: [SCCP] Simplify code with DenseMap::operator[] (NFC) (#112473)
Added:
Modified:
llvm/lib/Transforms/Utils/SCCPSolver.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/SCCPSolver.cpp b/llvm/lib/Transforms/Utils/SCCPSolver.cpp
index 101d60525f4161..c65710ea7551ac 100644
--- a/llvm/lib/Transforms/Utils/SCCPSolver.cpp
+++ b/llvm/lib/Transforms/Utils/SCCPSolver.cpp
@@ -630,10 +630,7 @@ class SCCPInstVisitor : public InstVisitor<SCCPInstVisitor> {
}
// Add U as additional user of V.
- void addAdditionalUser(Value *V, User *U) {
- auto Iter = AdditionalUsers.insert({V, {}});
- Iter.first->second.insert(U);
- }
+ void addAdditionalUser(Value *V, User *U) { AdditionalUsers[V].insert(U); }
// Mark I's users as changed, including AdditionalUsers.
void markUsersAsChanged(Value *I) {
More information about the llvm-commits
mailing list