Skip to content

Commit d497766

Browse files
[Hexagon] Avoid repeated map lookups (NFC) (llvm#127447)
1 parent fb14638 commit d497766

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,10 @@ void HexagonCommonGEP::common() {
604604
uint32_t NF = N->Flags;
605605
// If N is used, append all original values of N to the list of
606606
// original values of Min.
607-
if (NF & GepNode::Used)
608-
MinUs.insert(Uses[N].begin(), Uses[N].end());
607+
if (NF & GepNode::Used) {
608+
auto &U = Uses[N];
609+
MinUs.insert(U.begin(), U.end());
610+
}
609611
Flags |= NF;
610612
}
611613
if (MinUs.empty())

0 commit comments

Comments
 (0)