diff options
author | Kazu Hirata <kazu@google.com> | 2025-03-13 17:36:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-13 17:36:57 -0700 |
commit | ca641b29190fc712f070426e0fe40bb54338f97c (patch) | |
tree | 75566db667d61386c1c4989d59e1d2dbdc5fd4f0 /llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | 7714df909054c8fa9f5bda6ce738e9eee093e966 (diff) | |
download | llvm-ca641b29190fc712f070426e0fe40bb54338f97c.zip llvm-ca641b29190fc712f070426e0fe40bb54338f97c.tar.gz llvm-ca641b29190fc712f070426e0fe40bb54338f97c.tar.bz2 |
[Analysis] Avoid repeated hash lookups (NFC) (#131066)
Diffstat (limited to 'llvm/lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index dec5ee5..8550aaa 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -1620,10 +1620,12 @@ void MemoryDependenceResults::removeInstruction(Instruction *RemInst) { assert(P.getPointer() != RemInst && "Already removed NonLocalPointerDeps info for RemInst"); - NonLocalDepInfo &NLPDI = NonLocalPointerDeps[P].NonLocalDeps; + auto &NLPD = NonLocalPointerDeps[P]; + + NonLocalDepInfo &NLPDI = NLPD.NonLocalDeps; // The cache is not valid for any specific block anymore. - NonLocalPointerDeps[P].Pair = BBSkipFirstBlockPair(); + NLPD.Pair = BBSkipFirstBlockPair(); // Update any entries for RemInst to use the instruction after it. for (auto &Entry : NLPDI) { |