LLVM/project c979debllvm/docs AMDGPUUsage.rst, llvm/include/llvm/Support AMDGPUAddrSpace.h

[NFC][AMDGPU] Reserve address space 16

This is used in downstream.
DeltaFile
+2-16llvm/include/llvm/Support/AMDGPUAddrSpace.h
+2-0llvm/docs/AMDGPUUsage.rst
+4-162 files

LLVM/project 8578a0aclang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowAnalysis.cpp PointerFlowFormat.cpp, clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp

[SSAF][WPA] Add "no-op" PointerFlow and UnsafeBufferUsage analysis (#193089)

Added 'no-op' PointerFlow and UnsafeBufferUsage analyses to convert
summary data into AnalysisResult, which DerivedAnalysis can then consume.

Also, refactored the PointerFlow and UnsafeBufferUsage serialization
for code sharing.

rdar://174874942

---------

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
Co-authored-by: Jan Korous <jkorous at apple.com>
DeltaFile
+140-0clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowWPATest.cpp
+131-0clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageWPATest.cpp
+128-0clang/test/Analysis/Scalable/PointerFlow/Inputs/wpa-result.json
+122-0clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+116-0clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.cpp
+58-38clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowFormat.cpp
+695-3827 files not shown
+1,229-6233 files

LLVM/project 1a8d5d4clang/include/clang/Analysis/Analyses/LifetimeSafety Origins.h, clang/lib/Analysis/LifetimeSafety Origins.cpp FactsGenerator.cpp

[LifetimeSafety] Track per-field origins for record types
DeltaFile
+237-4clang/test/Sema/warn-lifetime-safety.cpp
+82-8clang/lib/Analysis/LifetimeSafety/Origins.cpp
+59-24clang/include/clang/Analysis/Analyses/LifetimeSafety/Origins.h
+39-10clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+21-12clang/lib/Analysis/LifetimeSafety/LiveOrigins.cpp
+4-6clang/test/Sema/warn-lifetime-safety-dangling-field.cpp
+442-642 files not shown
+447-648 files

LLVM/project 3cbd5fdclang/include/clang/Analysis/Analyses/LifetimeSafety Origins.h Facts.h, clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp Origins.cpp

[LifetimeSafety][NFC] Refactor OriginList to OriginNode tree
DeltaFile
+129-131clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+42-30clang/include/clang/Analysis/Analyses/LifetimeSafety/Origins.h
+38-30clang/lib/Analysis/LifetimeSafety/Origins.cpp
+5-6clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+5-5clang/include/clang/Analysis/Analyses/LifetimeSafety/FactsGenerator.h
+3-3clang/lib/Analysis/LifetimeSafety/LiveOrigins.cpp
+222-2053 files not shown
+231-2149 files

LLVM/project b9fc55eclang-tools-extra/clang-tidy/readability ImplicitBoolConversionCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix `implicit-bool-conversion` C ternary condition false positive (#195913)

Fixes #195604
DeltaFile
+16-0clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion.c
+8-2clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
+3-0clang-tools-extra/docs/ReleaseNotes.rst
+3-0clang-tools-extra/docs/clang-tidy/checks/readability/implicit-bool-conversion.rst
+30-24 files

LLVM/project 397d99dflang/lib/Optimizer/Transforms/CUDA CUFAddConstructor.cpp, flang/test/Fir/CUDA cuda-constructor-2.f90

[flang][cuda] Fix unregistered allocator (#195924)

#194290 changed how we register the constructor and made an early return
which then miss to add the constructor to `llvm.mlir.global_ctors` which
leads to runtime failure because the allocators for CUDA Fortran are not
registered.
DeltaFile
+93-95flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
+3-1flang/test/Fir/CUDA/cuda-constructor-2.f90
+96-962 files

LLVM/project fae74b2llvm/test/Transforms/LoopVectorize/VPlan/AArch64 call-decisions.ll

[VPlan] Add VPlan printing test for call widening decisions. (NFC) (#195930)

Add VPlan-printing test for
https://github.com/llvm/llvm-project/pull/195518.
DeltaFile
+110-0llvm/test/Transforms/LoopVectorize/VPlan/AArch64/call-decisions.ll
+110-01 files

LLVM/project 461e473llvm/lib/Transforms/Vectorize VPlanRecipes.cpp VPlan.cpp

[VPlan] Add isFreeScalarIntrinsic helper (NFC). (#195929)

Split off from https://github.com/llvm/llvm-project/pull/195518.
DeltaFile
+7-18llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+8-0llvm/lib/Transforms/Vectorize/VPlan.cpp
+1-4llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+4-0llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+20-224 files

LLVM/project 7d1a8f1flang/lib/Optimizer/Analysis AliasAnalysis.cpp, flang/test/Analysis/AliasAnalysis alias-analysis-zero-offset-view-chain.fir alias-analysis-pack-array.fir

[flang] Fix FIR AliasAnalysis for zero-offset view chains (#192710)

When subroutine `f` below is inlined, the `ACCImplicitData` pass fails
to recognize that `b` is already covered by the enclosing `!$acc data
deviceptr`. The deviceptr clause operates on a box (`fir.embox` result)
while the inner `acc.serial` uses the underlying ref.
`fir::AliasAnalysis` traces both back through the full def-chain, where
an upstream sliced `fir.embox` (from `a(:,5)`) sets
`approximateSource=true`, causing `MayAlias` instead of `MustAlias`. The
pass falls back to implicit `copyin`/`copyout`, causing a segfault.

```fortran
module test_mod
  real, allocatable :: a(:,:)
contains
  subroutine f(b)
    real, dimension(*) :: b
    !$acc data deviceptr(b(1:100))
    !$acc serial

    [23 lines not shown]
DeltaFile
+71-0flang/test/Analysis/AliasAnalysis/alias-analysis-zero-offset-view-chain.fir
+43-0flang/test/Transforms/OpenACC/acc-implicit-data.fir
+25-0flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+2-4flang/test/Analysis/AliasAnalysis/alias-analysis-pack-array.fir
+141-44 files

LLVM/project 84ec7bdclang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowExtractor.cpp

[SSAF] Fix -Wunused-variable in b73ce3e53fcb9f72c759139e93db7e16a813c3b2 (#195944)

There was a variable only used in an assertion in a call to addSummary.
Mark it [[maybe_unused]] given the call has side effects.
DeltaFile
+1-1clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
+1-11 files

LLVM/project 6ad139coffload/test lit.cfg, offload/test/offloading/perf reduction.cpp common.h

[OpenMP][offload] Add cross-team reduction performance test

Tests different patterns of OpenMP cross-team reductions. Should not be
included in regular `ninja check-offload` runs, thus excluded.
DeltaFile
+306-0offload/test/offloading/perf/reduction.cpp
+183-0offload/test/offloading/perf/common.h
+60-0offload/test/offloading/perf/reduction.h
+27-0offload/test/offloading/perf/Makefile
+4-0offload/test/offloading/perf/.gitignore
+1-1offload/test/lit.cfg
+581-16 files

LLVM/project 6535b7cllvm/lib/Analysis IVDescriptors.cpp, llvm/test/Transforms/LoopInterchange reduction-crash.ll

[IVDescriptors] Check for null SE before dereference in getMinMaxRecurrence. (#195798)

Some callers don't pass SCEV.
DeltaFile
+60-0llvm/test/Transforms/LoopInterchange/reduction-crash.ll
+45-0llvm/unittests/Analysis/IVDescriptorsTest.cpp
+2-0llvm/lib/Analysis/IVDescriptors.cpp
+107-03 files

LLVM/project 7b831c0clang/test/Analysis/Scalable/PointerFlow tu-summary-serialization.test

fix test after merge
DeltaFile
+1-1clang/test/Analysis/Scalable/PointerFlow/tu-summary-serialization.test
+1-11 files

LLVM/project 5a3f69doffload/test lit.cfg, offload/test/offloading/perf reduction.cpp common.h

[OpenMP][offload] Add cross-team reduction performance test

Tests different patterns of OpenMP cross-team reductions. Should not be
included in regular `ninja check-offload` runs, thus excluded.
DeltaFile
+306-0offload/test/offloading/perf/reduction.cpp
+183-0offload/test/offloading/perf/common.h
+60-0offload/test/offloading/perf/reduction.h
+27-0offload/test/offloading/perf/Makefile
+4-0offload/test/offloading/perf/.gitignore
+1-1offload/test/lit.cfg
+581-16 files

LLVM/project 51a98a0utils/bazel/llvm-project-overlay/llvm BUILD.bazel

[bazel][SandboxVec] Port 0beb9f45f273bdc2d620f6dd07517761d294d259 (#195928)
DeltaFile
+7-4utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+7-41 files

LLVM/project 34159b6clang/lib/CIR/CodeGen CIRGenBuiltin.cpp

[NFC][CIR] Pass StringRef to `getIntrinsicForClangBuiltin` directly (#195458)

`prefix` is already a StringRef, so pass it to
`getIntrinsicForClangBuiltin` and `getIntrinsicForMSBuiltin` directly.
Additionally, drop some redundant `llvm::` and `Intrinsic::` namespace
qualifiers.
DeltaFile
+4-5clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+4-51 files

LLVM/project 5940347llvm/lib/Target/PowerPC PPCInstrInfo.td PPCInstr64Bit.td

[PowerPC] Remove duplicate patterns for atomic_swap

The definition and implementation of atomic_load_* and atomic_swap
is basically similar. Changing the way how the operations are
enumerated makes it possible to remove the separate patterns for
atomic_swap.
DeltaFile
+5-23llvm/lib/Target/PowerPC/PPCInstrInfo.td
+6-12llvm/lib/Target/PowerPC/PPCInstr64Bit.td
+11-352 files

LLVM/project 99040b6llvm/lib/Target/PowerPC PPCISelLowering.cpp PPCInstrInfo.td

[PowerPC] Further refactor atomic loads (#194445)

Depending on the availability of the word-part feature, different code
is generated for 1 and 2 byte atomic loads. This change moves the
decision to use the word-part feature from C++ into TableGen patterns.
This is done via:

- move code from `EmitPartwordAtomicBinary()` into new function
'signExtendOperandIfUnknown()'
- decouple functions `EmitPartwordAtomicBinary()` and
`EmitAtomicBinary()`
- remove the size from the name of the pseudo instructions; instead,
introduce a pseudo instruction which is used in case the word-part
feature is missing
 - update the handling of the pseudo instruction insertion accordingly

A side effect of this change is the implementation requires 11 pseudo
instructions less.
DeltaFile
+57-50llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+42-16llvm/lib/Target/PowerPC/PPCInstrInfo.td
+99-662 files

LLVM/project c9f9c87llvm/test/CodeGen/X86 vector-reduce-smin.ll vector-reduce-smax.ll, llvm/test/tools/llvm-mca/AArch64/Cortex C1Premium-sve-instructions.s C1Premium-writeback.s

Merge remote-tracking branch 'origin' into users/ziqingluo/PR-174874942-1

 Conflicts:
        clang/include/clang/ScalableStaticAnalysisFramework/SSAFBuiltinForceLinker.h
        clang/lib/ScalableStaticAnalysisFramework/Analyses/CMakeLists.txt
        clang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevelFormat.cpp
        clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
        clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowFormat.cpp
        clang/test/Analysis/Scalable/PointerFlow/tu-summary-serialization.test
        clang/unittests/ScalableStaticAnalysisFramework/CMakeLists.txt
DeltaFile
+6,873-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-sve-instructions.s
+2,940-1,458llvm/test/CodeGen/X86/vector-reduce-smin.ll
+2,936-1,457llvm/test/CodeGen/X86/vector-reduce-smax.ll
+2,695-1,364llvm/test/CodeGen/X86/vector-reduce-umax.ll
+2,646-1,359llvm/test/CodeGen/X86/vector-reduce-umin.ll
+3,979-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-writeback.s
+22,069-5,6382,871 files not shown
+121,319-43,9082,877 files

LLVM/project 9b863fdclang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen TargetInfo.cpp

Address comments
DeltaFile
+30-7clang/lib/CIR/CodeGen/TargetInfo.cpp
+2-0clang/include/clang/CIR/MissingFeatures.h
+32-72 files

LLVM/project a08ac22flang/lib/Evaluate tools.cpp call.cpp, flang/test/Parser simple-unparse.f90

[flang] Implement SIMPLE procedure support (parsing, semantics, diagnostics) (#161285)

Implement support for the Fortran 2023 `SIMPLE` procedure specifier.

This change includes:
- Parsing and attribute registration for `SIMPLE` procedures
- Adding `SIMPLE` to procedure characteristics
- Semantic support for `SIMPLE`, including treating `SIMPLE` procedures
as `PURE` (`SIMPLE` implies `PURE`)
- Rejecting `SIMPLE` + `IMPURE` combinations
- Emitting and reading `SIMPLE` in mod files
- Adding parser, semantic, and modfile tests to validate `SIMPLE`
behavior

`SIMPLE` procedures satisfy `PURE` requirements, while `PURE` procedures
do not imply `SIMPLE`.
DeltaFile
+119-0flang/test/Semantics/simple-positive.f90
+91-0flang/test/Semantics/modfile-simple.f90
+55-0flang/test/Semantics/simple-pure-attribute-conflicts.f90
+15-0flang/lib/Evaluate/tools.cpp
+14-0flang/lib/Evaluate/call.cpp
+13-0flang/test/Parser/simple-unparse.f90
+307-015 files not shown
+354-721 files

LLVM/project 8b87c82llvm/test/Transforms/LoopVectorize replace-first-order-recurrence-by-versioned-iv.ll predicated-inductions-vs-first-order-recurrences.ll

[LV] Extend test coverage with predicated IVs and FORs. (#195908)

Add coverage to test where the induction phi itself is a live-out, as
well as various tests where we could either generate a predicated IV or
first-order recurrence.
DeltaFile
+623-0llvm/test/Transforms/LoopVectorize/replace-first-order-recurrence-by-versioned-iv.ll
+533-0llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll
+137-7llvm/test/Transforms/LoopVectorize/predicated-inductions.ll
+1,293-73 files

LLVM/project b73ce3eclang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowExtractor.cpp PointerFlowFormat.cpp, clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsageFormat.cpp

[SSAF][PointerFlow] Add PointerFlow summary and extractor (#188654)

Implement a PointerFlow summary and extractor, which uses
EntityPointerLevel. An assignment is extracted as a pair of
EntityPointerLevels, representing a directed edge.
Edges extracted from assignments form a directed graph
encoding abstract pointer flow information.

rdar://172429193

---------

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
Co-authored-by: Jan Korous <jkorous at apple.com>
DeltaFile
+1,131-0clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+364-0clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
+110-0clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowFormat.cpp
+108-0clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageFormat.cpp
+94-0clang/test/Analysis/Scalable/PointerFlow/Inputs/tu-summary-no-key.json
+91-0clang/test/Analysis/Scalable/PointerFlow/Inputs/tu-summary.json
+1,898-018 files not shown
+2,250-13724 files

LLVM/project fac6835clang/lib/Driver Driver.cpp, clang/test/Driver darwin-dsymutil.c darwin-verify-debug.c

clang: Print effective triple in -ccc-print-bindings (#195914)

Previously this would print the original triple, rather
than the adjusted triple for the tool invocation which I found
confusing.
DeltaFile
+10-10clang/test/Driver/darwin-dsymutil.c
+5-5clang/test/Driver/darwin-verify-debug.c
+2-2clang/lib/Driver/Driver.cpp
+1-1clang/test/Driver/bindings.c
+18-184 files

LLVM/project e59c6feclang/include/clang/Analysis/Analyses/LifetimeSafety LifetimeAnnotations.h, clang/include/clang/Basic AttrDocs.td

[LifetimeSafety] Add support for iterator arithmetic (#195442)

This PR adds origin propagation through iterator arithmetic.

It also adds a few tests to check the new behavior.

Closes #190140
DeltaFile
+67-0clang/test/Sema/warn-lifetime-safety-invalidations.cpp
+36-1clang/test/Sema/Inputs/lifetime-analysis.h
+29-2clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+8-2clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeAnnotations.h
+2-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+1-1clang/include/clang/Basic/AttrDocs.td
+143-66 files

LLVM/project e816381llvm/include/llvm/Analysis LoopInfo.h

[LoopInfo] Remove redundant LLVM_ABI from Loop member functions (#195863)

Remove redundant `LLVM_ABI` from `addStringLoopAttribute` and
`addIntLoopAttribute`.

Addresses post-merge feedback on #194676.

This patch was generated with the help of Claude and reviewed by a
human.

Co-authored-by: Claude Opus 4 (1M context) <noreply at anthropic.com>
DeltaFile
+4-6llvm/include/llvm/Analysis/LoopInfo.h
+4-61 files

LLVM/project dafdee4llvm/lib/Target/PowerPC PPCISelLowering.cpp

Reviewer comment
DeltaFile
+2-3llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+2-31 files

LLVM/project 2be7a1bclang/lib/Driver Driver.cpp, clang/test/Driver darwin-dsymutil.c darwin-verify-debug.c

clang: Print effective triple in -ccc-print-bindings

Previously this would print the original triple, rather
than the adjusted triple for the tool invocation which I found
confusing.
DeltaFile
+10-10clang/test/Driver/darwin-dsymutil.c
+5-5clang/test/Driver/darwin-verify-debug.c
+2-2clang/lib/Driver/Driver.cpp
+1-1clang/test/Driver/bindings.c
+18-184 files

LLVM/project 6e2d30bllvm/lib/Target/RISCV/GISel RISCVInlineAsmLowering.cpp

[RISCV][GISel][NFC] Fix file header comment in RISCVInlineAsmLowering.cpp (#195805)
DeltaFile
+1-1llvm/lib/Target/RISCV/GISel/RISCVInlineAsmLowering.cpp
+1-11 files

LLVM/project fa8724blldb/test/API/tools/lldb-dap/source TestDAP_source.py, lldb/tools/lldb-dap/Handler SourceRequestHandler.cpp

[lldb-dap] Fix crash in source request handler (#195847)

Check optional argument source has a value before getting the source
reference.
DeltaFile
+6-0lldb/test/API/tools/lldb-dap/source/TestDAP_source.py
+3-2lldb/tools/lldb-dap/Handler/SourceRequestHandler.cpp
+9-22 files