Skip to content

Commit 2f98ae5

Browse files
[Transforms] Avoid repeated hash lookups (NFC) (#125350)
1 parent 2cac0bf commit 2f98ae5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

llvm/lib/Transforms/Scalar/NewGVN.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3056,13 +3056,8 @@ std::pair<unsigned, unsigned> NewGVN::assignDFSNumbers(BasicBlock *B,
30563056

30573057
void NewGVN::updateProcessedCount(const Value *V) {
30583058
#ifndef NDEBUG
3059-
if (ProcessedCount.count(V) == 0) {
3060-
ProcessedCount.insert({V, 1});
3061-
} else {
3062-
++ProcessedCount[V];
3063-
assert(ProcessedCount[V] < 100 &&
3064-
"Seem to have processed the same Value a lot");
3065-
}
3059+
assert(++ProcessedCount[V] < 100 &&
3060+
"Seem to have processed the same Value a lot");
30663061
#endif
30673062
}
30683063

0 commit comments

Comments
 (0)