LLVM/project 0cae577 — bolt/lib/Target/RISCV RISCVMCPlusBuilder.cpp, bolt/test/RISCV patch-entry-size.s patch-entry-tail-call.s

[BOLT][RISCV] Use relaxable tail calls for entry patches (#245950)

The AUIPC/ADDI/JALR entry patch needs 12 bytes and clobbers t0, which
can hold the return address as the alternate link register. Emit
`PseudoTAIL` to fit the trampoline in eight bytes and preserve t0.
JITLink can relax the AUIPC/JALR pair to a direct jump for nearby
targets.
DeltaFile
+19-0bolt/test/RISCV/patch-entry-tail-call.s
+2-3bolt/test/RISCV/patch-entry-size.s
+2-1bolt/lib/Target/RISCV/RISCVMCPlusBuilder.cpp
+23-43 files

LLVM/project b0ce4ad — lld/ELF SyntheticSections.cpp

[ELF] MergeNoTailSection: Use partitioned hash aggregation. NFC (#245892)

MergeNoTailSection::finalizeContents adds pieces to 32
StringTableBuilder shards, and every thread scans all pieces to pick
those of its own shards.

Group the live pieces of each chunk of sections by shard in parallel,
then add each shard's pieces to its StringTableBuilder on one thread in
input order, and store the offsets in a final parallel pass.

Process the sections in waves of 4M pieces to bound the memory for the
grouped pieces.

clang-debug --threads=8: 3.20 -> 2.89 s. merge/finalize:
```
                       before   after
clang-debug  t8       981 ms   665 ms
clang-debug  t1      3403 ms  2846 ms
clang-release t8      5.5 ms   5.5 ms

    [3 lines not shown]
DeltaFile
+92-23lld/ELF/SyntheticSections.cpp
+92-231 files

LLVM/project 242528d — flang/lib/Semantics check-omp-structure.h check-omp-variant.cpp, flang/test/Semantics/OpenMP metadirective-loop-applicability.f90

[flang][OpenMP] Keep pending METADIRECTIVE variants in their scope (#246123)

A loop-associated METADIRECTIVE replacement inside a BEGIN METADIRECTIVE
region can escape the region. In

```fortran
  !$omp begin metadirective default(parallel)
    continue
    !$omp metadirective when(user={condition(flag)}: simd) default(do)
  !$omp end metadirective
  do i = 1, n
  end do
```

neither SIMD nor DO has a loop in the region, but only the DO is
reported. The SIMD is checked against the loop after END METADIRECTIVE.

In this PR each block records where its entries start in the list of
pending replacements, so that it can diagnose the leftovers when it

    [4 lines not shown]
DeltaFile
+36-0flang/test/Semantics/OpenMP/metadirective-loop-applicability.f90
+20-11flang/lib/Semantics/check-omp-variant.cpp
+2-0flang/lib/Semantics/check-omp-structure.h
+58-113 files

LLVM/project e11a98c — llvm/include/llvm/CodeGen MIR2Vec.h, llvm/test/tools/llvm-ir2vec triplets-skipped-operands.mir

[llvm-ir2vec][MIR2Vec] skip noreg operands in triplets (#246048)

`MIRVocabulary::getRegisterEmbedding()` gives zero embeddings for noreg
operands. This patch skips `noreg` during triplet generation.
DeltaFile
+34-0llvm/test/tools/llvm-ir2vec/triplets-skipped-operands.mir
+7-0llvm/tools/llvm-ir2vec/lib/MIRUtils/MIRUtils.cpp
+2-4llvm/include/llvm/CodeGen/MIR2Vec.h
+43-43 files

LLVM/project 1277ef3 — llvm/include/llvm/Analysis IR2Vec.h

[IR2Vec][NFC] Map TypeIDs to canonical types with a switch (#246069)

TypeIDMapping was indexed by Type::TypeID and relied on listing the
types in enum order; its static_assert only checked the size. A TypeID
inserted in the middle of the enum would silently shift the mapping. Use
an exhaustive switch instead so that new TypeIDs are flagged.
DeltaFile
+42-35llvm/include/llvm/Analysis/IR2Vec.h
+42-351 files

LLVM/project 075d973 — lld/test/ELF merge-string-large.s

[ELF,test] Add SHF_MERGE|SHF_STRINGS stress test (#246229)

Should catch many mutations of #245892
DeltaFile
+56-0lld/test/ELF/merge-string-large.s
+56-01 files

LLVM/project 379646c — llvm/lib/Transforms/InstCombine InstCombineCasts.cpp, llvm/test/Transforms/InstCombine trunc-extractelement-inseltpoison.ll trunc-extractelement.ll

[InstCombine] Skip extelt-trunc bitcast fold for non-power-of-2 element sizes (#242998)

`foldVecExtTruncToExtElt()` turns trunc(extractelement) into
bitcast + extractelement. For vectors with a non-power-of-2 element
size this creates bitcasts like

```
  bitcast <vscale x 4 x i56> to <vscale x 56 x i4>
```

which the backend cannot legalize, so RISC-V crashes in
WidenVecRes_BITCAST. For fixed vectors the bitcast is legalizable, but
the backend has to emulate it through memory, which costs more than
the scalar trunc.

Skip the fold for non-power-of-2 element sizes, for both fixed and
scalable vectors.

Fixes #242247

Assisted-by: TRAE CLI (GLM-5.4)
DeltaFile
+30-10llvm/test/Transforms/InstCombine/trunc-extractelement.ll
+5-10llvm/test/Transforms/InstCombine/trunc-extractelement-inseltpoison.ll
+6-0llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+41-203 files

LLVM/project 2af1967 — clang/include/clang/Driver SanitizerArgs.h, clang/lib/Driver SanitizerArgs.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+8-10clang/lib/Driver/SanitizerArgs.cpp
+5-0clang/test/Driver/fsanitize-ignorelist.c
+0-1clang/include/clang/Driver/SanitizerArgs.h
+13-113 files

LLVM/project 94f5c01 — clang/lib/Analysis/FlowSensitive/Models UncheckedExpectedAccessModel.cpp, clang/unittests/Analysis/FlowSensitive MockHeaders.cpp UncheckedExpectedAccessModelTest.cpp

[FlowSensitive][Expected] Model `operator==` and `operator!=` in `UncheckedExpectedAccessModel` [PR 2/N] (#244872)

This is the second part of a split of #233219
(`bugprone-unchecked-expected-access`). It builds on the base
model from #242868 and adds modeling of the equality comparisons.

`operator==` and `operator!=` calls are now modeled when an expected is
compared with:

- **another expected**: if they are equal, both hold a value or both
hold an error. Nothing else follows,
because the values (or errors) themselves may still differ. Two
`expected<void, E>` objects that both hold
  a value are always equal.
- **a value**: if `e == v`, then `e` holds a value.
- **an `unexpected`**: if `e == u`, then `e` holds an error.

Expected scope of the user-facing changes:
```cpp

    [20 lines not shown]
DeltaFile
+343-2clang/unittests/Analysis/FlowSensitive/UncheckedExpectedAccessModelTest.cpp
+146-0clang/lib/Analysis/FlowSensitive/Models/UncheckedExpectedAccessModel.cpp
+58-1clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp
+547-33 files

LLVM/project 1eebe3a — libc/src/__support/math CMakeLists.txt expm1f.h, libc/test/src/math/smoke expm1f_test.cpp expm1_test.cpp

[libc][math] Fix near-overflow and NaN handling in expm1 and expm1f. (#246103)

- Clamp the `-2^(-hi)` exponent when `hi >= 1023` in `expm1` so `hi ==
1024` near overflow does not construct `-Inf` and raise a spurious
`FE_INVALID` in `exact_add`.
- Explicitly quiet `+/-sNaN` and raise `FE_INVALID` in `expm1` and
`expm1f`, and use `fputil::round_result_slightly_up(-1.0f)` for large
negative finite inputs in `expm1f` so `FE_INEXACT` is raised.
- Add smoke tests for `+/-sNaN`, `+/-qNaN`, and near-overflow `expm1`
inputs, and sync CMake and Bazel dependencies.

Assisted-by: Gemini
DeltaFile
+65-44libc/src/__support/math/expm1.h
+41-27libc/src/__support/math/expm1f.h
+29-5libc/test/src/math/smoke/expm1_test.cpp
+18-4libc/test/src/math/smoke/expm1f_test.cpp
+10-0libc/src/__support/math/CMakeLists.txt
+5-0utils/bazel/llvm-project-overlay/libc/src/__support/math/BUILD.bazel
+168-801 files not shown
+170-807 files

LLVM/project 5288af4 — libc/src/__support/math CMakeLists.txt log10.h

[libc][math] Fix NaN handling in log, log10, log2, log10f, log2f, and log1pf. (#246102)

- Quiet signaling `NaN` inputs and raise `FE_INVALID` before
floating-point zero comparisons in `log`, `log10`, `log2`, `log10f`, and
`log2f`.
- Handle `+/-Inf` and `+/-NaN` via `FPBits` before ordered `<` /
equality comparisons and `double` conversion in `log1pf_double_eval`
(avoiding spurious `FE_INVALID` on quiet `NaN`s and enabling `sNaN`
checks).
- Add smoke tests for `+/-sNaN` and `+/-qNaN` handling, and sync CMake
and Bazel dependencies.

Assisted-by: Gemini
DeltaFile
+37-26libc/src/__support/math/log1pf_double_eval.h
+26-10libc/src/__support/math/log2f_double_eval.h
+25-8libc/src/__support/math/log2.h
+24-8libc/src/__support/math/log10.h
+24-8libc/src/__support/math/log.h
+25-0libc/src/__support/math/CMakeLists.txt
+161-609 files not shown
+292-9015 files

LLVM/project f0233e5 — libc/src/__support/math CMakeLists.txt sincos_eval.h, libc/test/src/math/smoke cos_test.cpp

[libc][math] Fix Ziv error bound in sincos_eval. (#246105)

- Increase the Ziv error bound floor in `sincos_eval` from `0x1.0p-105`
to `0x1.0p-102` (matching `tan_eval`) to bound the small-range reduction
rounding and truncation error (`<= 2^-104` for `|x| < 2^16`) near odd
multiples of `pi / 2`.
- Add regression tests in `cos_test.cpp` and sync CMake and Bazel
dependencies.

Assisted-by: Gemini
DeltaFile
+16-3libc/test/src/math/smoke/cos_test.cpp
+14-3libc/src/__support/math/sincos_eval.h
+4-0libc/src/__support/math/CMakeLists.txt
+1-0utils/bazel/llvm-project-overlay/libc/src/__support/math/BUILD.bazel
+35-64 files

LLVM/project 29814d4 — llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950/gfx942 TRANS co-execute slot

On gfx950/gfx942, fix TRANS co-exec slot to be same as VALU.

Excluded from this commit:

  TRANS on gfx950 (in unit of hardware cycle):
    Reciprocal throughput (per SIMD):
      f32/f16: 8
      f64:     16
    Def-to-use latency:
      f32/f16: 12 to a non-TRANS reader, 8 to a TRANS reader
      f64:     20 to a non-TRANS reader, 16 to a TRANS reader
    Blocks this wave's issue for:
      f32/f16: 8
      f64:     16
  On gfx942, f32/f16 have the same numbers as f64 above.

Currently, GCNHazardRecognizer inserts the correct s_nop between a TRANS

    [4 lines not shown]
DeltaFile
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+1-1llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+2-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+4-23 files

LLVM/project 63bb9e1 — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit packed F32 co-exec tests (NFC)

Add a gfx950 coexec scheduler case where a v_pk_add_f32 and a v_add_f32
compete for the window of an XDL2x (v_mfma_f32_16x16x32_bf16) MFMA, and
a unit test for the co-execution class of the packed F32 instructions
and v_pk_add_f16. Packed F32 VALU is treated as plain VALU so far.

Assisted-by: Claude Opus 5.5
DeltaFile
+35-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+52-02 files

LLVM/project 5457031 — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Precommit TRANS co-exec tests (NFC)

Add a gfx950 coexec scheduler case where a v_exp_f32 and a v_add_f32
compete for the window of an XDL2x (v_mfma_f32_16x16x32_bf16) MFMA.
No MFMA row allows TRANS so far, so the v_exp_f32 issues after the
MFMA window.

Assisted-by: Claude Opus 5.5
DeltaFile
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+17-01 files

LLVM/project 16e1493 — llvm/lib/Target/AMDGPU AMDGPUCoExecInfo.h AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950/gfx942 v_pk f32 instr co-exec slot

On gfx950/gfx942, v_pk f32 instrs can issue only after the MFMA's own
cycles (in hardware cycles):
  XDL/SMFMAC: 8 cycles
  XDL2x/SMFMAC2x: 12 cycles
  SGEMM/DGEMM: 8 cycles

Currently they are categorized as VALU. This is wrong for
XDL/SMFMAC/XDL2x/SMFMAC2x, since VALU can issue within the MFMA's own
cycles.

Fix this by adding a PK_F32 CoExecMask bit, a PK_F32 slot in each MFMA
row, and a PackedF32VALU InstructionFlavor. Classify the following
instrs as PackedF32VALU on gfx942/gfx950:

V_PK_{ADD,FMA,MUL}_F32, V_PK_MOV_B32.

NFC for gfx1250.

    [2 lines not shown]
DeltaFile
+35-21llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+23-21llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+16-8llvm/lib/Target/AMDGPU/AMDGPUCoExecInfo.h
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+75-514 files

LLVM/project 9de57ec — llvm/test/CodeGen/AMDGPU coexec-sched-warning.mir coexec-mfma-interleave-gfx942.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit legacy MFMA co-exec tests (NFC)

Add coexec scheduler cases for a gfx940 SMFMAC
(v_smfmac_f32_16x16x32_f16) on gfx950 and for a DGEMM
(v_mfma_f64_16x16x4_f64) on gfx942 and gfx950, a gfx942 RUN line in
coexec-sched-warning.mir, and unit test rows for one MFMA per legacy
variant on gfx950 plus v_mfma_f64_16x16x4_f64 on gfx942.

The legacy variants fall back to a permissive window that lets anything
co-execute. v_mfma_f64_16x16x4_f64 uses its gfx950 rule on gfx942 as
well, and gfx942 does not enable the co-exec model yet, so it warns and
its scheduler case runs without the model.

Assisted-by: Claude Opus 5.5
DeltaFile
+64-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+49-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx942.mir
+11-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+2-0llvm/test/CodeGen/AMDGPU/coexec-sched-warning.mir
+126-04 files

LLVM/project ca1b33f — llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950 MFMA co-exec rows for XDL2x_8Pass, SMFMAC2x, DGEMM

Fix the co-exec rows for the following instructions:

XDL2x_8Pass:
  v_mfma_f32_32x32x16_f16
  v_mfma_f32_32x32x16_bf16
  v_mfma_i32_32x32x32_i8
  v_mfma_f32_32x32x64_f8f6f4 and v_mfma_scale_f32_32x32x64_f8f6f4
  with no fp8/bf8 operand

SMFMAC2x_4Pass:
  v_smfmac_f32_16x16x64_f16
  v_smfmac_f32_16x16x64_bf16
  v_smfmac_i32_16x16x128_i8
  v_smfmac_f32_16x16x128_{bf8,fp8}_{bf8,fp8}

SMFMAC2x_8Pass:
  v_smfmac_f32_32x32x32_f16

    [8 lines not shown]
DeltaFile
+8-4llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+4-4llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+13-93 files

LLVM/project 646ce36 — llvm/lib/Target/AMDGPU AMDGPUCoExecInfo.h AMDGPUTargetMachine.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir coexec-sched-warning.mir

[AMDGPU] Add MFMA co-exec rows for gfx942 MFMAs

Add MFMA co-exec rows for gfx942 MFMAs for both gfx942 and gfx950.
Gfx950 support gfx942 mfma opcodes as well as others.

Add rows for:

XDL_2Pass:
  v_mfma_f32_4x4x4_16b_{f16,bf16}
  v_mfma_i32_4x4x4_16b_i8

XDL_4Pass:
  v_mfma_f32_16x16x16_{f16,bf16}
  v_mfma_i32_16x16x32_i8
  v_mfma_f32_16x16x8_xf32 (gfx942 only)
  v_mfma_f32_16x16x32_{bf8,fp8}_{bf8,fp8}

XDL_8Pass:
  v_mfma_f32_16x16x4_4b_{f16,bf16}

    [43 lines not shown]
DeltaFile
+37-13llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+15-13llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+6-5llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+3-3llvm/lib/Target/AMDGPU/AMDGPUCoExecInfo.h
+2-2llvm/test/CodeGen/AMDGPU/coexec-sched-warning.mir
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+64-372 files not shown
+66-398 files

LLVM/project 0b9e2fe — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit gfx950 MFMA co-exec row tests (NFC)

Add a gfx950 coexec scheduler case for v_smfmac_f32_16x16x64_f16, and a
unit test that checks the first co-exec stage of SALU, DS and VMEM, VALU
and the next MFMA for one MFMA per gfx950 variant.

Assisted-by: Claude Opus 5.5
DeltaFile
+36-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+53-02 files

LLVM/project 9600d9f — llvm/lib/Target/AMDGPU VOPInstructions.td VOP3PInstructions.td, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

[AMDGPU] Describe MFMAs with a variant in MAIInstInfoTable (NFC)

- Add an MFMAVariant enum. Each MFMA pseudo gets its variant from
  MAIInstInfoTable, a TableGen GenericTable. Each real MFMA opcode
  inherits the variant of its pseudo through VOP3P_Real.
- Look up an MFMA's co-execution info by its variant, as gfx1250 does
  for WMMA, instead of matching every opcode.
- Replace the is_dgemm and is_gfx940_xdl fields with the variant.
- Describe each MFMA row by the first stage at which SALU, memory, VALU
  and the next MFMA may issue, plus the window length.

Assisted-by: Claude Opus 5.5
DeltaFile
+57-308llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+76-33llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+28-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+23-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+20-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+10-1llvm/lib/Target/AMDGPU/VOPInstructions.td
+214-3466 files

LLVM/project 0341758 — llvm/lib/Target/AMDGPU SIInstrInfo.h

[AMDGPU] Exclude real V_ACCVGPR_READ/WRITE_B32_vi opcodes from isMFMA

Currently, only pseudo V_ACCVGPR_{READ,WRITE}_B32_e64 is excluded, fix
by also exclude real V_ACCVGPR_READ/WRITE_B32_vi.
DeltaFile
+9-7llvm/lib/Target/AMDGPU/SIInstrInfo.h
+9-71 files

LLVM/project 06880c9 — llvm/lib/Target/RISCV RISCVCombine.td, llvm/lib/Target/RISCV/GISel RISCVPostLegalizerCombiner.cpp

[RISCV][GlobalISel] Reland byte-spreading combine to orc.b (#243756)

Recognize byte-spreading shift/subtract patterns and fold them to orc.b
when Zbb is enabled.

Reland #240276, reverted in #243271. The rule-name selection option is
unavailable without assertions. Isolate that check in an asserts-only
test, keeping regular tests enabled in both assertion configurations.

Fixes #243242
DeltaFile
+917-0llvm/test/CodeGen/RISCV/GlobalISel/orc-b-combine.mir
+494-0llvm/test/CodeGen/RISCV/GlobalISel/orc-b-patterns-rv64.ll
+306-0llvm/test/CodeGen/RISCV/GlobalISel/orc-b-patterns-rv32.ll
+50-0llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
+27-0llvm/test/CodeGen/RISCV/GlobalISel/orc-b-combine-only.mir
+9-1llvm/lib/Target/RISCV/RISCVCombine.td
+1,803-16 files

LLVM/project 550bc02 — clang/docs ReleaseNotes.md, clang/lib/Analysis CFG.cpp

Revert "[clang] Suppress -Wuninitialized for unevaluated builtin args" (#217816) (#246206)

This reverts commit f19973fdd2fe4c112e0d659b9da21e2bb5a048f6.

Leaving the argument of __builtin_constant_p out of the CFG means
warnings in it that are queued with DiagRuntimeBehavior are no longer
dropped when they are in a branch that folds away. This breaks
-Werror builds of the Linux kernel, whose ilog2() has such a branch
inside MAYBE_BUILD_BUG_ON's __builtin_constant_p:

  mm/hugetlb.c:4292:42: error: implicit conversion from 'unsigned long
  long' to 'u32' (aka 'unsigned int') changes value from 17179869184
  to 0 [-Werror,-Wconstant-conversion]

Reduced:

  int f(unsigned char);
  int g(void) { return __builtin_constant_p(0 ? f(65535) : 1); }


    [3 lines not shown]
DeltaFile
+0-21clang/test/Sema/uninit-variables.c
+0-19clang/test/Analysis/cfg.cpp
+0-5clang/docs/ReleaseNotes.md
+2-1clang/lib/Analysis/CFG.cpp
+2-464 files

LLVM/project faeb38e — flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP threadprivate-block.f90

[Flang][OpenMP] Fix THREADPRIVATE lowering crash in nested BLOCKs (#244185)

Threadprivate variables in nested BLOCKs have no binding at parallel
entry, causing lowering to crash.

Defer uninstantiated BLOCK variables to BLOCK lowering while preserving
rebinding of already instantiated variables.

Add regression tests for nested BLOCKs, parallel do, tasks, nested
parallel regions, implicit SAVE, and enclosing BLOCKs.

AI tools were used to assist in generating the test cases.

Fixes https://github.com/llvm/llvm-project/issues/230312
DeltaFile
+207-0flang/test/Lower/OpenMP/threadprivate-block.f90
+9-0flang/lib/Lower/OpenMP/OpenMP.cpp
+216-02 files

LLVM/project 3cb45f4 — clang/docs ReleaseNotes.md, clang/lib/Sema TreeTransform.h

[Clang] Fix crash when substituting an invalid _Generic controlling type (#244586)

This fixes https://github.com/llvm/llvm-project/issues/242122. When
substitution of the controlling type fails, the controlling expression
is unset, so isInvalid() returns false. This lets Clang attempt to
rebuild the generic selection with a null operand. Use isUsable() to
detect when both the expression and type are absent and propagate the
substitution failure.

Assisted-by: OpenAI Codex
DeltaFile
+10-0clang/test/SemaCXX/generic-selection.cpp
+3-0clang/docs/ReleaseNotes.md
+1-1clang/lib/Sema/TreeTransform.h
+14-13 files

LLVM/project 74d2d39 — .github/workflows libc-freebsd-vm-tests.yml

Revert "[libc][GitHub] Use tmpdir for FreeBSD workflow" (#246200)
DeltaFile
+3-3.github/workflows/libc-freebsd-vm-tests.yml
+3-31 files

LLVM/project a1fe84b — mlir/include/mlir/Dialect/GPU/IR CompilationAttrs.td, mlir/include/mlir/Dialect/GPU/Transforms Passes.td

[mlir][gpu] Replace hard-coded ctor priority of 123 with an option defaulting to 123 (#246111)

The current `gpu-module-to-binary` pass hard-codes ctor priority to
`123`, which causes conflicts with embedded GPU runtimes. This change
allows the ctor priority to be set via pass/pipeline options, while
keeping the default at `123`.

Some out of tree GPU runtime compatibility tools load the runtime with a
different ctor priority, so this gives flexibility to ensure
MLIR-generated modules are loaded in the right order.
DeltaFile
+76-0mlir/lib/Dialect/GPU/Transforms/AttachSelectObject.cpp
+29-0mlir/test/Dialect/GPU/attach-select-object.mlir
+24-2mlir/include/mlir/Dialect/GPU/IR/CompilationAttrs.td
+24-0mlir/include/mlir/Dialect/GPU/Transforms/Passes.td
+11-2mlir/test/Target/LLVMIR/gpu.mlir
+10-0mlir/test/Dialect/GPU/ops.mlir
+174-47 files not shown
+205-913 files

LLVM/project b6ac27d — llvm/lib/Transforms/IPO FunctionSpecialization.cpp, llvm/lib/Transforms/Utils SCCPSolver.cpp

[IPSCCP] Mark byval capture as Overdefined (#244824)

ptr byval reuse the original pointer identity. Any capture on ptr byval
can easily cause miscompilation as taking reference on ptr byval is
always considered as the passed value. Therefore, we put any ptr byval
in OverDefined.

Assisted-by: Claude # Test
Fixes: https://github.com/llvm/llvm-project/issues/236130
DeltaFile
+39-2llvm/test/Transforms/SCCP/2009-09-24-byval-ptr.ll
+3-3llvm/lib/Transforms/Utils/SCCPSolver.cpp
+3-3llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
+45-83 files

LLVM/project efba78a — flang/lib/Semantics mod-file.cpp, flang/test/Semantics modfile90.f90 modfile94.f90

[flang][Semantics] Fix DEC STRUCTURE re-export writing un-parseable module file (#240880)

Fixes #229768

## Problem

When a module re-exports a DEC `STRUCTURE` brought in via `USE`, flang
writes the slash-enclosed structure name into the re-exporting module's
`.mod` file as an only-list item:

```fortran
! m2.mod (incorrect)
module m2
use m1,only:/s/
end
```

`/s/` is not a valid Fortran identifier, so the module file cannot be
re-parsed. Any program that `USE`s the re-exporting module crashes with

    [74 lines not shown]
DeltaFile
+187-47flang/lib/Semantics/mod-file.cpp
+110-0flang/test/Semantics/modfile91.f90
+85-0flang/test/Semantics/modfile93.f90
+47-0flang/test/Semantics/modfile92.f90
+40-0flang/test/Semantics/modfile90.f90
+40-0flang/test/Semantics/modfile94.f90
+509-471 files not shown
+519-517 files