Skip to content

Commit e9dd4a8

Browse files
[Hexagon] Avoid repeated map lookups (NFC) (llvm#125815)
1 parent 7c2c7a4 commit e9dd4a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ bool Coloring::color() {
262262

263263
// Explicitly assign "None" to all uncolored nodes.
264264
for (unsigned I = 0; I != Order.size(); ++I)
265-
if (Colors.count(I) == 0)
266-
Colors[I] = ColorKind::None;
265+
Colors.try_emplace(I, ColorKind::None);
267266

268267
return true;
269268
}

0 commit comments

Comments
 (0)