[libc-commits] [libc] [llvm] [LLVM][libc] Defer lowering of constant intrinsics in full LTO (PR #221505)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Sun Sep 6 05:14:17 PDT 2026


================
@@ -34,6 +34,10 @@ LIBC_INLINE int vfprintf_impl(::FILE *__restrict file,
   port.recv([&](rpc::Buffer *buffer, uint32_t) {
     args_size = static_cast<size_t>(buffer->data[0]);
   });
+  // Use the vlist's static alloca size when it is exact and known.
+  if (size_t n = __builtin_object_size(vlist, /*max=*/0);
+      n == __builtin_object_size(vlist, /*min=*/2))
+    args_size = n;
----------------
jhuber6 wrote:

Yes, it's necessary. I'll pull it out.

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


More information about the libc-commits mailing list