[llvm] [Transforms] Construct SmallVector with iterator ranges (NFC) (PR #105607)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 20:21:44 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/105607.diff
2 Files Affected:
- (modified) llvm/lib/Transforms/HipStdPar/HipStdPar.cpp (+1-1)
- (modified) llvm/lib/Transforms/IPO/AttributorAttributes.cpp (+1-1)
``````````diff
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).
``````````
</details>
https://github.com/llvm/llvm-project/pull/105607
More information about the llvm-commits
mailing list