LLVM/project 8fbe2d3 — lld/ELF LTO.cpp, lld/test/ELF/lto lto-partitions-cache.ll

Address comments
DeltaFile
+83-56llvm/lib/LTO/LTOBackend.cpp
+81-32lld/test/ELF/lto/lto-partitions-cache.ll
+0-83llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
+2-44llvm/lib/LTO/LTOCodeGenerator.cpp
+19-8llvm/test/LTO/AMDGPU/parallel-cache.ll
+8-11lld/ELF/LTO.cpp
+193-2349 files not shown
+231-25215 files

LLVM/project 48d28f4 — clang/lib/CIR/Dialect/Transforms/OffloadOpt KernelBindingTable.cpp, clang/test/CIR/Analysis kernel-bindings.cir

[CIR] Run the offload passes on cir.offload.launch

cir-offload-merge -opt now runs

  cir-offload-raise, mem2reg, cir-offload-sccp, symbol-dce,
  launch bounds, pointer facts, cir-offload-lower

Launch argument propagation and dead kernel elimination are stock sccp and
symbol-dce on the linked container. Launch bounds and pointer facts read
the launches from cir.offload.launch and treat a nested kernel as closed.

KernelBindingTable, OffloadDeadKernelElimination and
OffloadKernelArgConstantPropagation are removed with their tests. The
remaining offload tests run between raise and lower and use the launch
shape CIRGen emits.

A HIP stub reads its kernel handle global. KernelBindingTable counted the
read as an escape, so no HIP kernel was closed. The raise pass accepts it
inside the stub, so HIP kernels now get argument propagation.

    [4 lines not shown]
DeltaFile
+0-476clang/lib/CIR/Dialect/Transforms/OffloadOpt/KernelBindingTable.cpp
+240-24clang/test/CIR/Transforms/pointer-facts.cir
+173-17clang/test/CIR/Transforms/offload-pointer-facts.cir
+0-183clang/test/CIR/Analysis/kernel-bindings.cir
+144-14clang/test/CIR/Transforms/offload-pointer-facts-callees.cir
+138-14clang/test/CIR/Transforms/kernel-arg-const-prop.cir
+695-72821 files not shown
+1,040-1,59427 files

LLVM/project 4bc2ce7 — clang/lib/AST Availability.cpp, clang/test/ExtractAPI inherited_availability.m

[clang] Use class availability for ObjC category members (#248047)

ObjC categories can extend classes beyond their original definition.
They inherit the availability of the class, and any additional
availability attributes on category members are merged with the class
availability. However, AvailabilityInfo directly walked to the
translation unit and skipped the class, leading to incorrect
availability in symbol graphs. Update this logic to walk from a category
to its class instead.

rdar://193865049
DeltaFile
+38-0clang/test/ExtractAPI/inherited_availability.m
+10-2clang/lib/AST/Availability.cpp
+48-22 files

LLVM/project 21be374 — clang/include/clang/CIR/Dialect Passes.h Passes.td, clang/include/clang/CIR/Dialect/Transforms/OffloadOpt OffloadLaunch.h

[CIR] Add cir-offload-raise, cir-offload-lower and cir-offload-sccp

cir-offload-raise turns a flat offload container into linked form and
rewrites each launch site in the shape CIRGen emits (push configuration,
cir.if, stub call) into cir.offload.launch. A site in any other shape is
left alone. A kernel gets nested visibility when its stub has local
linkage, every use of the stub is a raised launch, and no device code
refers to the kernel; the closed-world option turns this off. A kernel
with no stub and no device use is nested too.

With nested visibility, stock sccp propagates launch arguments into the
kernel and symbol-dce erases kernels that are never launched.

cir-offload-sccp runs sccp once per device module, each time with that
module's kernel as the launch callee, so every device module gets the
same propagation.

cir-offload-lower restores the flat container: raise followed by lower
gives back the input.
DeltaFile
+598-0clang/lib/CIR/Dialect/Transforms/OffloadOpt/OffloadLaunch.cpp
+126-0clang/test/CIR/Transforms/offload-raise.cir
+50-0clang/include/clang/CIR/Dialect/Transforms/OffloadOpt/OffloadLaunch.h
+46-0clang/include/clang/CIR/Dialect/Passes.td
+12-0clang/tools/cir-opt/cir-opt.cpp
+4-0clang/include/clang/CIR/Dialect/Passes.h
+836-01 files not shown
+838-07 files

LLVM/project 9891af2 — libcxx/include/__algorithm pstl.h, libcxx/include/__pstl/backends default.h

[libc++][pstl] Add serial implementations of in-place removal algorithms (#247591)

This PR adds serial implementations of in-place removal algorithms to
PSTL:
- `std::remove_if`
- `std::remove` (implemented in the `default` backend in terms of
`std::remove_if`)
- `std::unique`

Part #99938.
DeltaFile
+218-0libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/pstl.remove.pass.cpp
+216-0libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/pstl.unique_pred.pass.cpp
+211-0libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/pstl.remove_if.pass.cpp
+208-0libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/pstl.unique.pass.cpp
+50-0libcxx/include/__algorithm/pstl.h
+21-0libcxx/include/__pstl/backends/default.h
+924-06 files not shown
+994-112 files

LLVM/project 23a7b06 — clang/include/clang/CIR/Dialect/IR CIRDialect.h CIROps.td, clang/lib/CIR/Dialect/IR CIRInlinerInterface.cpp CIRDialect.cpp

[CIR] Add cir.offload.launch and the linked offload container form

cir.offload.launch is a host-side kernel launch: the kernel in each device
module, the host stub, the dim3 grid and block, shared memory, stream and
kernel arguments. It implements CallOpInterface with the first kernel as
callee and only the kernel arguments as call operands, so stock
interprocedural passes see a launch as a call. The inliner never inlines
it.

A container with the cir.offload.linked attribute holds the host symbols
at its top level and only device modules nested, so a launch can refer
down to a kernel. The attribute keeps what is needed to restore the flat
form.
DeltaFile
+78-3clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+75-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+55-0clang/test/CIR/IR/invalid-offload-launch.cir
+30-0clang/test/CIR/IR/offload-launch.cir
+4-0clang/include/clang/CIR/Dialect/IR/CIRDialect.h
+3-0clang/lib/CIR/Dialect/IR/CIRInlinerInterface.cpp
+245-31 files not shown
+246-37 files

LLVM/project 69f694b — clang/include/clang/CIR/Dialect/Transforms/OffloadOpt KernelCloning.h, clang/lib/CIR/Dialect/Transforms/OffloadOpt CMakeLists.txt KernelCloning.cpp

[CIR] Remove the unused kernel cloning helpers

Nothing calls cloneKernelForSites or getSpecializationTarget.
DeltaFile
+0-186clang/lib/CIR/Dialect/Transforms/OffloadOpt/KernelCloning.cpp
+0-78clang/include/clang/CIR/Dialect/Transforms/OffloadOpt/KernelCloning.h
+0-1clang/lib/CIR/Dialect/Transforms/OffloadOpt/CMakeLists.txt
+0-2653 files

LLVM/project 05ef66f — mlir/include/mlir/Dialect/Tosa/IR TosaProfileCompliance.h, mlir/lib/Dialect/Tosa/Transforms TosaValidation.cpp TosaProfileCompliance.cpp

[mlir][tosa] Unify profile/extensions compliance checks (#247185)

This commits removes separate `checkProfile` and `checkExtension` APIs
and replaced them with a single `checkProfileOrExtension` in the
validation pass profile compliance. Not only does this simplify checks,
it also fixes compliance issues where knowledge of both profile and
extension requirements are needed at the same time to determine whether
an operation is invalid.

This is the case for int16 concat which is supported in the following
cases:
- when the int16 extension is available
- when the specification version is 1.1 and the selected profile is
pro_fp

Regression tests are added for the above case.

Assisted-by: Codex
DeltaFile
+155-93mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
+2-13mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h
+9-1mlir/test/Dialect/Tosa/tosa-validation-version-1p1-pro-fp-valid.mlir
+8-0mlir/test/Dialect/Tosa/tosa-validation-version-1p0-pro-fp-invalid.mlir
+0-7mlir/test/Dialect/Tosa/invalid_extension.mlir
+1-5mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
+175-1191 files not shown
+177-1217 files

LLVM/project fe805c6 — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/test/CIR/Transforms symbol-dce.cir

[CIR] Keep symbols that symbol-dce cannot see the uses of

An appending global (llvm.used, llvm.compiler.used) and a global
constructor or destructor are live without any symbol use. symbol-dce
erased them once they were not public. Override canDiscardOnUseEmpty on
cir.global and cir.func to keep them.
DeltaFile
+26-0clang/test/CIR/Transforms/symbol-dce.cir
+13-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+39-02 files

LLVM/project f5177f1 — clang/lib/CodeGen CGOpenMPRuntimeGPU.cpp CGOpenMPRuntime.cpp, clang/test/OpenMP spirv_task_addrspace.c

[Clang][OpenMP] Use default address space for task and globalized pointers (#248200)

The pointer to a task descriptor returned by __kmpc_omp_task_alloc,
and the pointer to a variable globalized with __kmpc_alloc_shared,
were cast to address space 0. This is fine for some targets (AMDGPU,
NVPTX) but wrong for SPIR-V, where address space 0 is private memory
and the default is address space 4. The patch switches to the default
address space instead, which fixes SPIR-V and implies no change to the
currently-working targets.

I can't test this on hardware, but it resolves the SPIR-V compilation
crash revealed by #245784/#247569.

Assisted-By: Claude
DeltaFile
+34-0clang/test/OpenMP/spirv_task_addrspace.c
+1-1clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
+1-1clang/lib/CodeGen/CGOpenMPRuntime.cpp
+36-23 files

LLVM/project 2f3dbfa — mlir/lib/Analysis/DataFlow DeadCodeAnalysis.cpp, mlir/test/Transforms sccp-callgraph.mlir

[mlir][DataFlow] Resolve non-call symbol uses in their own symbol table

DeadCodeAnalysis::initializeSymbolCallables walks every nested symbol
table, but looked up the target of a non-call symbol use in `top`. A
reference nested in an inner symbol table did not resolve there, so the
address-taken callable was still treated as having only known callers and
SCCP propagated constants into its arguments.

Resolve the reference in the symbol table that holds the use.
DeltaFile
+27-0mlir/test/Transforms/sccp-callgraph.mlir
+4-2mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
+31-22 files

LLVM/project ba915b8 — mlir/lib/Conversion/OpenACCToLLVM ACCAtomicPatterns.cpp, mlir/test/Conversion/OpenACCToLLVM atomic.mlir

[mlir][acc] Read 128-bit values in `acc.atomic.read` with `cmpxchg`

`acc.atomic.read` reads `x` with an `atomicrmw or` of zero on an integer
of the size of `x`. For a `complex<f64>`, that is an `i128`, which
the LLVM dialect verifier does not accept for integer operations of
`atomicrmw` ([LLVMMemoryOps.cpp#L509-L511][verifier]):

```mlir
acc.atomic.read %v = %x : !fir.ref<complex<f64>>, !fir.ref<complex<f64>>, complex<f64>
```

failed with:

```
'llvm.atomicrmw' op expected LLVM IR integer type
```

Read values wider than 64 bits with a `cmpxchg` of zero with zero
instead, and take the loaded value. It only stores zero where the value

    [11 lines not shown]
DeltaFile
+41-0mlir/test/Conversion/OpenACCToLLVM/atomic.mlir
+15-9mlir/lib/Conversion/OpenACCToLLVM/ACCAtomicPatterns.cpp
+56-92 files

LLVM/project 6102f5e — mlir/lib/Conversion/OpenACCToLLVM ACCAtomicPatterns.cpp

[mlir][acc] Assert that the `acc.atomic.capture` value converts to `v`

Both capture lowerings modify the IR before they convert the captured
value to the type of `v`, so they cannot fail cleanly afterwards. The
conversion only fails for types Fortran cannot assign to each other,
e.g. `real` and `logical`, so assert instead of returning a failure.

Assisted-by: Claude Code
DeltaFile
+2-10mlir/lib/Conversion/OpenACCToLLVM/ACCAtomicPatterns.cpp
+2-101 files

LLVM/project d9d5e3d — mlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp

[mlir][SPIR-V][NFC] Split SPIRVToLLVM pattern registrations by op category (#247869)

Recent additions to the SPIRVToLLVM conversion pattern registrations
exceeded the 256 operand fold expression limit of Clang20 and earlier.
This PR splits the op registrations by category so that it remains
compatible with the older compilers.
DeltaFile
+219-201mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+219-2011 files

LLVM/project d573815 — mlir/docs/Dialects LLVM.md, mlir/include/mlir/Dialect/LLVMIR LLVMOpBase.td LLVMIntrinsicOps.td

[mlir][LLVM] Add an inherent strictfp attribute to FP intrinsic ops

The strictfp call-site attribute tells LLVM that a call sits in a scope with
strict floating-point semantics. The llvm.intr.* operations could not carry
it.

The floating-point intrinsics now have an optional `strictfp` unit
attribute. The feature class LLVM_IntrStrictfp adds it. The export sets the
attribute on the call and the import reads it back. Both are code of the
feature class, so the translation needs no special case.

The constrained intrinsics do not get the attribute, since their calls are
always strictfp. The other intrinsics do not get it either, which keeps
their builders and assembly formats as they are.

Assisted-by: Claude Code (Opus 5.5).
DeltaFile
+32-24mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
+29-0mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
+28-0mlir/test/mlir-tblgen/llvm-intrinsic-op-base.td
+25-0mlir/test/Target/LLVMIR/intrinsic-strictfp.mlir
+23-0mlir/test/Target/LLVMIR/Import/intrinsic-strictfp.ll
+15-0mlir/docs/Dialects/LLVM.md
+152-242 files not shown
+176-248 files

LLVM/project b092ea6 — llvm/lib/Target/Hexagon/Utils HexagonDepMask.h, llvm/test/CodeGen/AArch64 sve-fixed-length-fp-extend-bf16.ll sve-fixed-length-masked-expandloads.ll

Merge branch 'main' into users/lukel97/riscv/widenVPMerge-operand-order
DeltaFile
+2,844-0llvm/lib/Target/Hexagon/Utils/HexagonDepMask.h
+1,922-0mlir/test/Dialect/X86/vector-contract-16bit-fp-to-fma.mlir
+655-834llvm/test/CodeGen/AArch64/sve-fixed-length-masked-expandloads.ll
+688-788llvm/test/CodeGen/AArch64/sve-fixed-length-fp-extend-bf16.ll
+1,449-0llvm/test/CodeGen/RISCV/xqcilo-xqcilia-sfb-frame-index.ll
+0-1,425mlir/test/Dialect/X86/vector-contract-bf16-to-fma.mlir
+7,558-3,0472,108 files not shown
+80,404-21,1882,114 files

LLVM/project d777b93 — offload/test/offloading target-no-loop.c

[offload][OpenMP] Change no-loop test to be amdgpu only (#248357)

Change on which GPUs the no-loop test runs due to the kernel launch info
it checks being specific to the amdgpu plugin.
DeltaFile
+1-2offload/test/offloading/target-no-loop.c
+1-21 files

LLVM/project 1a82959 — llvm/lib/Transforms/Vectorize VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize/AArch64 predication_costs.ll

[LV] Improve cost model for replicating recipes (#247535)

In VPCostContext::getScalarizationOverhead we pessimistically
assume that each scalar result will need inserting into the
lane of a result vector. However, this isn't true if all users
of the recipe happen to live in the same replicate block. In
this case the result of each scalar operation remains scalar
and no inserts are required.
DeltaFile
+6-6llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll
+4-4llvm/test/Transforms/LoopVectorize/X86/CostModel/store-scalarization-cost.ll
+4-2llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+1-1llvm/test/Transforms/LoopVectorize/SystemZ/branch-for-predicated-block.ll
+15-134 files

LLVM/project 6401699 — clang/docs ReleaseNotes.md, clang/lib/StaticAnalyzer/Checkers PthreadLockChecker.cpp

[analyzer] Model XNU try-lock nonzero return as success (#248014)

XNU try-lock functions signal success by returning a nonzero value,
which is the opposite of how the pthread library does it. The
implementation of alpha.unix.PthreadLock mistakenly assumed the pthread
semantics. This was introduced as a regression in 152bc7ffdcd8 while
migrating the logic to use a CallDescriptionMap.

Fixes #246175

Assisted-by: Claude Code
DeltaFile
+10-0clang/test/Analysis/pthreadlock.c
+6-0clang/docs/ReleaseNotes.md
+1-1clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
+17-13 files

LLVM/project 4ea1911 — llvm/lib/Target/Sparc DelaySlotFiller.cpp, llvm/test/CodeGen/SPARC restore-combine-debug.mir

[SPARC] Ignore debug values when combining a restore (#248086)

The delay slot filler combines an ADD, OR or SETHI instruction with the
RESTORE that follows it. It took the instruction before the restore with
std::prev, so a DBG_VALUE between the two prevented the combination, and
the code differed with and without debug info. For example a return
compiled to

  ret
  restore %o0, %i0, %o0

without -g and to

  add %o0, %i0, %i0
  ret
  restore

with it.


    [2 lines not shown]
DeltaFile
+136-0llvm/test/CodeGen/SPARC/restore-combine-debug.mir
+29-8llvm/lib/Target/Sparc/DelaySlotFiller.cpp
+165-82 files

LLVM/project 059c485 — llvm/lib/Analysis InstructionSimplify.cpp

[InstSimplify] Remove redundant select of funnel shift fold (NFCI) (#248368)

This is already handled by simplifySelectWithEquivalence().
DeltaFile
+1-9llvm/lib/Analysis/InstructionSimplify.cpp
+1-91 files

LLVM/project edcd5b7 — libcxxabi/src private_typeinfo.h private_typeinfo.cpp

[libc++abi] Remove found_our_static_ptr and found_any_static_type from __dynamic_cast_info
DeltaFile
+107-122libcxxabi/src/private_typeinfo.cpp
+4-6libcxxabi/src/private_typeinfo.h
+111-1282 files

LLVM/project 4dc42a5 — mlir/include/mlir/Target/LLVM/XeVM Utils.h, mlir/lib/Target/LLVM/XeVM Target.cpp

[MLIR][XeVM] Add SerializeGPUModuleBase::getCompilerInfo() (#243637)

Add a static method returning the GPU compiler version info.

---------

Co-authored-by: Dmitry Chigarev <dmitry.chigarev at intel.com>
Co-authored-by: Md Abdullah Shahneous Bari <md.abdullah.shahneous.bari at intel.com>
DeltaFile
+65-1mlir/lib/Target/LLVM/XeVM/Target.cpp
+23-0mlir/unittests/Target/LLVM/SerializeXeVMTarget.cpp
+8-3mlir/include/mlir/Target/LLVM/XeVM/Utils.h
+2-0mlir/unittests/Target/LLVM/CMakeLists.txt
+98-44 files

LLVM/project 68fea37 — mlir/lib/Dialect/OpenACC/Transforms ACCCGToGPU.cpp, mlir/test/Dialect/OpenACC acc-cg-to-gpu-execute-region-block-order.mlir

[mlir][acc] Clone `scf.execute_region` blocks in dominance order

`ACCCGToGPU` cloned the blocks of an `scf.execute_region` in region order.
A block can come before a block that dominates it and use values defined
there, e.g. after a forward branch into a loop built from branches. Such a
use was cloned before its value was mapped, so the clone kept using the
original value, and erasing the original `acc.compute_region` asserted with
"expected that op has no uses".

Clone the blocks in reverse post-order, which visits every block after the
blocks that dominate it.

Assisted-by: Claude Code (Claude Opus 5.5)
DeltaFile
+53-0mlir/test/Dialect/OpenACC/acc-cg-to-gpu-execute-region-block-order.mlir
+15-4mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp
+68-42 files

LLVM/project 4d432ac — mlir/lib/Conversion/OpenACCToLLVM ACCAtomicPatterns.cpp, mlir/test/Conversion/OpenACCToLLVM atomic.mlir

[mlir][acc] Read 128-bit values in `acc.atomic.read` with `cmpxchg`

`acc.atomic.read` reads `x` with an `atomicrmw or` of zero on an integer
of the size of `x`. For a `complex<f64>`, that is an `i128`, which
the LLVM dialect verifier does not accept for integer operations of
`atomicrmw` ([LLVMMemoryOps.cpp#L509-L511][verifier]):

```mlir
acc.atomic.read %v = %x : !fir.ref<complex<f64>>, !fir.ref<complex<f64>>, complex<f64>
```

failed with:

```
'llvm.atomicrmw' op expected LLVM IR integer type
```

Read values wider than 64 bits with a `cmpxchg` of zero with zero
instead, and take the loaded value. It only stores zero where the value

    [11 lines not shown]
DeltaFile
+41-0mlir/test/Conversion/OpenACCToLLVM/atomic.mlir
+15-9mlir/lib/Conversion/OpenACCToLLVM/ACCAtomicPatterns.cpp
+56-92 files

LLVM/project 5c3782a — mlir/lib/Conversion/OpenACCToLLVM ACCAtomicPatterns.cpp, mlir/test/Conversion/OpenACCToLLVM atomic.mlir

[mlir][acc] Fix `acc.atomic.capture` lowering when `v` and `x` differ in type

The `acc.atomic.read` in an `acc.atomic.capture` allows `v` and `x` of
different types, like a standalone `acc.atomic.read`, and the captured
value is converted to the type of `v`. The LLVM lowering stored the
captured value into `v` without converting it. For example:

```mlir
acc.atomic.capture {
  acc.atomic.read %v = %x : !fir.ref<i32>, !fir.ref<f64>, f64
  acc.atomic.write %x = %val : !fir.ref<f64>, f64
}
```

stored the `f64` value into the 4 bytes of `v`:

```mlir
llvm.store %old, %v : f64, !llvm.ptr
```

    [6 lines not shown]
DeltaFile
+110-0mlir/test/Conversion/OpenACCToLLVM/atomic.mlir
+45-20mlir/lib/Conversion/OpenACCToLLVM/ACCAtomicPatterns.cpp
+155-202 files

LLVM/project 670284a — mlir/lib/Conversion/OpenACCToLLVM ACCAtomicPatterns.cpp, mlir/test/Conversion/OpenACCToLLVM atomic-diagnostics.mlir atomic.mlir

[mlir][acc] Fix `acc.atomic.read` lowering when `v` or `x` is complex (#248002)

`acc.atomic.read` allows `v` and `x` of different types, and the value
read from `x` is converted to the type of `v`. The LLVM lowering
converted between the types used for the atomic access, where a complex
value is an integer of the same size. So a complex `x` was converted as
an integer, and a complex `v` was the target of an integer conversion.
For example:

```mlir
acc.atomic.read %v = %x : !fir.ref<f32>, !fir.ref<complex<f32>>, complex<f32>
```

was lowered to

```mlir
%rmw = llvm.atomicrmw _or %x, %zero monotonic : !llvm.ptr, i64
%val = llvm.sitofp %rmw : i64 to f32
```

    [28 lines not shown]
DeltaFile
+89-4mlir/lib/Conversion/OpenACCToLLVM/ACCAtomicPatterns.cpp
+42-0mlir/test/Conversion/OpenACCToLLVM/atomic.mlir
+10-0mlir/test/Conversion/OpenACCToLLVM/atomic-diagnostics.mlir
+141-43 files

LLVM/project c72f851 — libc/src/__support/File file.h file.cpp, libc/src/__support/File/linux file.h

[libc] Fix File::close() cleanup and static stream ownership (#247399)

In File::close (1) always reset buffer state and detach any owned buffer
before releasing the lock; (2) unlink the stream from File::list_all
before freeing the detached buffer, eliminating the use-after-free race
with concurrent fflush(nullptr); (3) remove redundant per-backend
File::remove_file() calls; (4) always release resources even when
flushing buffered writes fails, reporting EIO on short writes.

Add a 1-bit own_file flag in File, mark static stdin/stdout/stderr
instances on Linux as false so closing them does not delete static
storage, and reset LinuxFile::fd to -1 before returning.

Assisted-by: LLM
DeltaFile
+168-1libc/test/src/__support/File/file_test.cpp
+47-1libc/test/src/__support/File/platform_file_test.cpp
+29-12libc/src/__support/File/file.cpp
+12-9libc/src/__support/File/linux/file.h
+17-0libc/test/src/__support/File/CMakeLists.txt
+10-3libc/src/__support/File/file.h
+283-267 files not shown
+291-3813 files

LLVM/project fdec1d0 — mlir/include/mlir/Interfaces ValueBoundsOpInterface.h, mlir/lib/Interfaces ValueBoundsOpInterface.cpp

[mlir][Interfaces] Space out constant bound queries during traversal (#247915)

Default constant-bound analysis calls `getConstantBound64` after each
visited value. Each call projects the growing constraint system, making
long arithmetic slices expensive to analyze.

Check the default stopping condition at exponentially spaced visits and
retain the successful result for subsequent visits. The final bound
query still runs after traversal, and custom stopping conditions keep
their existing behavior. Add coverage for lower, upper, and equal bounds
that become available between the last scheduled check and the end of
traversal.

Fixes #247369.

Validation used main `46d10a70f76a` on x86-64 with GCC 12, `-O1`, and
assertions enabled.

- All 25 targeted value-bounds lit tests passed.

    [12 lines not shown]
DeltaFile
+22-0mlir/test/Dialect/Arith/value-bounds-op-interface-impl.mlir
+9-4mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
+2-2mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
+33-63 files

LLVM/project bae5625 — llvm/lib/Analysis InstructionSimplify.cpp, llvm/lib/Transforms/InstCombine InstCombineSelect.cpp

[InstSimplify] Support dropping poison-generating annotations (#247632)

There is a recurring problem where a transform can conceptually be part
of InstSimplify because it does not create new instructions, but needs
to drop poison-generating annotations in some cases. This is mainly
relevant for select folds.

The main case is simplifySelectWithEquivalence(), which handles this by
running without flag-dropping in InstSimplify, and then with
flag-dropping as a separate InstCombine transform. However, we also have
other folds that are currently affected by this issue, such as
simplifyCmpSelOfMaxMin(). We can fix them by moving them to InstCombine
-- but this is awkward if some parts of the fold require annotation
dropping, while others don't.

Overall, I think it may be worthwhile to just support "simplify with
dropped annotations" more generally in InstSimplify. If DropAnnotations
is passed, the caller is expected to drop annotations on those
instructions if simplification succeeds. If it's not passed,

    [9 lines not shown]
DeltaFile
+91-60llvm/lib/Analysis/InstructionSimplify.cpp
+9-27llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+22-12llvm/test/Transforms/InstSimplify/select.ll
+29-0llvm/test/Transforms/InstSimplify/select-icmp.ll
+15-10llvm/test/Transforms/InstSimplify/abs_intrinsic.ll
+14-8llvm/test/Transforms/InstSimplify/select-abs.ll
+180-1176 files not shown
+239-13012 files