[llvm] d497766 - [Hexagon] Avoid repeated map lookups (NFC) (#127447)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 17 01:32:51 PST 2025
Author: Kazu Hirata
Date: 2025-02-17T01:32:47-08:00
New Revision: d49776634e3c4bd62649e8e0fc0ff44951413c69
URL: https://github.com/llvm/llvm-project/commit/d49776634e3c4bd62649e8e0fc0ff44951413c69
DIFF: https://github.com/llvm/llvm-project/commit/d49776634e3c4bd62649e8e0fc0ff44951413c69.diff
LOG: [Hexagon] Avoid repeated map lookups (NFC) (#127447)
Added:
Modified:
llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp b/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
index d95d4c0d20318..ea7a429056be9 100644
--- a/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
@@ -604,8 +604,10 @@ void HexagonCommonGEP::common() {
uint32_t NF = N->Flags;
// If N is used, append all original values of N to the list of
// original values of Min.
- if (NF & GepNode::Used)
- MinUs.insert(Uses[N].begin(), Uses[N].end());
+ if (NF & GepNode::Used) {
+ auto &U = Uses[N];
+ MinUs.insert(U.begin(), U.end());
+ }
Flags |= NF;
}
if (MinUs.empty())
More information about the llvm-commits
mailing list