[all-commits] [llvm/llvm-project] 89a4b2: [libc] Replace sys/select.h, sys/utsname.h and sys...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Jul 16 00:38:14 PDT 2026


  Branch: refs/heads/users/MaskRay/spr/cycleinfo-store-cycles-in-a-flat-preorder-array-nfc
  Home:   https://github.com/llvm/llvm-project
  Commit: 89a4b2f880a7b852cb9b4ff20a1e38a6b3a037a5
      https://github.com/llvm/llvm-project/commit/89a4b2f880a7b852cb9b4ff20a1e38a6b3a037a5
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M libc/hdr/CMakeLists.txt
    A libc/hdr/sys_select_macros.h
    A libc/hdr/sys_wait_macros.h
    M libc/hdr/types/CMakeLists.txt
    A libc/hdr/types/fd_set.h
    A libc/hdr/types/struct_rusage.h
    A libc/hdr/types/struct_utsname.h
    M libc/src/sys/select/linux/CMakeLists.txt
    M libc/src/sys/select/linux/select.cpp
    M libc/src/sys/select/select.h
    M libc/src/sys/utsname/linux/CMakeLists.txt
    M libc/src/sys/utsname/linux/uname.cpp
    M libc/src/sys/utsname/uname.h
    M libc/src/sys/wait/linux/CMakeLists.txt
    M libc/src/sys/wait/wait4.h
    M libc/src/sys/wait/wait4Impl.h
    M libc/src/unistd/linux/CMakeLists.txt
    M libc/src/unistd/linux/gethostname.cpp

  Log Message:
  -----------
  [libc] Replace sys/select.h, sys/utsname.h and sys/wait.h includes with proxy headers (#209851)

I'm replacing system includes of <sys/select.h>, <sys/utsname.h>, and
<sys/wait.h> in non-test and non-proxy code with granular proxy headers.

- add proxy headers for sys/select.h and sys/wait.h macros as well as
fd_set, struct rusage, and struct utsname types
- switch select, uname, gethostname, and wait4 internal headers and
implementations to include the proxy headers instead of system headers
- update cmake dependencies for the affected entry points

Assisted by Gemini.


  Commit: 5a530a22fae4aaa41da79779cd56db57f8de55f8
      https://github.com/llvm/llvm-project/commit/5a530a22fae4aaa41da79779cd56db57f8de55f8
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M libc/include/llvm-libc-macros/netinet-in-macros.h
    M libc/test/include/netinet_in_test.cpp

  Log Message:
  -----------
  [libc] Reimplement IN6_IS_ADDR_* macros using statement expressions (#209772)

This patch fixes three issues with the previous implementation:
- the macro argument was being evaluated more than once
- casting to other types (uint32_t in particular) was an aliasing
violation
- it was casting to non-const pointers, resulting in compiler errors in
cases where the user passes a const ptr.

A statement expression fixes the first issue by using a temporary
variable. The second issue is fixed by using the appropriate members of
struct in6_addr. The last issue is fixed by dropping the cast
completely. This requires the user to pass a correctly types pointer (as
POSIX requires). Implementations keep it for compatibility with old code
passing void * and similar, but a quick survey shows that most modern
code passes the correct types. If this turns out to be an issue, we can
easily add the cast (to a const type) back.

Implementation notes:
- IN6_IS_ADDR_MULTICAST doesn't use the statement expression because the
argument is evaluated only once
- I use private helper macros (__IN6_IS_ADDR_UNSPECIFIED and
__IN6_IS_ADDR_LOOPBACK) so IN6_IS_ADDR_V4COMPAT does not nest statement
expressions
- I considered using private entrypoints (like we do with cpuset macros)
instead of statement expressions, but decided against it because these
macros are simpler and would thus result in a higher
boilerplate-to-useful-code ratio (particularly given our restriction on
calling other entrypoints)

Assisted by Gemini.


  Commit: 762941070b1824ba5dc0a6b6a9e8c9dc4b5911e8
      https://github.com/llvm/llvm-project/commit/762941070b1824ba5dc0a6b6a9e8c9dc4b5911e8
  Author: Lang Hames <lhames at gmail.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M orc-rt/lib/executor/StandaloneMachOUnwindInfoRegistrar.cpp
    M orc-rt/lib/executor/Unix/NativeDylibAPIs.inc
    M orc-rt/lib/executor/Unix/NativeMemoryAPIs.inc
    M orc-rt/lib/executor/sps-ci/MemoryAccessSPSCI.cpp
    M orc-rt/test/unit/AllocActionTest.cpp
    M orc-rt/test/unit/CompilerTest.cpp
    M orc-rt/test/unit/ErrorCAPITest.cpp
    M orc-rt/test/unit/ErrorExceptionInteropTest.cpp
    M orc-rt/test/unit/ErrorTest.cpp
    M orc-rt/test/unit/LockedAccessTest.cpp
    M orc-rt/test/unit/QueueingRunnerTest.cpp
    M orc-rt/test/unit/RTTITest.cpp
    M orc-rt/test/unit/SPSWrapperFunctionTest.cpp
    M orc-rt/test/unit/ThreadPoolRunnerTest.cpp
    M orc-rt/test/unit/WrapperFunctionBufferTest.cpp

  Log Message:
  -----------
  [orc-rt] Close with "// namespace" consistently. NFC. (#209979)


  Commit: ac067a7e1366f1a9fca74b2cb69d6b005c6b732e
      https://github.com/llvm/llvm-project/commit/ac067a7e1366f1a9fca74b2cb69d6b005c6b732e
  Author: Harrison Hao <57025411+harrisonGPU at users.noreply.github.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.h
    M llvm/test/CodeGen/AMDGPU/atomic_optimizations_global_pointer.ll
    M llvm/test/CodeGen/AMDGPU/bf16.ll
    M llvm/test/CodeGen/AMDGPU/global-atomicrmw-fadd.ll
    M llvm/test/CodeGen/AMDGPU/packed-fneg-fsub-bf16.ll

  Log Message:
  -----------
  [AMDGPU] Use v_pk_add_bf16 for scalar bf16 fadd on gfx1250/gfx13 (#209128)

Targets with packed bf16 instructions can do a scalar bf16 fadd with a
single `v_pk_add_bf16` operating on the low half, instead of promoting
to f32 and going through `v_fma_mix_f32_bf16 + v_cvt_pk_bf16_f32`.


  Commit: 76ee189f61dfbe249159ed7e0e772b50b4eb7aeb
      https://github.com/llvm/llvm-project/commit/76ee189f61dfbe249159ed7e0e772b50b4eb7aeb
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/MergeFunctions.h
    M llvm/lib/Transforms/IPO/MergeFunctions.cpp
    R llvm/test/Transforms/MergeFunc/merge-functions-branch-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-reordered-blocks-branch-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-select-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-value-profile.ll
    M llvm/unittests/Transforms/IPO/MergeFunctionsTest.cpp

  Log Message:
  -----------
  Revert "[MergeFunctions] Preserve instruction-level profile metadata during merging" (#209987)

Reverts llvm/llvm-project#208009

Causes unit test failures.


  Commit: 9e342c3de6586ff20c0f7d6f1a9dafa16ed53846
      https://github.com/llvm/llvm-project/commit/9e342c3de6586ff20c0f7d6f1a9dafa16ed53846
  Author: Lucas Ramirez <11032120+lucas-rami at users.noreply.github.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M clang/docs/HIPSupport.md
    M libc/hdr/CMakeLists.txt
    A libc/hdr/sys_select_macros.h
    A libc/hdr/sys_wait_macros.h
    M libc/hdr/types/CMakeLists.txt
    A libc/hdr/types/fd_set.h
    A libc/hdr/types/struct_rusage.h
    A libc/hdr/types/struct_utsname.h
    M libc/include/llvm-libc-macros/netinet-in-macros.h
    M libc/src/sys/select/linux/CMakeLists.txt
    M libc/src/sys/select/linux/select.cpp
    M libc/src/sys/select/select.h
    M libc/src/sys/utsname/linux/CMakeLists.txt
    M libc/src/sys/utsname/linux/uname.cpp
    M libc/src/sys/utsname/uname.h
    M libc/src/sys/wait/linux/CMakeLists.txt
    M libc/src/sys/wait/wait4.h
    M libc/src/sys/wait/wait4Impl.h
    M libc/src/unistd/linux/CMakeLists.txt
    M libc/src/unistd/linux/gethostname.cpp
    M libc/test/include/netinet_in_test.cpp
    M llvm/include/llvm/CodeGen/Rematerializer.h
    M llvm/include/llvm/Transforms/IPO/MergeFunctions.h
    M llvm/lib/CodeGen/Rematerializer.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.h
    M llvm/lib/Transforms/IPO/MergeFunctions.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/CodeGen/AMDGPU/atomic_optimizations_global_pointer.ll
    M llvm/test/CodeGen/AMDGPU/bf16.ll
    M llvm/test/CodeGen/AMDGPU/global-atomicrmw-fadd.ll
    M llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats.mir
    M llvm/test/CodeGen/AMDGPU/packed-fneg-fsub-bf16.ll
    M llvm/test/CodeGen/Mips/msa/f16-llvm-ir.ll
    M llvm/test/Transforms/InstCombine/mul.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-branch-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-reordered-blocks-branch-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-select-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-value-profile.ll
    M llvm/unittests/CodeGen/RematerializerTest.cpp
    M llvm/unittests/Transforms/IPO/MergeFunctionsTest.cpp
    M orc-rt/lib/executor/StandaloneMachOUnwindInfoRegistrar.cpp
    M orc-rt/lib/executor/Unix/NativeDylibAPIs.inc
    M orc-rt/lib/executor/Unix/NativeMemoryAPIs.inc
    M orc-rt/lib/executor/sps-ci/MemoryAccessSPSCI.cpp
    M orc-rt/test/unit/AllocActionTest.cpp
    M orc-rt/test/unit/CompilerTest.cpp
    M orc-rt/test/unit/ErrorCAPITest.cpp
    M orc-rt/test/unit/ErrorExceptionInteropTest.cpp
    M orc-rt/test/unit/ErrorTest.cpp
    M orc-rt/test/unit/LockedAccessTest.cpp
    M orc-rt/test/unit/QueueingRunnerTest.cpp
    M orc-rt/test/unit/RTTITest.cpp
    M orc-rt/test/unit/SPSWrapperFunctionTest.cpp
    M orc-rt/test/unit/ThreadPoolRunnerTest.cpp
    M orc-rt/test/unit/WrapperFunctionBufferTest.cpp

  Log Message:
  -----------
  [𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5-bogner

[skip ci]


  Commit: 2828e67e632bfdba1edbce207b5001be152a304c
      https://github.com/llvm/llvm-project/commit/2828e67e632bfdba1edbce207b5001be152a304c
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M clang/docs/HIPSupport.md
    M libc/hdr/CMakeLists.txt
    A libc/hdr/sys_select_macros.h
    A libc/hdr/sys_wait_macros.h
    M libc/hdr/types/CMakeLists.txt
    A libc/hdr/types/fd_set.h
    A libc/hdr/types/struct_rusage.h
    A libc/hdr/types/struct_utsname.h
    M libc/include/llvm-libc-macros/netinet-in-macros.h
    M libc/src/sys/select/linux/CMakeLists.txt
    M libc/src/sys/select/linux/select.cpp
    M libc/src/sys/select/select.h
    M libc/src/sys/utsname/linux/CMakeLists.txt
    M libc/src/sys/utsname/linux/uname.cpp
    M libc/src/sys/utsname/uname.h
    M libc/src/sys/wait/linux/CMakeLists.txt
    M libc/src/sys/wait/wait4.h
    M libc/src/sys/wait/wait4Impl.h
    M libc/src/unistd/linux/CMakeLists.txt
    M libc/src/unistd/linux/gethostname.cpp
    M libc/test/include/netinet_in_test.cpp
    M llvm/include/llvm/CodeGen/Rematerializer.h
    M llvm/include/llvm/Transforms/IPO/MergeFunctions.h
    M llvm/lib/CodeGen/Rematerializer.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.h
    M llvm/lib/Transforms/IPO/MergeFunctions.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/CodeGen/AMDGPU/atomic_optimizations_global_pointer.ll
    M llvm/test/CodeGen/AMDGPU/bf16.ll
    M llvm/test/CodeGen/AMDGPU/global-atomicrmw-fadd.ll
    M llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats.mir
    M llvm/test/CodeGen/AMDGPU/packed-fneg-fsub-bf16.ll
    M llvm/test/CodeGen/Mips/msa/f16-llvm-ir.ll
    M llvm/test/Transforms/InstCombine/mul.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-branch-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-reordered-blocks-branch-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-select-weights.ll
    R llvm/test/Transforms/MergeFunc/merge-functions-value-profile.ll
    M llvm/unittests/CodeGen/RematerializerTest.cpp
    M llvm/unittests/Transforms/IPO/MergeFunctionsTest.cpp
    M orc-rt/lib/executor/StandaloneMachOUnwindInfoRegistrar.cpp
    M orc-rt/lib/executor/Unix/NativeDylibAPIs.inc
    M orc-rt/lib/executor/Unix/NativeMemoryAPIs.inc
    M orc-rt/lib/executor/sps-ci/MemoryAccessSPSCI.cpp
    M orc-rt/test/unit/AllocActionTest.cpp
    M orc-rt/test/unit/CompilerTest.cpp
    M orc-rt/test/unit/ErrorCAPITest.cpp
    M orc-rt/test/unit/ErrorExceptionInteropTest.cpp
    M orc-rt/test/unit/ErrorTest.cpp
    M orc-rt/test/unit/LockedAccessTest.cpp
    M orc-rt/test/unit/QueueingRunnerTest.cpp
    M orc-rt/test/unit/RTTITest.cpp
    M orc-rt/test/unit/SPSWrapperFunctionTest.cpp
    M orc-rt/test/unit/ThreadPoolRunnerTest.cpp
    M orc-rt/test/unit/WrapperFunctionBufferTest.cpp

  Log Message:
  -----------
  rebase

Created using spr 1.3.5-bogner


Compare: https://github.com/llvm/llvm-project/compare/30c140cc30ef...2828e67e632b

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list