Skip to content

Commit 77fcdb9

Browse files
[Scalar] Avoid repeated hash lookups (NFC) (#132660)
1 parent ed43207 commit 77fcdb9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,12 +3295,12 @@ static void computeLiveInValues(DominatorTree &DT, Function &F,
32953295
assert(!Data.LiveSet[&BB].count(Kill) && "live set contains kill");
32963296
#endif
32973297

3298-
Data.LiveOut[&BB] = SetVector<Value *>();
3299-
computeLiveOutSeed(&BB, Data.LiveOut[&BB], GC);
3300-
Data.LiveIn[&BB] = Data.LiveSet[&BB];
3301-
Data.LiveIn[&BB].set_union(Data.LiveOut[&BB]);
3302-
Data.LiveIn[&BB].set_subtract(Data.KillSet[&BB]);
3303-
if (!Data.LiveIn[&BB].empty())
3298+
auto &Out = Data.LiveOut[&BB] = SetVector<Value *>();
3299+
computeLiveOutSeed(&BB, Out, GC);
3300+
auto &In = Data.LiveIn[&BB] = Data.LiveSet[&BB];
3301+
In.set_union(Out);
3302+
In.set_subtract(Data.KillSet[&BB]);
3303+
if (!In.empty())
33043304
Worklist.insert_range(predecessors(&BB));
33053305
}
33063306

0 commit comments

Comments
 (0)