[llvm] [llvm] Construct SmallVector with ArrayRef (NFC) (PR #136063)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 16 17:28:26 PDT 2025


================
@@ -748,18 +748,15 @@ getStatepointBundles(std::optional<ArrayRef<T1>> TransitionArgs,
                      ArrayRef<T3> GCArgs) {
   std::vector<OperandBundleDef> Rval;
   if (DeoptArgs) {
-    SmallVector<Value*, 16> DeoptValues;
-    llvm::append_range(DeoptValues, *DeoptArgs);
+    SmallVector<Value *, 16> DeoptValues(*DeoptArgs);
     Rval.emplace_back("deopt", DeoptValues);
----------------
kuhar wrote:

Would it be possible to get rid of these local variables since we only initialize them now?

https://github.com/llvm/llvm-project/pull/136063


More information about the llvm-commits mailing list