LLVM/project 14745b3lldb/source/Host/windows HostThreadWindows.cpp

[lldb][windows] Fix HostThreadWindows::Join dead-code on GetExitCodeThread failure (#199014)
DeltaFile
+13-9lldb/source/Host/windows/HostThreadWindows.cpp
+13-91 files

LLVM/project ceee5d7.github/workflows commit-access-greeter.yml

[CI] Remove unused env var from commit-access-greeter (#199024)

LABEL_NAME has been there since the workflow's introduction in
f8ef2699d860aea97750953f1b79db8ef7574e82, but has never been used.
DeltaFile
+0-1.github/workflows/commit-access-greeter.yml
+0-11 files

LLVM/project df88198clang/include/clang/Options FlangOptions.td, flang/include/flang/Frontend FrontendOptions.h

Revert "[Flang] Adding -ffree-line-length-<value> flag" (#199018)

Reverts llvm/llvm-project#192941 due to various important apps failures.
DeltaFile
+0-48flang/test/Driver/ffree-line-length.f90
+9-16flang/lib/Frontend/CompilerInvocation.cpp
+2-8flang/include/flang/Frontend/FrontendOptions.h
+1-5clang/include/clang/Options/FlangOptions.td
+0-5flang/lib/Parser/prescan.h
+0-4flang/lib/Parser/prescan.cpp
+12-864 files not shown
+13-9010 files

LLVM/project 7236126llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.av.load.b128.ll

Merge branch 'main' into users/jeanPerier/mem2reg-view-interface
DeltaFile
+23,873-20,923llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+8,633-8,584llvm/test/CodeGen/Thumb2/mve-clmul.ll
+12,365-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+62,491-38,2755,419 files not shown
+408,241-189,3255,425 files

LLVM/project 7f3e168llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[OpenMP][OMPIRBuilder] Refactor removeUnusedBlocksFromParent (#198938)

This is essentially post-commit review for #198690 which was landed
quickly to fix nondeterminism in tests introduced in #197637

Change-Id: Ib3603ef3c70dde5bb22d0fc04d9249e62ecccf0c
Co-authored-by: @Meinersbur
Co-authored-by: @chichunchen
DeltaFile
+22-27llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+22-271 files

LLVM/project 5b13f48lldb/source/Host/windows HostThreadWindows.cpp

[lldb][windows] Fix HostThreadWindows::Cancel inverted error reporting (#199013)
DeltaFile
+3-5lldb/source/Host/windows/HostThreadWindows.cpp
+3-51 files

LLVM/project ad1311elldb/source/Host/windows HostProcessWindows.cpp

[lldb][windows] Fix HostProcessWindows::Terminate clobbering error (#199012)
DeltaFile
+3-4lldb/source/Host/windows/HostProcessWindows.cpp
+3-41 files

LLVM/project c64b708llvm/lib/Target/RISCV RISCVVectorPeephole.cpp, llvm/test/CodeGen/RISCV/rvv rvv-peephole-vmerge-vops.ll vmerge-peephole.mir

[RISCV] Ensure AVL dominates True in vmerge peephole (#199008)

When folding vmerge into its true operand, if vmerge has an AVL defined
by a register and true has VLMAX, then the minimum AVL will be the
register. In this case it's not guaranteed to dominate true, so we need
to potentially sink true so it does.

This teaches ensureDominates to check multiple definitions at the same
time, since we want the sinking to be atomic.

Fixes #198733
DeltaFile
+23-21llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
+22-0llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops.ll
+13-0llvm/test/CodeGen/RISCV/rvv/vmerge-peephole.mir
+58-213 files

LLVM/project f53a508.github/workflows merged-prs.yml

[CI] Pass script args using env var in merged PRs workflow (#199022)

As was done in #198160, address the problem described in
https://docs.github.com/en/actions/concepts/security/script-injections
using the solution recommended by

https://docs.github.com/en/actions/reference/security/secure-use#use-an-intermediate-environment-variable.

Not all these inputs are untrusted, but I've applied it to all of them
just to be consistent.
DeltaFile
+7-3.github/workflows/merged-prs.yml
+7-31 files

LLVM/project 8bdc185flang/include/flang/Support OpenMP-utils.h, flang/lib/Lower/OpenMP OpenMP.cpp

[Flang][OpenMP][NFC] Remove Fortran Evaluate Depedancy from Support (#198742)

Following #197442, FortranEvaluate was implicitly included in
OpenMP-utils.h which should be avoided to ensure front-end data
structures in the Optimizers can stop and restart pure MLIR source
without any side-data structures.

To ensure this is done, EntryBlockArgs has been stripped back to only
track vars, objects are now tracked within ObjectEntryBlockArgs in
Lowering as this is a more appropriate place for this information, and
the existing symbol tracking in EntryBlockArgsEntry was only used here.
This ensures FortranEvaluate is not needed within the Optimizers, and
objects can still be maintained when lowering. This enables better
referencing in Reduction Clauses, where previously context was being
lost for expressions such as ArrayElements.

See more: #197442

Assisted-by: Codex
DeltaFile
+131-54flang/lib/Lower/OpenMP/OpenMP.cpp
+12-63flang/include/flang/Support/OpenMP-utils.h
+12-14flang/lib/Support/OpenMP-utils.cpp
+4-4flang/lib/Optimizer/OpenMP/DoConcurrentConversion.cpp
+4-4flang/lib/Optimizer/OpenMP/GenericLoopConversion.cpp
+0-1flang/lib/Optimizer/OpenMP/CMakeLists.txt
+163-1406 files

LLVM/project f5f96b8.github/workflows new-prs.yml, llvm/utils/git github-automation.py

[CI] Fix GH PR Greeter (#198160)

Add missing argument in the PR Greeter invocation. Follow-up for
#197140. Issue reported here:
* https://discourse.llvm.org/t/ci-failure-prgreeter-on-my-first-pr


Also, as per
* https://docs.github.com/en/actions/concepts/security/script-injections, and
* https://docs.github.com/en/actions/reference/security/secure-use#use-an-intermediate-environment-variable,

make sure that that greeter relies on ENV variables for input arguments.
DeltaFile
+7-2.github/workflows/new-prs.yml
+1-0llvm/utils/git/github-automation.py
+8-22 files

LLVM/project 1b0b2e9llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange loop-interchange-optimization-remarks.ll profitability-vectorization.ll

[LoopInterchange] Disable LoopCacheAnalysis-based heuristic by default (#193478)

LoopInterchange has three types of heuristics for profitability
decisions: `cache`, `instorder`, and `vectorize`. Currently, the
profitability check invokes these heuristics in this order. The
heuristic corresponding to `cache` is based on LoopCacheAnalysis.
However, LoopCacheAnalysis applies several aggressive heuristics, which
can sometimes lead to undesirable decisions. In contrast, the heuristic
corresponding to `instorder` is relatively simpler than `cache`, but its
behavior is clear and it is likely sufficient for practical cases.
In light of the default enablement, I believe it is better to use a
simpler, easier‑to‑reason‑about, and more stable heuristic rather than
an aggressive but complex one. Therefore, this patch disables the
LoopCacheAnalysis‑based profitability check by default.
DeltaFile
+3-2llvm/test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll
+2-2llvm/test/Transforms/LoopInterchange/profitability-vectorization.ll
+1-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+1-1llvm/test/Transforms/LoopInterchange/lcssa-phi-outer-latch.ll
+1-1llvm/test/Transforms/LoopInterchange/perserve-lcssa.ll
+1-1llvm/test/Transforms/LoopInterchange/pr57148.ll
+9-91 files not shown
+10-107 files

LLVM/project dd0f9b7llvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine sext-nonneg-sub.ll or.ll

[InstCombine] Fold `X s<= Y ? 0 : X -nsw Y -> X - smin(X, Y)` (#187898)

This is part of #146131 and #182597

`func3` and `func4` are
[equivalent](https://alive2.llvm.org/ce/z/NNMTDa) but `func3` produces a
`sext` instead of `zext` when `b - a` is known non-negative.

[Proof of correctness](https://alive2.llvm.org/ce/z/ZthC9m)

```c++
#include <stdint.h>

uint64_t func3(int32_t a, int32_t b) {
    return (b < a ? 0 : (int32_t)(b - a));
}

uint64_t func4(int32_t a, int32_t b) {
    return (b < a ? 0 : (uint32_t)(b - a));

    [10 lines not shown]
DeltaFile
+131-0llvm/test/Transforms/InstCombine/sext-nonneg-sub.ll
+40-2llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+2-3llvm/test/Transforms/InstCombine/or.ll
+2-2llvm/test/Transforms/InstCombine/select-min-max.ll
+175-74 files

LLVM/project 5c59784llvm/lib/Target/AArch64 AArch64SchedC1Nano.td

[AArch64] C1-Nano scheduling model refactor [NFC] (#198469)

Creates explicit definitions for each latency/throughput/resource
combination and use the definitions in the instruction rule definitions.

Alhough this change touches most lines in the model, there is no
functional change - all test cases are not affected by this change.

This makes the style of the C1-Nano scheduling model be similar to that
used in the C1-Ultra / C1-Premium and is being done in preparation to
including the work to support SME instructions that is currently being
implemented on the C1-Ultra scheduling model
DeltaFile
+585-562llvm/lib/Target/AArch64/AArch64SchedC1Nano.td
+585-5621 files

LLVM/project 7be909cclang/include/clang/Options FlangOptions.td, flang/include/flang/Frontend FrontendOptions.h

Revert "[Flang] Adding -ffree-line-length-<value> flag (#192941)"

This reverts commit 960ae6f812c8db7c92532898c338aeefc6f7ac6d.
DeltaFile
+0-48flang/test/Driver/ffree-line-length.f90
+9-16flang/lib/Frontend/CompilerInvocation.cpp
+2-8flang/include/flang/Frontend/FrontendOptions.h
+1-5clang/include/clang/Options/FlangOptions.td
+0-5flang/lib/Parser/prescan.h
+0-4flang/lib/Parser/prescan.cpp
+12-864 files not shown
+13-9010 files

LLVM/project 542397alld/ELF Driver.cpp, lld/test/ELF aarch64-feature-pauth.s

[lld][PAC] Print full version and platform values on core mismatch (#198758)

`toHex()` only prints a single byte of the integer value, which can hide
the actual mismatch in AArch64 PAuth ABI core info diagnostics.
DeltaFile
+15-12lld/ELF/Driver.cpp
+13-13lld/test/ELF/aarch64-feature-pauth.s
+28-252 files

LLVM/project 3346c9fclang/lib/Driver ToolChain.cpp, clang/lib/Driver/ToolChains AMDGPU.cpp AMDGPUOpenMP.cpp

clang/AMDGPU: Use TranslateArgs from the base toolchain instead of the host

This fixes -Xopenmp-target / -Xarch for arbitrary arguments. HIP and OpenMP
had cargo-cult broken implementations of TranslateArgs, which called the host
toolchain's implementation, and then special case  transferred either -march
or -mcpu to the device argument list. The respective device forwarding flags
should work for any argument, not just this one. The main feature that needs
to be preserved is the shared filtering of unsupported sanitizers to degrade
them into warnings.

Most of the changes here are dealing with fallout observed when
the host target is darwin. The darwin toolchain happens to have
some hacky statefulness tracking the compile target version, which
gets written and rewritten on argument parsing. To maintain this hack,
there are a few unused calls to getArgsForToolChain; start passing OFK_Host
to these so the offload toolchains don't get confused and think they're in
a non-offload context.
DeltaFile
+43-16clang/lib/Driver/ToolChains/AMDGPU.cpp
+0-42clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
+5-35clang/lib/Driver/ToolChains/HIPAMD.cpp
+5-25clang/lib/Driver/ToolChains/AMDGPU.h
+12-3clang/lib/Driver/ToolChain.cpp
+7-6clang/lib/Driver/ToolChains/Gnu.cpp
+72-1275 files not shown
+92-13511 files

LLVM/project 4d7b7dfclang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticLexKinds.td DiagnosticGroups.td

[Clang] Add warning for non-portable include paths with trailing whitespace or dots (#190610)

This patch extends -Wnonportable-include-path to detect and warn about
trailing whitespace and dots in #include directives. Such paths are
non-portable and can lead to build failures on different operating
systems.

The warning is triggered when an include filename ends with a space or a
dot, which is common when copy-pasting paths or due to typos.

Fixes #96064
DeltaFile
+20-0clang/test/Preprocessor/nonportable-trailing-whitespace.c
+18-0clang/test/Preprocessor/nonportable-trailing-whitespace-win.c
+10-2clang/include/clang/Basic/DiagnosticLexKinds.td
+5-0clang/lib/Lex/PPDirectives.cpp
+3-1clang/docs/ReleaseNotes.rst
+1-0clang/include/clang/Basic/DiagnosticGroups.td
+57-36 files

LLVM/project 012abddoffload/liboffload CMakeLists.txt, offload/libomptarget CMakeLists.txt

[Offload] Fix LLVM_LINK_LLVM_DYLIB linking liboffload (#198955)

Summary:
When this is set you can only link against `LLVM`. The previous patch
did not respect this because I did not realize that internally in the
add_llvm_library that this was required.
DeltaFile
+9-5offload/plugins-nextgen/CMakeLists.txt
+5-1offload/libomptarget/CMakeLists.txt
+5-1offload/liboffload/CMakeLists.txt
+19-73 files

LLVM/project a3d2a6dllvm/lib/Transforms/Vectorize VPlanTransforms.cpp LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize/VPlan vplan-print-after-all.ll

[VPlan] Run replaceSymbolicStrides on VPlan0 (NFCI). (#196840)

Running replacceSymbolicStrides on VPlan0 means we only need to run it
once, and also enables simplifications earlier on. It is also needed to
be able to compute costs of the scalar VPlan0 early accurately, without
hacks manual folds like in the legacy cost model.

PR: https://github.com/llvm/llvm-project/pull/196840
DeltaFile
+10-5llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+4-5llvm/test/Transforms/LoopVectorize/VPlan/X86/scalarize-wide-load-for-address-use.ll
+3-4llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+1-1llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-after-all.ll
+18-154 files

LLVM/project 417578fllvm/test/CodeGen/NVPTX machine-cse-predicate-inversion.ll, llvm/test/CodeGen/X86 horizontal-reduce-umax.ll horizontal-reduce-smin.ll

Merge branch 'main' into users/kparzysz/d01-data-environment-scopes
DeltaFile
+3,903-0llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion.ll
+0-2,353llvm/test/CodeGen/X86/horizontal-reduce-umax.ll
+0-2,223llvm/test/CodeGen/X86/horizontal-reduce-smin.ll
+0-2,220llvm/test/CodeGen/X86/horizontal-reduce-smax.ll
+0-2,099llvm/test/CodeGen/X86/horizontal-reduce-umin.ll
+1,558-0llvm/test/Transforms/PhaseOrdering/X86/madd.ll
+5,461-8,895263 files not shown
+15,449-13,919269 files

LLVM/project 4f1a336llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange dependency-all-eq.ll

[LoopInterchange] Change the cost model to interchange `[* =]`
DeltaFile
+30-53llvm/test/Transforms/LoopInterchange/dependency-all-eq.ll
+33-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+63-552 files

LLVM/project 3b9b1edllvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange dependency-all-eq.ll pr43176-move-to-new-latch.ll

[LoopInterchange] Relax legality check to accept more patterns
DeltaFile
+103-42llvm/test/Transforms/LoopInterchange/dependency-all-eq.ll
+15-0llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+8-6llvm/test/Transforms/LoopInterchange/pr43176-move-to-new-latch.ll
+4-6llvm/test/Transforms/LoopInterchange/inner-only-reductions.ll
+6-3llvm/test/Transforms/LoopInterchange/legality-check.ll
+0-8llvm/test/Transforms/LoopInterchange/innermost-latch-uses-values-in-middle-header.ll
+136-651 files not shown
+140-697 files

LLVM/project 0da4f04llvm/test/Transforms/LoopInterchange dependency-all-eq.ll

[LoopInterchange] Add test with dependency `[* =]` and `[= *]` (NFC)
DeltaFile
+117-0llvm/test/Transforms/LoopInterchange/dependency-all-eq.ll
+117-01 files

LLVM/project 9bb5f29llvm/test/Transforms/LoopInterchange loop-interchange-optimization-remarks.ll

fix test
DeltaFile
+3-2llvm/test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll
+3-21 files

LLVM/project 45cb4c2llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange profitability-vectorization.ll pr57148.ll

[LoopInterchange] Disable LoopCacheAnalysis-based heuristic by default
DeltaFile
+3-3llvm/test/Transforms/LoopInterchange/profitability-vectorization.ll
+1-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+1-1llvm/test/Transforms/LoopInterchange/pr57148.ll
+1-1llvm/test/Transforms/LoopInterchange/delay-cachecost-calculation.ll
+1-1llvm/test/Transforms/LoopInterchange/lcssa-phi-outer-latch.ll
+1-1llvm/test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll
+8-91 files not shown
+9-107 files

LLVM/project f3679f8llvm/test/Transforms/LoopInterchange profitability-vectorization.ll

address review comment
DeltaFile
+1-1llvm/test/Transforms/LoopInterchange/profitability-vectorization.ll
+1-11 files

LLVM/project 7d4122aclang/lib/Driver ToolChain.cpp, clang/lib/Driver/ToolChains AMDGPU.cpp AMDGPUOpenMP.cpp

clang/AMDGPU: Use TranslateArgs from the base toolchain instead of the host

This fixes -Xopenmp-target / -Xarch for arbitrary arguments. HIP and OpenMP
had cargo-cult broken implementations of TranslateArgs, which called the host
toolchain's implementation, and then special case  transferred either -march
or -mcpu to the device argument list. The respective device forwarding flags
should work for any argument, not just this one. The main feature that needs
to be preserved is the shared filtering of unsupported sanitizers to degrade
them into warnings.

Most of the changes here are dealing with fallout observed when
the host target is darwin. The darwin toolchain happens to have
some hacky statefulness tracking the compile target version, which
gets written and rewritten on argument parsing. To maintain this hack,
there are a few unused calls to getArgsForToolChain; start passing OFK_Host
to these so the offload toolchains don't get confused and think they're in
a non-offload context.
DeltaFile
+45-15clang/lib/Driver/ToolChains/AMDGPU.cpp
+0-42clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
+5-35clang/lib/Driver/ToolChains/HIPAMD.cpp
+5-25clang/lib/Driver/ToolChains/AMDGPU.h
+15-8clang/lib/Driver/ToolChains/Gnu.cpp
+12-3clang/lib/Driver/ToolChain.cpp
+82-1285 files not shown
+102-13611 files

LLVM/project 446822bclang/lib/Driver SanitizerArgs.cpp, clang/lib/Driver/ToolChains AMDGPU.cpp AMDGPU.h

clang: Refactor handling of offload sanitizer arguments

Previously the AMDGPU toolchains hackily handled -fsanitize arguments.
They would lie and report that all host side sanitizers are available,
then TranslateArgs would filter out the device side cases that do not
work, providing diagnostics for the skipped cases. Move that logic
into the base sanitizer argument parsing.

This makes the produced diagnostics more consistent. Previously we
would get repeated warnings when a sanitizer is fully unsupported
by amdgpu, which should now be once for the toolchain. These could
be further improved; we're printing the specific field of -fsanitize
in more cases where it could be skipped. In other cases we have the
opposite problem, where we aren't reporting the exact sanitizer
from the -f flag in the case that depends on a subtarget feature.

This will help fix other broken target specific flag forwarding bugs
in the future.

Co-authored-by: Claude Sonnet 4 <noreply at anthropic.com>
DeltaFile
+56-47clang/lib/Driver/ToolChains/AMDGPU.cpp
+85-11clang/lib/Driver/SanitizerArgs.cpp
+7-75clang/lib/Driver/ToolChains/AMDGPU.h
+21-24clang/lib/Driver/ToolChains/HIPAMD.cpp
+17-21clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
+14-14clang/test/Driver/hip-sanitize-options.hip
+200-1928 files not shown
+261-20714 files

LLVM/project bf76adallvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange profitability-instorder.ll

[LoopInterchange] Take base pointer into account in profitability check (#193477)

Currently `getInstrOrderCost` doesn't check the base pointers of the
accesses, which can lead to undesirable profitability decisions. This
patch makes the function take the base pointers into account. Fix the
test case added in #193476.
DeltaFile
+7-17llvm/test/Transforms/LoopInterchange/profitability-instorder.ll
+13-7llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+20-242 files