aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachinePipeliner.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-18 10:17:22 -0700
committerKazu Hirata <kazu@google.com>2022-06-18 10:17:22 -0700
commit4271a1ff33802b4be06945d6ee6b45f8b6bedc74 (patch)
tree65ad522a8d11a67e5c7730a8d7f63a6566acc09a /llvm/lib/CodeGen/MachinePipeliner.cpp
parenteca86cb2edfd63c296ec3fa30697276f2ddcfbb8 (diff)
downloadllvm-4271a1ff33802b4be06945d6ee6b45f8b6bedc74.zip
llvm-4271a1ff33802b4be06945d6ee6b45f8b6bedc74.tar.gz
llvm-4271a1ff33802b4be06945d6ee6b45f8b6bedc74.tar.bz2
[llvm] Call *set::insert without checking membership first (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/MachinePipeliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachinePipeliner.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index ecb6870..8d50039 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -1298,8 +1298,7 @@ bool SwingSchedulerDAG::Circuits::circuit(int V, int S, NodeSetType &NodeSets,
for (auto W : AdjK[V]) {
if (W < S)
continue;
- if (B[W].count(SV) == 0)
- B[W].insert(SV);
+ B[W].insert(SV);
}
}
Stack.pop_back();