LLVM/project a6445e5 — libc/src/__support/OSUtil/linux/syscall_wrappers CMakeLists.txt remap_file_pages.h, libc/src/sys/mman/linux CMakeLists.txt remap_file_pages.cpp

[libc] Use a syscall wrapper for remap_file_pages (#240074)

This PR move remap_file_pages behind the centralized syscall wrappers,
following libc/docs/dev/syscall_wrapper_refactor.md.
DeltaFile
+41-0libc/src/__support/OSUtil/linux/syscall_wrappers/remap_file_pages.h
+11-16libc/src/sys/mman/linux/remap_file_pages.cpp
+17-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+13-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+5-3libc/src/sys/mman/linux/CMakeLists.txt
+87-215 files

LLVM/project a542c29 — libc/src/sys/mman/linux CMakeLists.txt posix_madvise.cpp, utils/bazel/llvm-project-overlay/libc BUILD.bazel

[libc] Use a syscall wrapper for posix_madvise (#240073)

This PR move posix_madvise behind the centralized syscall wrappers,
following libc/docs/dev/syscall_wrapper_refactor.md.
DeltaFile
+9-7libc/src/sys/mman/linux/posix_madvise.cpp
+3-2libc/src/sys/mman/linux/CMakeLists.txt
+1-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+13-103 files

LLVM/project e8e03c6 — llvm/include/llvm/CodeGen RegAllocEvictionAdvisor.h, llvm/lib/CodeGen FailedReassignCache.cpp FailedReassignCache.h

[RegAlloc] Fix failed-reassign cache build after namespace removal

The reassign namespace was dropped from FailedReassignCache.h, but
RegAllocEvictionAdvisor and the unit test still referenced it, so the
tree did not build. Drop the qualifiers and forward-declare Cache in
llvm directly.

Also make a hint-only remember() discard any existing entry instead
of storing a flag, since hint sets can change without an overlapping
unassign.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+53-36llvm/unittests/Target/AMDGPU/FailedReassignCacheTest.cpp
+7-7llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
+6-7llvm/lib/CodeGen/FailedReassignCache.h
+8-3llvm/lib/CodeGen/FailedReassignCache.cpp
+1-4llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
+75-575 files

LLVM/project af94c38 — libcxx/docs FeatureTestMacroTable.rst, libcxx/include version

[libc++][FTM] Fix wrong standard versions (#240098)

FTMs were updated in https://github.com/llvm/llvm-project/pull/233352
but some copy & paste errors were made. This PR fixes them.
DeltaFile
+19-55libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+12-30libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp
+7-25libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp
+6-6libcxx/docs/FeatureTestMacroTable.rst
+3-3libcxx/utils/generate_feature_test_macro_components.py
+3-3libcxx/include/version
+50-1226 files

LLVM/project 7d01964 — llvm/include/llvm/CodeGen RegAllocEvictionAdvisor.h, llvm/lib/CodeGen FailedReassignCache.cpp RegAllocEvictionAdvisor.cpp

[RegAlloc] Fix failed-reassign cache build after namespace removal

The reassign namespace was dropped from FailedReassignCache.h, but
RegAllocEvictionAdvisor and the unit test still referenced it, so the
tree did not build. Drop the qualifiers and forward-declare Cache in
llvm directly.

Also make a hint-only remember() discard any existing entry instead
of storing a flag, since hint sets can change without an overlapping
unassign.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+52-35llvm/unittests/Target/AMDGPU/FailedReassignCacheTest.cpp
+6-7llvm/lib/CodeGen/FailedReassignCache.h
+6-6llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
+8-3llvm/lib/CodeGen/FailedReassignCache.cpp
+1-4llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
+73-555 files

LLVM/project c56f502 — llvm/unittests/Target/AMDGPU FailedReassignCacheTest.cpp

Add tests coverage
DeltaFile
+150-5llvm/unittests/Target/AMDGPU/FailedReassignCacheTest.cpp
+150-51 files

LLVM/project 7a2044d — llvm/include/llvm/CodeGen SlotIndexes.h, llvm/lib/CodeGen FailedReassignCache.cpp FailedReassignCache.h

Improve documentation and drop reassign namespace
DeltaFile
+10-14llvm/lib/CodeGen/FailedReassignCache.h
+4-3llvm/lib/CodeGen/FailedReassignCache.cpp
+2-4llvm/include/llvm/CodeGen/SlotIndexes.h
+16-213 files

LLVM/project 454990a — llvm/include/llvm/CodeGen RegAllocEvictionAdvisor.h, llvm/lib/CodeGen RegAllocEvictionAdvisor.cpp FailedReassignCache.h

[RegAlloc] Cache failed canReassign searches

The eviction advisor can ask canReassign repeatedly for the same live
interval. For register classes with long allocation orders, rescanning every
candidate is expensive when the answer remains false.

Cache failed searches that examine more than the configured order-size
threshold. A failure remains valid while registers are assigned because an
assignment cannot make another physical register available. LiveRegMatrix now
notifies every eviction advisor when an interval is unassigned so cached
failures whose slot ranges overlap the freed interval can record the affected
physical register. MLEvictAdvisor embeds a DefaultEvictionAdvisor, so both
register as listeners.

On a later query, return the cached failure immediately when no relevant
unassign occurred. Otherwise, check only the freed register and its aliases
that belong to the interval's allocation order. If none are now free, retain
the failure without rescanning the full order. Hint-only searches are not
reused, because the hint set can grow without an overlapping unassign.

    [12 lines not shown]
DeltaFile
+424-0llvm/unittests/Target/AMDGPU/FailedReassignCacheTest.cpp
+229-0llvm/lib/CodeGen/FailedReassignCache.cpp
+148-0llvm/lib/CodeGen/FailedReassignCache.h
+121-1llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
+116-0llvm/test/CodeGen/AMDGPU/failed-reassign-cache.mir
+34-17llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
+1,072-188 files not shown
+1,129-4214 files

LLVM/project b8e6c88 — llvm/lib/Transforms/Vectorize VPlanUtils.cpp LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize outer-loop-bitextract.ll bitextract-bitinsert.ll

[LV] Widen `bitextract` and `bitinsert`
DeltaFile
+306-0llvm/test/Transforms/LoopVectorize/bitextract-bitinsert.ll
+95-0llvm/test/Transforms/LoopVectorize/outer-loop-bitextract.ll
+82-0llvm/test/Transforms/LoopVectorize/X86/bitextract-bitinsert-cost.ll
+37-1llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+15-0llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+2-0llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+537-16 files

LLVM/project 620d113 — llvm/lib/Transforms/Vectorize VPlanRecipes.cpp VPlan.h

[VPlan] Share the result-type helper of `VPReplicateRecipe` with `VPWidenRecipe` (NFC)

Turn `VPReplicateRecipe::computeScalarType()` into an overload of
`computeScalarTypeForInstruction()` that takes the instruction. Both
`VPReplicateRecipe` and `VPWidenRecipe` use it when they wrap an instruction.

The opcodes it takes from the instruction never reach `VPWidenRecipe`, so the
types don't change. It prepares for widening `bitextract`, whose result type
can't be computed from its operands.
DeltaFile
+29-20llvm/lib/Transforms/Vectorize/VPlan.h
+4-4llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+33-242 files

LLVM/project 994b792 — llvm/include/llvm/Analysis TargetTransformInfo.h TargetTransformInfoImpl.h, llvm/include/llvm/CodeGen BasicTTIImpl.h

[TTI] Cost `bitinsert` and `bitextract` by their lowering
DeltaFile
+26-26llvm/test/Analysis/CostModel/X86/bitinsert-bitextract.ll
+43-0llvm/include/llvm/CodeGen/BasicTTIImpl.h
+20-0llvm/lib/Analysis/TargetTransformInfo.cpp
+20-0llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+12-0llvm/include/llvm/Analysis/TargetTransformInfo.h
+121-265 files

LLVM/project dc25d04 — llvm/test/Analysis/CostModel/X86 bitinsert-bitextract.ll

[TTI] Pre-commit tests for `bitinsert` and `bitextract` costs
DeltaFile
+74-0llvm/test/Analysis/CostModel/X86/bitinsert-bitextract.ll
+74-01 files

LLVM/project 2d24c17 — llvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/InstSimplify bitinsert-bitextract.ll

[InstSimplify] Simplify vector `bitinsert` and `bitextract` with out-of-range offsets
DeltaFile
+24-5llvm/lib/Analysis/InstructionSimplify.cpp
+2-4llvm/test/Transforms/InstSimplify/bitinsert-bitextract.ll
+26-92 files

LLVM/project e4dd989 — llvm/test/Transforms/InstSimplify bitinsert-bitextract.ll

[InstSimplify] Pre-commit tests for vector `bitinsert` and `bitextract` with out-of-range offsets
DeltaFile
+31-0llvm/test/Transforms/InstSimplify/bitinsert-bitextract.ll
+31-01 files

LLVM/project 460aba7 — llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstSimplify/ConstProp bitinsert-bitextract.ll

[ConstantFolding] Fold vector `bitinsert` and `bitextract`
DeltaFile
+65-6llvm/lib/Analysis/ConstantFolding.cpp
+9-19llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+74-252 files

LLVM/project 1cc2e81 — llvm/test/Transforms/InstSimplify/ConstProp bitinsert-bitextract.ll

[ConstantFolding] Pre-commit tests for vector `bitinsert` and `bitextract`
DeltaFile
+83-0llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+83-01 files

LLVM/project 5724d22 — llvm/lib/CodeGen/GlobalISel IRTranslator.cpp, llvm/test/CodeGen/AArch64 bitinsert-bitextract-vector.ll

[GlobalISel] Lower vector `bitinsert` and `bitextract`
DeltaFile
+65-0llvm/test/CodeGen/AArch64/bitinsert-bitextract-vector.ll
+14-12llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+79-122 files

LLVM/project df05614 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp, llvm/test/CodeGen/AArch64 sve-bitinsert-bitextract.ll bitinsert-bitextract-vector.ll

[SelectionDAG] Lower vector `bitinsert` and `bitextract`
DeltaFile
+277-0llvm/test/CodeGen/AMDGPU/bitinsert-bitextract-vector.ll
+183-0llvm/test/CodeGen/X86/bitinsert-bitextract-vector.ll
+145-0llvm/test/CodeGen/RISCV/rvv/bitinsert-bitextract.ll
+94-0llvm/test/CodeGen/AArch64/bitinsert-bitextract-vector.ll
+27-0llvm/test/CodeGen/AArch64/sve-bitinsert-bitextract.ll
+2-2llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+728-26 files

LLVM/project c2a86a7 — llvm/test/tools/llubi bitinsert_bitextract_le.ll bitinsert_bitextract_be.ll, llvm/tools/llubi/lib Interpreter.cpp

[llubi] Add support for vector `bitinsert` and `bitextract`
DeltaFile
+26-22llvm/tools/llubi/lib/Interpreter.cpp
+28-0llvm/test/tools/llubi/bitinsert_bitextract_le.ll
+28-0llvm/test/tools/llubi/bitinsert_bitextract_be.ll
+82-223 files

LLVM/project a64ff62 — llvm/test/Transforms/InstCombine bitinsert-bitextract.ll, llvm/test/Transforms/InstSimplify bitinsert-bitextract.ll

[InstSimplify][InstCombine] Add vector tests for `bitinsert` and `bitextract`
DeltaFile
+107-0llvm/test/Transforms/InstSimplify/bitinsert-bitextract.ll
+93-0llvm/test/Transforms/InstCombine/bitinsert-bitextract.ll
+32-0llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+232-03 files

LLVM/project cf245c7 — llvm/docs LangRef.md, llvm/lib/IR Instructions.cpp

[IR] Allow vectors in `bitinsert` and `bitextract`
DeltaFile
+87-4llvm/test/Assembler/bitinsert-bitextract-invalid.ll
+89-0llvm/test/Assembler/bitinsert-bitextract.ll
+29-20llvm/docs/LangRef.md
+27-14llvm/lib/IR/Instructions.cpp
+15-0llvm/test/Verifier/bitextract-bitinsert-invalid-verifier.ll
+12-0llvm/test/Bitcode/compatibility.ll
+259-386 files not shown
+294-4512 files

LLVM/project 443ac3f — clang/include/clang/Basic CodeGenOptions.def, clang/include/clang/Options Options.td

[Clang] Mark template instantiations with main-file template arguments as likely_module_local

With -fmodule-local-hints, Clang marks inline functions and template
instantiations defined in the main source file as likely_module_local. A
template defined in a header but instantiated with an entity declared in the
main file (e.g. std::sort with a main-file comparator or lambda) isn't marked,
even though such an instantiation can't be referenced or emitted by any other
translation unit either.

Also mark a function template instantiation if its template arguments, or
those of the enclosing class and function template specializations, name a
class, enum, lambda closure type, function or template declared in the main
file. Pointer, reference, array, member pointer and function types are looked
through, as are the template arguments of class template specializations used
as arguments. The walk is bounded to avoid blowup on deeply nested arguments.
DeltaFile
+89-2clang/lib/CodeGen/CodeGenModule.cpp
+63-0clang/test/CodeGenCXX/likely-module-local-template-args.cpp
+2-4clang/test/CodeGenCXX/likely-module-local.cpp
+2-1clang/include/clang/Options/Options.td
+2-1clang/include/clang/Basic/CodeGenOptions.def
+158-85 files

LLVM/project e44fff5 — clang/lib/AST DeclBase.cpp, clang/lib/Interpreter IncrementalParser.cpp

[clang-repl] Undo the enumerators of an unscoped enumeration (#228370)

The enumerators of an unscoped enumeration are in the lookup table of
the enclosing context. Undoing the input that declared the enumeration
removed the enumeration, but its enumerators stayed visible:

```
clang-repl> enum E { Red };
clang-repl> %undo
clang-repl> int Red = 5;
error: redefinition of 'Red' as different kind of symbol
```

`ASTDeclUnmerger` now also visits the declarations of an undone
enumeration definition.

**Test:** new lit test `code-undo-enumerators.cpp` with three cases: an
enumerator reused as a variable, an enumeration redefined, and an
enumeration in a namespace. It checks printed values only, not

    [7 lines not shown]
DeltaFile
+29-0clang/test/Interpreter/code-undo-tag-members.c
+25-0clang/test/Interpreter/code-undo-enumerators.cpp
+14-6clang/lib/AST/DeclBase.cpp
+6-0clang/lib/Interpreter/IncrementalParser.cpp
+74-64 files

LLVM/project 1987483 — clang/lib/Sema SemaLifetimeSafety.h, clang/test/Sema/LifetimeSafety safety.cpp

[LifetimeSafety] Look through parentheses when reporting alias chain notes
DeltaFile
+13-3clang/lib/Sema/SemaLifetimeSafety.h
+1-3clang/test/Sema/LifetimeSafety/safety.cpp
+14-62 files

LLVM/project 3aec233 — mlir/include/mlir/Dialect/NVGPU/Transforms Transforms.h, mlir/lib/Dialect/NVGPU/Transforms OptimizeSharedMemory.cpp

[mlir][nvgpu] Expose which memrefs optimize-shared-memory can swizzle (NFC) (#237180)

Extract checks on a memref's type out of
`optimizeSharedMemoryReadsAndWrites` into a new public function,
`canSwizzleSharedMemoryType`. The function would be helpful for prior
passes to reason about optimization decisions based on whether it is a
valid swizzling candidate.

Assisted-by: Claude
DeltaFile
+23-19mlir/lib/Dialect/NVGPU/Transforms/OptimizeSharedMemory.cpp
+7-0mlir/include/mlir/Dialect/NVGPU/Transforms/Transforms.h
+30-192 files

LLVM/project e3f9a6e — compiler-rt/test/asan/TestCases/Linux stack-overflow-recovery-mode.cpp

[ASan][test] Mark Linux/stack-overflow-recovery-mode.cpp UNSUPPORTED on Android AArch64 (#240097)

Temporarily mark `TestCases/Linux/stack-overflow-recovery-mode.cpp`
unsupported on Android AArch64 while waiting for #236879, matching
#236884 (https://lab.llvm.org/buildbot/#/builders/186/builds/4079).

Assisted-by: Gemini
DeltaFile
+5-0compiler-rt/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cpp
+5-01 files

LLVM/project 88a56ff — llvm/include/llvm/ADT SmallPtrSet.h, llvm/lib/CodeGen/SelectionDAG ScheduleDAGSDNodes.cpp

[ADT] Add LLVM_ATTRIBUTE_WARN_UNUSED to SmallPtrSet (#240080)

This patch adds LLVM_ATTRIBUTE_WARN_UNUSED to SmallPtrSet so that
compilers can diagnose unused SmallPtrSet variables even though
SmallPtrSet has a non-trivial constructor and destructor.

This patch also addresses the existing warnings uncovered by the
attribute:

- ScheduleDAGSDNodes::BuildSchedUnits had an unused local variable
  Visited, which this patch removes.
- SmallPtrSetTest.cpp intentionally leaves Other unused in two move
  tests, so this patch marks Other with [[maybe_unused]].

Assisted-by: Antigravity
DeltaFile
+2-2llvm/unittests/ADT/SmallPtrSetTest.cpp
+1-2llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+1-1llvm/include/llvm/ADT/SmallPtrSet.h
+4-53 files

LLVM/project 376f682 — compiler-rt/test/asan/TestCases/Linux stack-overflow-recovery-mode.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+5-0compiler-rt/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cpp
+5-01 files

LLVM/project ff5dd66 — clang/lib/Lex PPExpressions.cpp

[clang][Lex][NFC] Simplify macro expansion state restoration (#239918)

Replace the repeated restoration assignments with `llvm::scope_exit`.
DeltaFile
+3-10clang/lib/Lex/PPExpressions.cpp
+3-101 files

LLVM/project f33894c — llvm/lib/Transforms/IPO FunctionImport.cpp, llvm/unittests/IR ConstantRangeTest.cpp

[LLVM] FIx fallout from #239908 (#240096)

The original patch added LLVM_ATTRIBUTE_WARN_UNUSED to some ADT classes,
which caused some more -Wunused-variable warnings under release builds
(that optimize out asserts).

https://lab.llvm.org/buildbot/#/builders/228/builds/17397
DeltaFile
+4-4llvm/unittests/IR/ConstantRangeTest.cpp
+1-2llvm/utils/TableGen/DAGISelMatcherOpt.cpp
+1-1llvm/lib/Transforms/IPO/FunctionImport.cpp
+6-73 files