Skip to content

Commit d27175d

Browse files
[Scalar] Avoid repeated hash lookups (NFC) (#135751)
1 parent a42ac55 commit d27175d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3332,10 +3332,10 @@ static void computeLiveInValues(DominatorTree &DT, Function &F,
33323332
LiveTmp.set_subtract(Data.KillSet[BB]);
33333333

33343334
assert(Data.LiveIn.count(BB));
3335-
const SetVector<Value *> &OldLiveIn = Data.LiveIn[BB];
3336-
// assert: OldLiveIn is a subset of LiveTmp
3337-
if (OldLiveIn.size() != LiveTmp.size()) {
3338-
Data.LiveIn[BB] = LiveTmp;
3335+
SetVector<Value *> &LiveIn = Data.LiveIn[BB];
3336+
// assert: LiveIn is a subset of LiveTmp
3337+
if (LiveIn.size() != LiveTmp.size()) {
3338+
LiveIn = std::move(LiveTmp);
33393339
Worklist.insert_range(predecessors(BB));
33403340
}
33413341
} // while (!Worklist.empty())

0 commit comments

Comments
 (0)