aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2025-04-01 08:45:46 +0100
committerFlorian Hahn <flo@fhahn.com>2025-04-01 08:45:46 +0100
commit64d493f987dc24b3d7e45daade9b0e8bfa1cc471 (patch)
treeac55853b733066bdd4df967188453786b942e4a1 /llvm/lib
parentc5afcfe0bb44067b2cd050ed9cff311eada9cc37 (diff)
downloadllvm-64d493f987dc24b3d7e45daade9b0e8bfa1cc471.zip
llvm-64d493f987dc24b3d7e45daade9b0e8bfa1cc471.tar.gz
llvm-64d493f987dc24b3d7e45daade9b0e8bfa1cc471.tar.bz2
[EquivalenceClasses] Return ECValue directly from insert (NFC).
Removes a redundant lookup in the mapping.:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/LowerTypeTests.cpp2
-rw-r--r--llvm/lib/Transforms/Utils/SplitModule.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
index 6cc5d1d..299b3a9 100644
--- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
@@ -2239,7 +2239,7 @@ bool LowerTypeTestsModule::lower() {
auto Ins = TypeIdUsers.insert({TypeId, {}});
if (Ins.second) {
// Add the type identifier to the equivalence class.
- GlobalClassesTy::iterator GCI = GlobalClasses.insert(TypeId);
+ auto &GCI = GlobalClasses.insert(TypeId);
GlobalClassesTy::member_iterator CurSet = GlobalClasses.findLeader(GCI);
// Add the referenced globals to the type identifier's equivalence class.
diff --git a/llvm/lib/Transforms/Utils/SplitModule.cpp b/llvm/lib/Transforms/Utils/SplitModule.cpp
index 4f174fb..07956f3 100644
--- a/llvm/lib/Transforms/Utils/SplitModule.cpp
+++ b/llvm/lib/Transforms/Utils/SplitModule.cpp
@@ -203,7 +203,7 @@ static void findPartitions(Module &M, ClusterIDMapType &ClusterIDMap,
<< "\n");
for (ClusterMapType::member_iterator MI =
- GVtoClusterMap.findLeader(I.second);
+ GVtoClusterMap.findLeader(*I.second);
MI != GVtoClusterMap.member_end(); ++MI) {
if (!Visited.insert(*MI).second)
continue;