[llvm] [Analysis] Copy-construct SmallVector (NFC) (PR #105911)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 18:45:34 PDT 2024


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/105911

None

>From ceb070ca08492e5386749f5e462bcf34a89d88e6 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Fri, 23 Aug 2024 08:48:22 -0700
Subject: [PATCH] [Analysis] Copy-construct SmallVector (NFC)

---
 llvm/lib/Analysis/LazyValueInfo.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 47d3dac73083ee..615d8b7ccd8ccf 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -512,8 +512,8 @@ class LazyValueInfoImpl {
 } // namespace llvm
 
 void LazyValueInfoImpl::solve() {
-  SmallVector<std::pair<BasicBlock *, Value *>, 8> StartingStack(
-      BlockValueStack.begin(), BlockValueStack.end());
+  SmallVector<std::pair<BasicBlock *, Value *>, 8> StartingStack =
+      BlockValueStack;
 
   unsigned processedCount = 0;
   while (!BlockValueStack.empty()) {



More information about the llvm-commits mailing list