Skip to content

Commit ca641b2

Browse files
[Analysis] Avoid repeated hash lookups (NFC) (llvm#131066)
1 parent 7714df9 commit ca641b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Analysis/MemoryDependenceAnalysis.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,10 +1620,12 @@ void MemoryDependenceResults::removeInstruction(Instruction *RemInst) {
16201620
assert(P.getPointer() != RemInst &&
16211621
"Already removed NonLocalPointerDeps info for RemInst");
16221622

1623-
NonLocalDepInfo &NLPDI = NonLocalPointerDeps[P].NonLocalDeps;
1623+
auto &NLPD = NonLocalPointerDeps[P];
1624+
1625+
NonLocalDepInfo &NLPDI = NLPD.NonLocalDeps;
16241626

16251627
// The cache is not valid for any specific block anymore.
1626-
NonLocalPointerDeps[P].Pair = BBSkipFirstBlockPair();
1628+
NLPD.Pair = BBSkipFirstBlockPair();
16271629

16281630
// Update any entries for RemInst to use the instruction after it.
16291631
for (auto &Entry : NLPDI) {

0 commit comments

Comments
 (0)