[llvm] [Hexagon] Avoid repeated hash lookups (NFC) (PR #131719)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 17 20:57:03 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-hexagon
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/131719.diff
1 Files Affected:
- (modified) llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp (+1-4)
``````````diff
diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
index 4bb1b1eb22eba..53943de3bc597 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
@@ -2437,10 +2437,7 @@ void HexagonDAGToDAGISel::rebalanceAddressTrees() {
continue;
// This root node has already been processed
- if (RootWeights.count(N))
- continue;
-
- RootWeights[N] = -1;
+ RootWeights.try_emplace(N, -1);
}
// Balance node itself
``````````
</details>
https://github.com/llvm/llvm-project/pull/131719
More information about the llvm-commits
mailing list