We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d37bc32 commit 2a5b09cCopy full SHA for 2a5b09c
llvm/lib/Transforms/Scalar/GVNSink.cpp
@@ -535,12 +535,12 @@ class ValueTable {
535
uint32_t e = ExpressionNumbering[exp];
536
if (!e) {
537
hash_code H = exp->getHashValue([=](Value *V) { return lookupOrAdd(V); });
538
- auto I = HashNumbering.find(H);
539
- if (I != HashNumbering.end()) {
+ auto [I, Inserted] = HashNumbering.try_emplace(H);
+ if (!Inserted) {
540
e = I->second;
541
} else {
542
e = nextValueNumber++;
543
- HashNumbering[H] = e;
+ I->second = e;
544
ExpressionNumbering[exp] = e;
545
}
546
0 commit comments