LLVM/project 9434d4aclang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat TUSummaryEncoding.cpp TUSummary.cpp, clang/unittests/ScalableStaticAnalysisFramework EntityLinkerTest.cpp

Reland "[clang][ssaf] Track target triple in TU and LU summaries" (#204218)

This commit introduces the following changes:
  
- Add `TargetTriple` field to `TUSummary`, `LUSummary`, and their encodings.
- Frontend captures the triple from `CompilerInstance::getTarget()` when extracting a TU summary.
- JSON format reads/writes a `target_triple` field at the root of each summary; reader rejects strings not in `llvm::Triple::normalize` form.
- All TU/LU JSON test inputs/outputs and unit tests updated to include the new field.
- `TargetParser` is added to `LLVM_LINK_COMPONENTS` for `clangScalableStaticAnalysisFrameworkCore`, which provides `Triple::normalize` and `Triple(string&&)` constructor that the `JSONFormat` sources reference.

`clang-ssaf-linker` uses a hardcoded triple for the link unit; surfacing the triple through the tool will be handled in a follow-up PR.

rdar://179403011
DeltaFile
+24-1clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/TUSummaryEncoding.cpp
+24-1clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/TUSummary.cpp
+24-1clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/LUSummaryEncoding.cpp
+24-1clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/LUSummary.cpp
+12-9clang/unittests/ScalableStaticAnalysisFramework/EntityLinkerTest.cpp
+16-0clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/JSONFormatImpl.cpp
+124-13170 files not shown
+566-175176 files

LLVM/project 2916c77clang/docs SanitizerSpecialCaseList.rst ReleaseNotes.rst, clang/unittests/Basic DiagnosticTest.cpp

Make sanitizer special case list slash-agnostic (#149886)

This changes the glob matcher for the sanitizer special case format so
that it treats `/` as matching both forward and back slashes.

When dealing with cross-compiles or build systems that don't normalize
slashes, it's possible to run into file paths with inconsistent
slashiness, e.g. `../..\v8/include\v8-internal.h` when [building
chromium](https://g-issues.chromium.org/issues/425364464).

We can match this using the current syntax using this ugly kludge:
`src:*{/,\\}v8{/,\\}*`. However, since the format is explicitly for
listing file paths, it makes sense to treat `/` as denoting a path
separator rather than a literal forward slash. This allows us to write
the much more natural form `src:*/v8/*` and have it work on any
platform.

This is technically a behavior change, but it seems very unlikely to
come up in practice. It will only make a difference if a user has a

    [9 lines not shown]
DeltaFile
+35-0clang/unittests/Basic/DiagnosticTest.cpp
+25-6llvm/lib/Support/SpecialCaseList.cpp
+20-0llvm/unittests/Support/SpecialCaseListTest.cpp
+12-0clang/docs/SanitizerSpecialCaseList.rst
+5-0clang/docs/ReleaseNotes.rst
+97-65 files

LLVM/project b2cb999compiler-rt/lib/scudo/standalone secondary.h

[scudo] Use the unmap function on MemMap object. (#204001)

The current call does a unmap(MemMap), but the rest of the code is doing
MemMap.unmap(XXX), so follow that pattern.
DeltaFile
+1-1compiler-rt/lib/scudo/standalone/secondary.h
+1-11 files

LLVM/project 50e13e9flang/lib/Optimizer/Transforms/CUDA CUFOpConversion.cpp, flang/test/Fir/CUDA cuda-global-addr.mlir

[flang][cuda] Avoid runtime copies for scalar constant host reads (#204193)

Fix CUDA Fortran lowering for host reads from scalar module variables
with the `constant` attribute.

Host code can read and write CUDA constants, while kernels read the
device constant symbol. Flang keeps a host-visible value for scalar
constant host accesses and uses a device symbol for kernels.

After preserving the host declaration, scalar read-backs such as `x = c`
could still be lowered as device-to-host runtime copies, passing a host
pointer as the CUDA source. This change lowers those read-backs as
regular host load/store operations, while keeping the runtime update for
host-to-device assignments.
DeltaFile
+16-2flang/lib/Optimizer/Transforms/CUDA/CUFOpConversion.cpp
+15-0flang/test/Fir/CUDA/cuda-global-addr.mlir
+31-22 files

FreeBSD/ports 9708efddevel/swig40 Makefile

devel/swig40: Add CPE information
DeltaFile
+3-1devel/swig40/Makefile
+3-11 files

FreeBSD/ports f958bb4devel/swig Makefile

devel/swig: Add CPE information
DeltaFile
+3-1devel/swig/Makefile
+3-11 files

FreeBSD/ports 26e2bc2devel/spdlog Makefile

devel/spdlog: Add CPE information
DeltaFile
+3-1devel/spdlog/Makefile
+3-11 files

LLVM/project e421148llvm/test/Analysis/CostModel/AMDGPU rem.ll div.ll, llvm/test/Transforms/VectorCombine/AMDGPU extract-insert-i8.ll no-scalarize-vector-extract.ll

[AMDGPU] Refine i8 extractelement cost model (#203932)

Expand the cases when i8 extract elements are free. The extract elements
should be free when they are part of a sequence that extract multiple
consecutive elements the size of a register. This change enables the
SLPVectorizer to keep extract elements over more costly shufflevectors.

This PR also undoes a previous change that made insert element free, but
those require sequences of shift/or instructions so shouldn't be free.
DeltaFile
+42-42llvm/test/Analysis/CostModel/AMDGPU/rem.ll
+42-42llvm/test/Analysis/CostModel/AMDGPU/div.ll
+26-26llvm/test/Analysis/CostModel/AMDGPU/insertelement.ll
+6-40llvm/test/Transforms/VectorCombine/AMDGPU/extract-insert-i8.ll
+14-20llvm/test/Transforms/VectorCombine/AMDGPU/no-scalarize-vector-extract.ll
+16-16llvm/test/Analysis/CostModel/AMDGPU/extractelement.ll
+146-1863 files not shown
+164-2169 files

FreeBSD/ports e6bb588devel/shapelib Makefile

devel/shapelib: Add CPE information
DeltaFile
+3-1devel/shapelib/Makefile
+3-11 files

FreeBSD/ports e244408devel/sbt Makefile

devel/sbt: Add CPE information
DeltaFile
+3-1devel/sbt/Makefile
+3-11 files

FreeBSD/ports f6bdc06devel/rubygem-zlib Makefile

devel/rubygem-zlib: Add CPE information
DeltaFile
+3-1devel/rubygem-zlib/Makefile
+3-11 files

FreeBSD/ports 8319ed6devel/rubygem-view_component-rails-gitlab Makefile

devel/rubygem-view_component-rails-gitlab: Add CPE information
DeltaFile
+3-1devel/rubygem-view_component-rails-gitlab/Makefile
+3-11 files

FreeBSD/ports 1cd7b78devel/rubygem-time Makefile

devel/rubygem-time: Add CPE information
DeltaFile
+3-1devel/rubygem-time/Makefile
+3-11 files

FreeBSD/ports 4975967devel/rubygem-resque Makefile

devel/rubygem-resque: Add CPE information
DeltaFile
+1-1devel/rubygem-resque/Makefile
+1-11 files

FreeBSD/ports 2cc1c42devel/rubygem-json1 Makefile

devel/rubygem-json1: Add CPE information
DeltaFile
+3-1devel/rubygem-json1/Makefile
+3-11 files

FreeBSD/ports 5e8ec94devel/rubygem-json-gitlab Makefile

devel/rubygem-json-gitlab: Add CPE information
DeltaFile
+3-1devel/rubygem-json-gitlab/Makefile
+3-11 files

FreeBSD/ports 5684646devel/rubygem-json Makefile

devel/rubygem-json: Add CPE information
DeltaFile
+3-1devel/rubygem-json/Makefile
+3-11 files

FreeBSD/ports a8560b7devel/rubygem-icalendar-gitlab Makefile

devel/rubygem-icalendar-gitlab: Add CPE information
DeltaFile
+3-1devel/rubygem-icalendar-gitlab/Makefile
+3-11 files

FreeBSD/ports 5eceea6devel/rubygem-icalendar Makefile

devel/rubygem-icalendar: Add CPE information
DeltaFile
+3-1devel/rubygem-icalendar/Makefile
+3-11 files

LLVM/project a07f90bllvm/utils/lit/lit TestRunner.py, llvm/utils/lit/tests per-test-coverage-by-lit-cfg.py per-test-coverage.py

[lit] Avoid profraw filename collisions with --per-test-coverage (#203998)

Per-test-coverage derived the `LLVM_PROFILE_FILE` name from the test's
basename with its extension removed, so siblings that share a basename
but differ by directory or extension (e.g. foo.c and foo.cpp in one
directory) wrote into the same profraw file and raced on it.

This PR builds the name from the full path in the suite and adds the
`%p` and `%m` placeholders so a test that runs several instrumented
binaries gets a distinct file per process and per binary, even across
exec chains or recycled process ids.
DeltaFile
+11-3llvm/utils/lit/tests/per-test-coverage-by-lit-cfg.py
+5-5llvm/utils/lit/lit/TestRunner.py
+8-0llvm/utils/lit/tests/Inputs/per-test-coverage-by-lit-cfg/name-collision/a/test.py
+8-0llvm/utils/lit/tests/Inputs/per-test-coverage-by-lit-cfg/name-collision/b/test.py
+3-3llvm/utils/lit/tests/per-test-coverage.py
+1-1llvm/utils/lit/tests/Inputs/per-test-coverage/per-test-coverage.py
+36-121 files not shown
+37-137 files

FreeBSD/ports 755dd89devel/rubygem-google-protobuf Makefile

devel/rubygem-google-protobuf: Add CPE information
DeltaFile
+4-1devel/rubygem-google-protobuf/Makefile
+4-11 files

FreeBSD/ports 6decc58devel/rubygem-gems Makefile

devel/rubygem-gems: Add CPE information
DeltaFile
+4-1devel/rubygem-gems/Makefile
+4-11 files

FreeBSD/ports bdcde9cdevel/rubygem-fugit-gitlab Makefile

devel/rubygem-fugit-gitlab: Add CPE information
DeltaFile
+3-1devel/rubygem-fugit-gitlab/Makefile
+3-11 files

FreeBSD/ports a0c6911devel/rubygem-fugit Makefile

devel/rubygem-fugit: Add CPE information
DeltaFile
+3-1devel/rubygem-fugit/Makefile
+3-11 files

FreeBSD/ports 1fd750bdevel/rubygem-azure_event_grid Makefile

devel/rubygem-azure_event_grid: Add CPE information
DeltaFile
+3-1devel/rubygem-azure_event_grid/Makefile
+3-11 files

LLVM/project 5dce540flang/lib/Lower OpenACC.cpp Bridge.cpp, flang/lib/Semantics resolve-directives.cpp

[flang][OpenACC] Support COLLAPSE on DO CONCURRENT (#203085)

Lower a COLLAPSE clause on a DO CONCURRENT when the collapse value
equals the number of concurrent controls, matching the equivalent
nested-DO collapse form, and route the loop body into the collapsed
acc.loop. Emit specific not-yet-implemented diagnostics for the
collapse-less-than and collapse-greater-than control-count cases, and a
-Wportability warning for this non-standard extension.

Collapse of mismatched control cases will require a little more invasive
change, so I will submit that as a follow up PR if it is okay, if
desired I could fix the lowering for those two cases now.
DeltaFile
+44-0flang/test/Lower/OpenACC/do-concurrent-collapse.f90
+23-7flang/test/Lower/OpenACC/Todo/do-loops-to-acc-loops-todo.f90
+26-3flang/lib/Lower/OpenACC.cpp
+24-0flang/test/Semantics/OpenACC/acc-collapse-do-concurrent.f90
+16-5flang/lib/Lower/Bridge.cpp
+7-0flang/lib/Semantics/resolve-directives.cpp
+140-151 files not shown
+146-157 files

FreeBSD/ports 429cf37devel/kf6-kconfig Makefile

devel/kf6-kconfig: Add CPE information
DeltaFile
+2-1devel/kf6-kconfig/Makefile
+2-11 files

LLVM/project b87fe38mlir/docs/Tutorials ExternalTutorials.md

[mlir][docs] Add page for third-party tutorials (#188080)

Add a new page to the MLIR documentation that links to the
upstream Lighthouse project as well as additional third-party tutorials.
The goal is to make it easier for newcomers to discover MLIR learning
resources beyond the Toy tutorial.

The underlying discussion/RFC can be found
[here](https://discourse.llvm.org/t/rfc-tutorial-a-beginner-friendly-end-to-end-mlir-compiler-pipeline/89788).
DeltaFile
+31-0mlir/docs/Tutorials/ExternalTutorials.md
+31-01 files

LLVM/project 04d9c4bllvm/include/llvm/Target TargetSelectionDAG.td, llvm/lib/Target/X86 X86InstrFragmentsSIMD.td X86InstrAVX512.td

[X86] Extend alignedstore PatFrag to cover atomic_store
DeltaFile
+86-0llvm/test/CodeGen/X86/atomic-load-store.ll
+4-2llvm/lib/Target/X86/X86InstrFragmentsSIMD.td
+3-2llvm/lib/Target/X86/X86InstrAVX512.td
+1-1llvm/include/llvm/Target/TargetSelectionDAG.td
+94-54 files

LLVM/project a23bf51llvm/lib/Transforms/Scalar SROA.cpp, llvm/test/Transforms/SROA vector-promotion-rmw-tree-merge.ll vector-promotion-rmw-cannot-tree-merge.ll

[SROA] Extend tree-structured merge to handle init + RMW pattern (#194441)

## Problem

When SROA rewrites an alloca used as a read-modify-write accumulator, it
emits a linear chain of `shufflevector + select` per partial store.
`InstCombine`'s `SimplifyDemandedVectorElts` walks this chain
recursively per element, scaling quadratically with chain length — in
practice tens of seconds of compile time on some matmul kernels.

## Example

Take an `<8 x float>` alloca initialized once and then updated in 4
chunks of 2 elements each:

```llvm
%alloca = alloca <8 x float>
store <8 x float> %init, ptr %alloca                       ; full init


    [104 lines not shown]
DeltaFile
+355-139llvm/lib/Transforms/Scalar/SROA.cpp
+326-0llvm/test/Transforms/SROA/vector-promotion-rmw-tree-merge.ll
+153-0llvm/test/Transforms/SROA/vector-promotion-rmw-cannot-tree-merge.ll
+834-1393 files