We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35efc27 commit 47fa67aCopy full SHA for 47fa67a
llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
@@ -620,14 +620,14 @@ class SPIRVStructurizer : public FunctionPass {
620
std::vector<Edge> Output;
621
622
for (auto &[Src, Dst] : Edges) {
623
- if (Seen.count(Src) == 0) {
624
- Seen.emplace(Src, Dst);
+ auto [iterator, inserted] = Seen.insert({Src, Dst});
+ if (inserted) {
625
Output.emplace_back(Src, Dst);
626
continue;
627
}
628
629
// The exact same edge was already seen. Ignoring.
630
- if (Seen[Src] == Dst)
+ if (iterator->second == Dst)
631
632
633
// The same Src block branches to 2 distinct blocks. This will be an
0 commit comments