LLVM/project cd9a653clang/include/clang/Driver ToolChain.h, clang/lib/Driver Driver.cpp ToolChain.cpp

clang: Simplify OpenMP triple adjustment

Previously this would find a list of offloading triples,
then later fill in the unknown components specifically for
OpenMP after the fact. Start normalizing the triples upfront,
before inserting into the set. Also stop special casing OpenMP
since there's no apparent reason to treat it differently from
other offload languages.

Also operate on the Triple rather than the string, and handle
the unset OS and environment separately.
DeltaFile
+19-13clang/include/clang/Driver/ToolChain.h
+9-10clang/lib/Driver/Driver.cpp
+1-1clang/lib/Driver/ToolChain.cpp
+1-1clang/lib/Driver/ToolChains/Clang.cpp
+30-254 files

LLVM/project f789d2cclang/lib/Driver Driver.cpp

clang: Avoid intermediate DenseSet of triples

This was computing a DenseSet<StringRef> of triples, but the
only use was to insert all the entries into a multiset. Just
use the multiset in the first place.
DeltaFile
+7-8clang/lib/Driver/Driver.cpp
+7-81 files

LLVM/project eb0588cclang/include/clang/Driver ToolChain.h, clang/lib/Driver Driver.cpp

clang: Store Triple in multiset

Previously this was storing StringRefs, which just happen
to be constant allocated strings. Change this into an owning
reference in the form that will actually be used. This will allow
changing the triples to something computed without maintaining
a table of every possible permutation.
DeltaFile
+20-16clang/lib/Driver/Driver.cpp
+7-0llvm/include/llvm/TargetParser/Triple.h
+4-0clang/include/clang/Driver/ToolChain.h
+31-163 files

LLVM/project 6883276clang/include/clang/Basic OffloadArch.h, clang/lib/Basic OffloadArch.cpp

clang: Move Triple computing logic to separate function
DeltaFile
+7-12clang/lib/Driver/Driver.cpp
+16-0clang/lib/Basic/OffloadArch.cpp
+4-0clang/include/clang/Basic/OffloadArch.h
+27-123 files

LLVM/project b661af6clang/lib/Driver Driver.cpp

clang: Use isAMDGPU triple helper

Also remove redundant SPIRV check.
DeltaFile
+1-1clang/lib/Driver/Driver.cpp
+1-11 files

LLVM/project 73cddefllvm/test/CodeGen/AArch64 is_fpclass.ll is_fpclass-bfloat.ll, llvm/test/CodeGen/AMDGPU r600.llvm.is.fpclass.ll llvm.is.fpclass.bf16.ll

optimize `is_finite` assembly (#169402)

Fixes https://github.com/llvm/llvm-project/issues/169270

Changes the implementation of `is_finite` to emit fewer instructions,
e.g.

X86_64

```asm
old: # 18 bytes
        movd    %xmm0, %eax
        andl    $2147483647, %eax
        cmpl    $2139095040, %eax
        setl    %al
        retq
new: # 15 bytes
        movd    %xmm0, %eax
        addl    %eax, %eax

    [23 lines not shown]
DeltaFile
+160-191llvm/test/CodeGen/AArch64/is_fpclass.ll
+158-170llvm/test/CodeGen/AMDGPU/r600.llvm.is.fpclass.ll
+117-115llvm/test/CodeGen/X86/is_fpclass.ll
+44-52llvm/test/CodeGen/AArch64/is_fpclass-bfloat.ll
+48-45llvm/test/CodeGen/AMDGPU/llvm.is.fpclass.bf16.ll
+22-22llvm/test/CodeGen/X86/isel-fpclass.ll
+549-5956 files not shown
+617-65412 files

LLVM/project 1bb0302libc/shared/math asinpi.h, libc/src/__support/math asinpi.h asin_utils.h

[libc][math][c23] implement double-precision asinpi (#188158)

Implement the double precision version of the asinpi c23 math function
DeltaFile
+291-0libc/src/__support/math/asinpi.h
+92-0libc/test/src/math/asinpi_test.cpp
+70-0libc/src/__support/math/asin_utils.h
+52-0libc/test/src/math/smoke/asinpi_test.cpp
+26-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+23-0libc/shared/math/asinpi.h
+554-023 files not shown
+668-129 files

LLVM/project b6bbf2allvm/lib/Analysis DependenceAnalysis.cpp

Refactor

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+14-26llvm/lib/Analysis/DependenceAnalysis.cpp
+14-261 files

LLVM/project 2e6e36bllvm/test/CodeGen/AArch64 is_fpclass.ll is_fpclass-bfloat.ll

[NFC][AArch64] update tests for `is_fpclass` (#187336)

Hopefully this is better.

One wrinkle is that `@llvm.is.fpclass.bf16` is not currently implemented
for GI. That might be easy to add but I've not been able to figure out
where the issue is exactly so far.

I'm also not totally sure `-mattr=-fp-armv8` is equivalent to softfloat,
but some tests do suggest that they are equivalent (and looking at the
assembly, that seems right).
DeltaFile
+559-213llvm/test/CodeGen/AArch64/is_fpclass.ll
+112-0llvm/test/CodeGen/AArch64/is_fpclass-bfloat.ll
+671-2132 files

LLVM/project 37c8bafllvm/lib/Analysis DependenceAnalysis.cpp

Remove redundant logic

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+0-6llvm/lib/Analysis/DependenceAnalysis.cpp
+0-61 files

LLVM/project a0217f5llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Fix overflow of calculation in weakCrossingSIVtest

This patch fixes a correctness issue where integer overflow in the
upper bound calculation of weakCrossingSIVtest caused the pass to
incorrectly prove independence.

The previous logic used `SCEV::getMulExpr` to calculate
`2 * ConstCoeff * UpperBound` and compared it to `Delta` using
`isKnownPredicate`. In the presence of overflow, this could yield
unsafe results.

This change replaces the SCEV arithmetic with `ConstantRange` and
its operation (`smul_fast`). If the calculation overflows,
`intersectWith(MLRange).isEmptySet()` would be false, ensures we
conservatively assume a dependence if the bounds cannot be proven
safe.

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+17-5llvm/lib/Analysis/DependenceAnalysis.cpp
+17-51 files

LLVM/project b5331b4llvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis weak-crossing-siv-overflow.ll

update

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+59-0llvm/test/Analysis/DependenceAnalysis/weak-crossing-siv-overflow.ll
+16-15llvm/lib/Analysis/DependenceAnalysis.cpp
+75-152 files

LLVM/project 4151f5dmlir/lib/Dialect/LLVMIR/IR LLVMDialect.cpp, mlir/lib/Target/LLVMIR/Dialect/LLVMIR LLVMToLLVMIRTranslation.cpp

[MLIR][LLVMIR] Allow llvm.call and llvm.invoke to use llvm.mlir.alias as callee (#189154)

Previously, the verifier for `llvm.call` and `llvm.invoke` would reject
calls where the callee was an `llvm.mlir.alias`, reporting that the
symbol does not reference a valid LLVM function or IFunc. Similarly, the
MLIR-to-LLVM-IR translation had no handling for aliases as callees.

This patch extends both the verifier and the translation to accept
`llvm.mlir.alias` as a valid callee for `llvm.call` and `llvm.invoke`,
mirroring the existing support for `llvm.mlir.ifunc`. The function type
for alias calls is derived from the call operands and result types, and
the translation emits a call through the alias global value.

Fixes #147057

Assisted-by: Claude Code
DeltaFile
+52-0mlir/test/Target/LLVMIR/alias.mlir
+38-12mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
+21-0mlir/test/Dialect/LLVMIR/alias.mlir
+6-1mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+117-134 files

LLVM/project dd9bc66mlir/include/mlir/Bindings/Python NanobindUtils.h IRCore.h, mlir/test/mlir-tblgen op-python-bindings.td

[MLIR] [Python] The generated op definitions now use typed parameters (#188635)

As with operand/result types this only handles standard dialects, but I think it is still useful as is.

We could consider extensibility if/when necessary.
DeltaFile
+164-46mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
+64-48mlir/test/mlir-tblgen/op-python-bindings.td
+32-5mlir/include/mlir/Bindings/Python/NanobindUtils.h
+2-0mlir/include/mlir/Bindings/Python/IRCore.h
+262-994 files

LLVM/project fc01c81mlir/lib/Dialect/LLVMIR CMakeLists.txt, mlir/lib/Dialect/OpenMP CMakeLists.txt

[MLIR][build] Fix undefined references in debug shared libs (#189207)

Fixes undefined references in debug shared libs when building MLIR:
-DLLVM_ENABLE_PROJECTS="mlir"
-DCMAKE_BUILD_TYPE=Debug
-DBUILD_SHARED_LIBS=1

Debug build (-O0) disables dead code elimination, resulting in undefined
references in the following shared libs:

MLIROpenMPDialect (needs to link with TargetParser)
MLIRXeVMDialect (needs to link with TargetParser and MLIROpenMPDialect)
MLIRNVVMDialect (needs to link with TargetParser and MLIROpenMPDialect)

Fixes #189206

Assisted-by: Claude Code

From:

    [4 lines not shown]
DeltaFile
+4-0mlir/lib/Dialect/LLVMIR/CMakeLists.txt
+3-0mlir/lib/Dialect/OpenMP/CMakeLists.txt
+7-02 files

LLVM/project c32441ellvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.xor.ll llvm.amdgcn.reduce.and.ll

[AMDGPU] DPP wave reduction for long types - 3

Supported Ops: `and`, `or`, `xor`
DeltaFile
+984-132llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+960-108llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+960-108llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+12-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2,916-3494 files

LLVM/project 0f973c8llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.sub.ll llvm.amdgcn.reduce.add.ll

[AMDGPU] DPP wave reduction for long types - 2

Supported Ops: `add`, `sub`
DeltaFile
+1,113-146llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.sub.ll
+1,079-142llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.add.ll
+73-20llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2,265-3083 files

LLVM/project 8f1f33allvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.max.ll llvm.amdgcn.reduce.min.ll

[AMDGPU] DPP wave reduction for long types - 1

Supported Ops: `min`, `max`, `umin`, `umax`
DeltaFile
+1,084-108llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.max.ll
+1,084-108llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.min.ll
+1,044-108llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll
+1,044-108llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umin.ll
+188-46llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4,444-4785 files

LLVM/project fcd0e2clld/ELF BPSectionOrderer.cpp

[ELF] Remove redundant sec->repl != sec check in BPSectionOrderer. NFC (#189214)

ICF's InputSection::replace() calls markDead() on folded sections, so
`!sec->isLive()` already filters them.
DeltaFile
+3-4lld/ELF/BPSectionOrderer.cpp
+3-41 files

LLVM/project 71263dcclang-tools-extra/clang-tidy/bugprone IncDecInConditionsCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix bugprone-inc-dec-in-conditions FP with lambda condition (#189145)

Fixes https://github.com/llvm/llvm-project/issues/163913.
DeltaFile
+44-0clang-tools-extra/test/clang-tidy/checkers/bugprone/inc-dec-in-conditions.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+4-1clang-tools-extra/clang-tidy/bugprone/IncDecInConditionsCheck.cpp
+53-13 files

LLVM/project cf3a0f2lld Maintainers.md

[lld] update maintainers (#183803)

As a new contributor, it helps to correctly see the right maintainer.
DeltaFile
+15-3lld/Maintainers.md
+15-31 files

LLVM/project fed86edllvm/lib/Analysis DependenceAnalysis.cpp

Remove redundant logic

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+0-6llvm/lib/Analysis/DependenceAnalysis.cpp
+0-61 files

LLVM/project 7bf3681llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Fix overflow of calculation in weakCrossingSIVtest

This patch fixes a correctness issue where integer overflow in the
upper bound calculation of weakCrossingSIVtest caused the pass to
incorrectly prove independence.

The previous logic used `SCEV::getMulExpr` to calculate
`2 * ConstCoeff * UpperBound` and compared it to `Delta` using
`isKnownPredicate`. In the presence of overflow, this could yield
unsafe results.

This change replaces the SCEV arithmetic with `ConstantRange` and
its operation (`smul_fast`). If the calculation overflows,
`intersectWith(MLRange).isEmptySet()` would be false, ensures we
conservatively assume a dependence if the bounds cannot be proven
safe.

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+17-5llvm/lib/Analysis/DependenceAnalysis.cpp
+17-51 files

LLVM/project daf6df9llvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis weak-crossing-siv-overflow.ll

update

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+59-0llvm/test/Analysis/DependenceAnalysis/weak-crossing-siv-overflow.ll
+16-15llvm/lib/Analysis/DependenceAnalysis.cpp
+75-152 files

LLVM/project dda64e6llvm/lib/Analysis DependenceAnalysis.cpp

Remove redundant logic

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+0-6llvm/lib/Analysis/DependenceAnalysis.cpp
+0-61 files

LLVM/project 670de1fcompiler-rt/lib/msan msan_linux.cpp

[compiler-rt][msan] Fix 32-bit overflow in CheckMemoryLayoutSanity (#189199)

Use start + (end - start) / 2 instead of (start + end) / 2 to compute
the midpoint address. The original expression overflows when start + end
exceeds UPTR_MAX, which happens on 32-bit targets whose memory layout
includes regions above 0x80000000.
DeltaFile
+3-2compiler-rt/lib/msan/msan_linux.cpp
+3-21 files

LLVM/project 89d57d0compiler-rt/lib/sanitizer_common sanitizer_platform_limits_posix.cpp

[compiler-rt][sanitizer] Add struct_rlimit64_sz for musl (#189197)

On musl, rlimit64 is an alias for rlimit rather than a distinct type
provided by glibc. Add a SANITIZER_MUSL elif branch so that
struct_rlimit64_sz is defined for musl-based Linux targets.
DeltaFile
+5-2compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+5-21 files

LLVM/project 6ead686clang-tools-extra/clang-tidy ClangTidy.cpp, clang-tools-extra/clang-tidy/bugprone ReservedIdentifierCheck.cpp

[clang-tidy][NFC] Run `performance-faster-string-find` over the codebase (#189202)
DeltaFile
+7-7clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
+4-4clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
+3-3clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp
+2-2clang-tools-extra/clang-tidy/utils/Matchers.h
+1-1clang-tools-extra/clang-tidy/ClangTidy.cpp
+1-1clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp
+18-185 files not shown
+23-2311 files

LLVM/project 458f1aapolly/include/polly ScopInliner.h, polly/lib/Support RegisterPasses.cpp

[Polly] Forward VFS from PassBuilder for IO sandboxing (#188657)

#184545 default-enables the IO sandbox in assert-builds. This causes
Clang using Polly to crash (#188568).

The issue is that `PassBuilder` uses `vfs::getRealFileSystem()` by
default which is considered a IO sandbox violation in the Clang process.
With this PR store the VFS from the `PassBuilder` from the original
`registerPollyPasses` call for creating other `PassBuilder` instances.

This PR also adds infrastructure for running Polly in `clang` (in
addition in `opt`). `opt` does not enable the sandbox such that we need
separate tests using Clang.

Closes: #188568
DeltaFile
+26-11polly/lib/Support/RegisterPasses.cpp
+0-23polly/test/CodeGen/RuntimeDebugBuilder/combine_different_values.c
+21-0polly/test/lit.cfg
+11-4polly/lib/Transform/ScopInliner.cpp
+10-1polly/include/polly/ScopInliner.h
+9-0polly/test/polly.c
+77-396 files not shown
+89-4212 files

LLVM/project 191a9a9llvm/utils/gn/secondary/clang/unittests/Format BUILD.gn

[gn build] Port c0bd2f9084d7
DeltaFile
+1-0llvm/utils/gn/secondary/clang/unittests/Format/BUILD.gn
+1-01 files