LLVM/project 3b04d26compiler-rt/test/asan/TestCases stack_container_dynamic_lib.c stack_container_dynamic_lib.cpp

[asan] Convert __SANITIZER_DISABLE_CONTAINER_OVERFLOW__ tests to C (#188406)

As-is tests do not pass on android with older C++ headers.
There is nothing C++ specific in tests.

Followup to #181721.
DeltaFile
+126-0compiler-rt/test/asan/TestCases/stack_container_dynamic_lib.c
+0-118compiler-rt/test/asan/TestCases/stack_container_dynamic_lib.cpp
+49-0compiler-rt/test/asan/TestCases/disable_container_overflow_checks.c
+0-49compiler-rt/test/asan/TestCases/disable_container_overflow_checks.cpp
+175-1674 files

LLVM/project 311b4declang/lib/Sema SemaLookup.cpp

clang-format
DeltaFile
+1-1clang/lib/Sema/SemaLookup.cpp
+1-11 files

FreeBSD/ports ce23d0dwww/agate distinfo Makefile.crates

www/agate: Update 3.3.20 => 3.3.21

Approved by:            db@, yuri@ (Mentors, implicit)
DeltaFile
+97-119www/agate/distinfo
+47-58www/agate/Makefile.crates
+1-2www/agate/Makefile
+145-1793 files

LLVM/project bd31d4dclang/lib/AST ASTContext.cpp, clang/lib/Sema SemaLookup.cpp SemaChecking.cpp

[Clang] define memory scopes as a builtin enum

Clang currently represents memory scopes as pre-defined preprocessor macros that
evaluate to integers. But so far, there are three sets of conflicting scopes:
"common" clang scopes, HIP scopes and OpenCL scopes. These sets use the same
integers in different orders, making it impossible to validate their use. A
better approach is to represent these scopes as enum types, so that the integer
values become less significant. Sema can now validate the scope argument by its
type instead.

Both C and C++ define an enum for memory_order, but there is no standard enum
for memory_scope. This change introduces a Clang-specific enum "memory_scope".
The pre-defined macros are now mapped to this enum. Later changes can add
similar enums for other languages.

enum __memory_scope {
  __memory_scope_system,
  __memory_scope_device,
  __memory_scope_workgroup,

    [19 lines not shown]
DeltaFile
+78-0clang/lib/AST/ASTContext.cpp
+66-0clang/lib/Sema/SemaLookup.cpp
+30-30clang/test/Preprocessor/init.c
+58-0clang/test/Sema/scoped-atomic-scope-warning.c
+56-0clang/test/Sema/builtin-memory-scope.c
+50-0clang/lib/Sema/SemaChecking.cpp
+338-3013 files not shown
+473-6019 files

LLVM/project f599bfclld/ELF LinkerScript.cpp

[ELF] Guard relocation section handling behind copyRelocs in addOrphanSections. NFC (#188409)

In addOrphanSections, getRelocatedSection() only returns non-null for -r
or --emit-relocs links. Guard code blocks with `copyRelocs` to skip
unnecessary dyn_cast + getRelocatedSection calls per section in the
common case. Hoist copyRelocs and relocatable to local variables so the
compiler does not reload them through ctx on every loop iteration.

"Assign sections" decreases by 1ms.
DeltaFile
+28-22lld/ELF/LinkerScript.cpp
+28-221 files

LLVM/project 665c2e9flang/test/Integration/OpenMP taskloop-bounds-cast.f90, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[Flang][OpenMP] Remove dead restoreIP in OpenMP taskloop lowering (#187222)

This fixes an intermittent crash in `OpenMP` taskloop lowering.

In `OMPIRBuilder::createTaskloop`, the `restoreIP` in `PostOutlineCB`
was immediately overwritten by the following
`Builder.SetInsertPoint(StaleCI)` with no instructions created in
between, so it was effectively dead. This patch removes that dead
restore, which is the smallest change and preserves the intended IR
placement.

Adds a regression test that compiles a taskloop to LLVM IR and verifies
the bounds casts and __kmpc_taskloop call are present.
DeltaFile
+33-0flang/test/Integration/OpenMP/taskloop-bounds-cast.f90
+27-0mlir/test/Target/LLVMIR/openmp-taskloop-bounds-cast.mlir
+0-2llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+60-23 files

LLVM/project b16e012flang-rt/lib/runtime trampoline.cpp

[flang-rt] Fix macOS build: define _DARWIN_C_SOURCE for mmap flags (#186142)

On Darwin, `sys/mman.h` hides `MAP_JIT` and `MAP_ANON(YMOUS)` when
`_POSIX_C_SOURCE` is defined unless `_DARWIN_C_SOURCE` is also defined.
`trampoline.cpp` uses those flags, so this change defines
`_DARWIN_C_SOURCE` before including `<sys/mman.h>` in this file.

Fixes build failure reported in #183108.

Co-authored-by: Sairudra More <moresair at pe31.hpc.amslabs.hpecorp.net>
DeltaFile
+15-2flang-rt/lib/runtime/trampoline.cpp
+15-21 files

LLVM/project 483d8b6llvm/cmake/modules UnityBuild.cmake

use the right target ClangTidyTests
DeltaFile
+2-2llvm/cmake/modules/UnityBuild.cmake
+2-21 files

LLVM/project 98742dc.ci monolithic-linux.sh, llvm CMakeLists.txt

refactor UnityBuild.cmake
DeltaFile
+1,448-1,308llvm/cmake/modules/UnityBuild.cmake
+31-24llvm/CMakeLists.txt
+1-1.ci/monolithic-linux.sh
+1,480-1,3333 files

LLVM/project 798e545clang/lib/CodeGen CMakeLists.txt, clang/unittests CMakeLists.txt

works
DeltaFile
+1,460-0llvm/cmake/modules/UnityBuild.cmake
+0-62clang/unittests/CMakeLists.txt
+0-38clang/lib/CodeGen/CMakeLists.txt
+0-34llvm/utils/TableGen/CMakeLists.txt
+0-26llvm/lib/CodeGen/CMakeLists.txt
+0-23mlir/test/lib/IR/CMakeLists.txt
+1,460-183117 files not shown
+1,470-1,163123 files

LLVM/project 7384e9dclang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenModule.h

[CIR] Add addLLVMUsed and addLLVMCompilerUsed methods to CIRGenModule
DeltaFile
+104-2clang/lib/CIR/CodeGen/CIRGenModule.cpp
+27-0clang/test/CIR/CodeGenHIP/hip-cuid.hip
+19-0clang/lib/CIR/CodeGen/CIRGenModule.h
+0-1clang/include/clang/CIR/MissingFeatures.h
+150-34 files

LLVM/project 1a1dcf2clang/include/clang/CIR MissingFeatures.h, clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR][CIRGen] Support for section atttribute
DeltaFile
+26-13clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+20-4clang/lib/CIR/CodeGen/CIRGenModule.cpp
+14-0clang/test/CIR/CodeGen/global-section.c
+7-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+0-1clang/include/clang/CIR/MissingFeatures.h
+67-195 files

LLVM/project 2e35e62clang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen TargetInfo.cpp TargetInfo.h

update requiresAMDGPUProtectedVisibility and other minor fixes
DeltaFile
+51-64clang/lib/CIR/CodeGen/Targets/AMDGPU.cpp
+12-5clang/lib/CIR/CodeGen/TargetInfo.cpp
+4-0clang/lib/CIR/CodeGen/TargetInfo.h
+0-1clang/include/clang/CIR/MissingFeatures.h
+67-704 files

LLVM/project 7dd140cclang/lib/CIR/CodeGen/Targets AMDGPU.cpp, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVMIR.cpp

add support for amdgpu-expand-waitcnt-profiling
DeltaFile
+44-32clang/lib/CIR/CodeGen/Targets/AMDGPU.cpp
+16-0clang/test/CIR/CodeGenHIP/amdgpu-attrs.hip
+1-4clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMIR.cpp
+61-363 files

LLVM/project 177b4f0clang/lib/CIR/CodeGen CIRGenModule.cpp TargetInfo.cpp, clang/lib/CIR/CodeGen/Targets AMDGPU.cpp

[CIR][AMDGPU] Add AMDGPU-specific function attributes for HIP kernels
DeltaFile
+256-0clang/lib/CIR/CodeGen/Targets/AMDGPU.cpp
+82-0clang/test/CIR/CodeGenHIP/amdgpu-attrs.hip
+24-3clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMIR.cpp
+8-6clang/lib/CIR/CodeGen/CIRGenModule.cpp
+10-0clang/lib/CIR/CodeGen/TargetInfo.cpp
+5-0clang/lib/CIR/CodeGen/TargetInfo.h
+385-91 files not shown
+386-97 files

LLVM/project 832d1ec.ci monolithic-linux.sh, llvm CMakeLists.txt

refactor UnityBuild.cmake
DeltaFile
+1,448-1,308llvm/cmake/modules/UnityBuild.cmake
+31-24llvm/CMakeLists.txt
+1-1.ci/monolithic-linux.sh
+1,480-1,3333 files

LLVM/project 66d3e60clang/lib/CodeGen CMakeLists.txt, clang/unittests CMakeLists.txt

works
DeltaFile
+1,460-0llvm/cmake/modules/UnityBuild.cmake
+0-62clang/unittests/CMakeLists.txt
+0-38clang/lib/CodeGen/CMakeLists.txt
+0-34llvm/utils/TableGen/CMakeLists.txt
+0-26llvm/lib/CodeGen/CMakeLists.txt
+0-23mlir/test/lib/IR/CMakeLists.txt
+1,460-183117 files not shown
+1,470-1,163123 files

LLVM/project 80f7721libc/test/src/__support/wctype CMakeLists.txt

test high constexpr steps
DeltaFile
+3-0libc/test/src/__support/wctype/CMakeLists.txt
+3-01 files

LLVM/project 791f0c2libc/test/src/__support/wctype CMakeLists.txt

test high constexpr steps
DeltaFile
+3-0libc/test/src/__support/wctype/CMakeLists.txt
+3-01 files

NetBSD/pkgsrc hdafBh8devel/ocaml-dune Makefile

   ocaml-dune: Fix install with custom PKGMANDIR.

   Seen in jperkin's darwin bulk builds.
   From riastradh
VersionDeltaFile
1.20+10-2devel/ocaml-dune/Makefile
+10-21 files

LLVM/project f1fa15clibc/test/src/__support/wctype CMakeLists.txt

test high constexpr steps
DeltaFile
+4-0libc/test/src/__support/wctype/CMakeLists.txt
+4-01 files

OpenBSD/ports iVZjeD7editors/litexl/patches patch-src_meson_build

   fix build by not trying to statically link sdl3

   libSDL3.a does not exist but meson still tries to statically link
   everything in the Requires.private part of the sdl3.pc pkgconfig file.
   In the case of gbm libgbm.a had unresolved symbols.

   build failure reported by tb@ who tracked this back to a change in the
   devel/sdl3 port to build with -DSDL_DEPS_SHARED=OFF

   ok tb@
VersionDeltaFile
1.2+9-0editors/litexl/patches/patch-src_meson_build
+9-01 files

LLVM/project feae3bclibcxx/docs/ReleaseNotes 23.rst, libcxx/include/__iterator wrap_iter.h

[libc++] Remove non-standard member type iterator_type from __wrap_iter (#186871)

Resolves #186801 
Removed the non-standard member type `iterator_type` from `__wrap_iter`.
This member exposed the underlying iterator type, and its removal
prevents users from relying on the implementation detail.
DeltaFile
+7-8libcxx/include/__iterator/wrap_iter.h
+2-2libcxx/docs/ReleaseNotes/23.rst
+9-102 files

LLVM/project eca7d83mlir/lib/Dialect/MemRef/Transforms ExpandStridedMetadata.cpp, mlir/test/Conversion/MemRefToLLVM expand-then-convert-to-llvm.mlir

[mlir][memref] Simplify expand_shape size/stride computation using output_shape (#187844)

This PR refactors `getExpandedSizes` and `getExpandedStrides` to compute
their results directly from the `output_shape` of `memref.expand_shape`.
Instead of reconstructing expanded sizes/strides through manual
inference, we now rely on the operation’s explicit shape information.
The previous implementation imposed the restriction that there must be
at most one dynamic size per reassociation group. This limitation is
removed by the new approach: any number of dynamic dimensions within a
group is now supported, as long as they are represented in the
`output_shape`.
As a result, the code becomes both simpler and more expressive, while
better matching the semantics of `memref.expand_shape`.
DeltaFile
+55-67mlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir
+34-80mlir/test/Dialect/MemRef/expand-strided-metadata.mlir
+22-89mlir/lib/Dialect/MemRef/Transforms/ExpandStridedMetadata.cpp
+111-2363 files

LLVM/project e8c01fblibc/src/__support/wctype CMakeLists.txt

test high constexpr steps
DeltaFile
+4-0libc/src/__support/wctype/CMakeLists.txt
+4-01 files

LLVM/project 30267e0libc/src/__support/wctype perfect_hash_map.h

name
DeltaFile
+3-3libc/src/__support/wctype/perfect_hash_map.h
+3-31 files

LLVM/project 80603c6llvm/docs LangRef.rst, llvm/lib/FuzzMutate RandomIRBuilder.cpp

[CoroSplit] Never collect allocas used by catchpad into frame (#186728)

Windows EH requires exception objects allocated on stack. But there is
no reliable way to identify them. CoroSplit employs a best-effort
algorithm to determine whether allocas persist on the stack or the
frame, which may result in miscompilation when Windows exceptions are
used.
This patch proposes that we treat allocas used by catchpad as exception
objects and never place them on the frame. A verifier check is added to
enforce that operands of catchpad are either constants or allocas.

Close #143235 Close #153949 Close #182584
DeltaFile
+66-0llvm/test/Transforms/Coroutines/coro-alloca-10.ll
+7-0llvm/lib/Transforms/Coroutines/SpillUtils.cpp
+7-0llvm/lib/IR/Verifier.cpp
+3-2llvm/docs/LangRef.rst
+5-0llvm/lib/FuzzMutate/RandomIRBuilder.cpp
+2-1llvm/unittests/FuzzMutate/StrategiesTest.cpp
+90-31 files not shown
+93-37 files

LLVM/project cd9a0dcllvm/include/llvm/ExecutionEngine/Orc EPCGenericJITLinkMemoryManager.h, llvm/lib/ExecutionEngine/Orc EPCGenericJITLinkMemoryManager.cpp

[ORC] EPCGenericJITLinkMemoryManager from SimpleNativeMemoryMap syms. (#188391)

Adds a new EPCGenericJITLinkMemoryManager convenience constructor that
constructs an instance by looking up the given symbol names in the
bootstrap JITDylib of the given ExecutionSession.

The symbol names default to the SimpleNativeMemoryMap SPS-interface
symbol names provided by the new ORC runtime.
DeltaFile
+36-0llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
+13-1llvm/include/llvm/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.h
+14-0llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp
+63-13 files

FreeBSD/src 61f7813stand defs.mk

stand: Force disable RETPOLINE for boot loaders

Boot loaders do not require speculative execution protection, and may be
too large if enabled.

Reported by:    Shawn Webb
Reviewed by:    dim, imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56068
DeltaFile
+1-0stand/defs.mk
+1-01 files

FreeBSD/src 615f1b9sys/amd64/amd64 machdep.c

kern/amd64/machdep: Replace memset in wrmsr_early_safe_end

GENERIC-KASAN kernel failed to boot on a Dell PowerEdge C6615 with
an AMD EPYC 8224P CPU; UEFI BIOS caught a #GP exception with %RIP
in kasan_memset where %GS relative pointer (curthread->td_pflags2)
was dereferenced. Investigation led to wrmsr_early_safe_end which
calls memset to clear early #GP IDT entry. Replacing memset with
__builtin_memset_inline still resulted in the compiler emitting a
call to the memset resolver in GENERIC-KASAN build and the kernel
stil faulted during boot. This version which has been successfully
tested with both GENERIC and GENERIC-KASAN kernels uses memset_early.

Signed-off-by: Kristofer Peterson <kris at tranception.com>
Reviewed-by: kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2069
DeltaFile
+1-1sys/amd64/amd64/machdep.c
+1-11 files