[llvm] [Scalar] Avoid repeated hash lookups (NFC) (PR #135585)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 13 20:26:25 PDT 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/135585.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (+3-2)
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index 22d41be4edb90..f98a693804645 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -3287,8 +3287,9 @@ static void computeLiveInValues(DominatorTree &DT, Function &F,
// Seed the liveness for each individual block
for (BasicBlock &BB : F) {
Data.KillSet[&BB] = computeKillSet(&BB, GC);
- Data.LiveSet[&BB].clear();
- computeLiveInValues(BB.rbegin(), BB.rend(), Data.LiveSet[&BB], GC);
+ auto &LiveSet = Data.LiveSet[&BB];
+ LiveSet.clear();
+ computeLiveInValues(BB.rbegin(), BB.rend(), LiveSet, GC);
#ifndef NDEBUG
for (Value *Kill : Data.KillSet[&BB])
``````````
</details>
https://github.com/llvm/llvm-project/pull/135585
More information about the llvm-commits
mailing list