Skip to content

Commit 47cbc87

Browse files
[Scalar] Avoid repeated hash lookups (NFC) (#135585)
1 parent d0cf5cd commit 47cbc87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3287,8 +3287,9 @@ static void computeLiveInValues(DominatorTree &DT, Function &F,
32873287
// Seed the liveness for each individual block
32883288
for (BasicBlock &BB : F) {
32893289
Data.KillSet[&BB] = computeKillSet(&BB, GC);
3290-
Data.LiveSet[&BB].clear();
3291-
computeLiveInValues(BB.rbegin(), BB.rend(), Data.LiveSet[&BB], GC);
3290+
auto &LiveSet = Data.LiveSet[&BB];
3291+
LiveSet.clear();
3292+
computeLiveInValues(BB.rbegin(), BB.rend(), LiveSet, GC);
32923293

32933294
#ifndef NDEBUG
32943295
for (Value *Kill : Data.KillSet[&BB])

0 commit comments

Comments
 (0)