Skip to content

Commit 1e5f32e

Browse files
[Transforms] Avoid repeated hash lookups (NFC) (#111470)
1 parent 98c9c1a commit 1e5f32e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mlir/lib/Transforms/Utils/RegionUtils.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,7 @@ static SmallVector<SmallVector<Value, 8>, 2> pruneRedundantArguments(
709709
DenseMap<Value, unsigned> firstValueToIdx;
710710
for (unsigned j = 0; j < numArgs; ++j) {
711711
Value newArg = newArguments[0][j];
712-
if (!firstValueToIdx.contains(newArg))
713-
firstValueToIdx[newArg] = j;
712+
firstValueToIdx.try_emplace(newArg, j);
714713
}
715714

716715
// Go through the first list of arguments (list 0).

0 commit comments

Comments
 (0)