Skip to content

Commit 5b79cb7

Browse files
committed
Remove a obsolete RC identity cache, we have a cache in the RCIdentity analysis itself now
1 parent b5b905e commit 5b79cb7

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/SILOptimizer/Transforms/RetainReleaseCodeMotion.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,9 @@ class CodeMotionContext {
224224
/// we compute the genset and killset.
225225
llvm::SmallPtrSet<SILBasicBlock *, 8> InterestBlocks;
226226

227-
/// An RC-identity cache.
228-
/// TODO: this should be cached in RCIdentity analysis.
229-
llvm::DenseMap<SILValue, SILValue> RCCache;
230-
231227
/// Return the rc-identity root of the SILValue.
232228
SILValue getRCRoot(SILValue R) {
233-
auto Iter = RCCache.find(R);
234-
if (Iter != RCCache.end())
235-
return Iter->second;
236-
return RCCache[R] = RCFI->getRCIdentityRoot(R);
229+
return RCFI->getRCIdentityRoot(R);
237230
}
238231

239232
/// Return the rc-identity root of the RC instruction, i.e.

0 commit comments

Comments
 (0)