[llvm] 820396c - [Transforms] Construct SmallVector with iterator ranges (NFC) (#105607)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 23:32:17 PDT 2024
Author: Kazu Hirata
Date: 2024-08-21T23:32:13-07:00
New Revision: 820396c3a874f57205bfe52cc82bcac3a0035b3d
URL: https://github.com/llvm/llvm-project/commit/820396c3a874f57205bfe52cc82bcac3a0035b3d
DIFF: https://github.com/llvm/llvm-project/commit/820396c3a874f57205bfe52cc82bcac3a0035b3d.diff
LOG: [Transforms] Construct SmallVector with iterator ranges (NFC) (#105607)
Added:
Modified:
llvm/lib/Transforms/HipStdPar/HipStdPar.cpp
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/HipStdPar/HipStdPar.cpp b/llvm/lib/Transforms/HipStdPar/HipStdPar.cpp
index 1a8096f647d847..d740500ef1f8f6 100644
--- a/llvm/lib/Transforms/HipStdPar/HipStdPar.cpp
+++ b/llvm/lib/Transforms/HipStdPar/HipStdPar.cpp
@@ -80,7 +80,7 @@ static inline bool checkIfSupported(GlobalVariable &G) {
<< G.getName();
Instruction *I = nullptr;
- SmallVector<User *> Tmp(G.user_begin(), G.user_end());
+ SmallVector<User *> Tmp(G.users());
SmallPtrSet<User *, 5> Visited;
do {
auto U = std::move(Tmp.back());
diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 5052a40efe6026..5469eab6f3dfee 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -12334,7 +12334,7 @@ struct AAIndirectCallInfoCallSite : public AAIndirectCallInfo {
bool CBIsVoid = CB->getType()->isVoidTy();
BasicBlock::iterator IP = CB->getIterator();
FunctionType *CSFT = CB->getFunctionType();
- SmallVector<Value *> CSArgs(CB->arg_begin(), CB->arg_end());
+ SmallVector<Value *> CSArgs(CB->args());
// If we know all callees and there are none, the call site is (effectively)
// dead (or UB).
More information about the llvm-commits
mailing list