[llvm] [Analysis] Avoid repeated hash lookups (NFC) (PR #127955)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 21:18:31 PST 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/127955
None
>From 9c5f0dbda70f231eeffa7101b5cacc4d0f8421b5 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 19 Feb 2025 08:24:38 -0800
Subject: [PATCH] [Analysis] Avoid repeated hash lookups (NFC)
---
llvm/lib/Analysis/LoopAccessAnalysis.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 5dc5b025599b1..a2bbe6fb11c09 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1431,8 +1431,8 @@ void AccessAnalysis::processMemAccesses() {
typedef SmallVector<const Value *, 16> ValueVector;
ValueVector TempObjects;
- UnderlyingObjects[Ptr] = {};
SmallVector<const Value *, 16> &UOs = UnderlyingObjects[Ptr];
+ UOs = {};
::getUnderlyingObjects(Ptr, UOs, LI);
LLVM_DEBUG(dbgs()
<< "Underlying objects for pointer " << *Ptr << "\n");
More information about the llvm-commits
mailing list