[llvm] [Scalar] Avoid repeated hash lookups (NFC) (PR #128463)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 23 21:20:53 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/128463.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Scalar/ConstantHoisting.cpp (+1-2)
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp b/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
index a18defa9ff5cb..b775977073dbb 100644
--- a/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
@@ -274,8 +274,7 @@ static void findBestInsertionSet(DominatorTree &DT, BlockFrequencyInfo &BFI,
InsertPtsMap.reserve(Orders.size() + 1);
for (BasicBlock *Node : llvm::reverse(Orders)) {
bool NodeInBBs = BBs.count(Node);
- auto &InsertPts = InsertPtsMap[Node].first;
- BlockFrequency &InsertPtsFreq = InsertPtsMap[Node].second;
+ auto &[InsertPts, InsertPtsFreq] = InsertPtsMap[Node];
// Return the optimal insert points in BBs.
if (Node == Entry) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/128463
More information about the llvm-commits
mailing list