LLVM/project 3d6ac5amlir/lib/Dialect/Func/Transforms DuplicateFunctionElimination.cpp, mlir/test/Dialect/Func duplicate-function-elimination.mlir

[mlir][func] Fix a crash in DuplicateFunctionEliminationPass (#209667)

Previously, we used `SymbolUserMap::replaceAllUsesWith` to replace
symbols, but this could not update the symbol table cached by
`SymbolUserMap` during traversal, leading to a crash. This PR switches
to `SymbolTable::replaceAllSymbolUses`, which always operates on the
latest symbol table and avoids the crash. Fixes #209648.
DeltaFile
+26-0mlir/test/Dialect/Func/duplicate-function-elimination.mlir
+3-3mlir/lib/Dialect/Func/Transforms/DuplicateFunctionElimination.cpp
+29-32 files

LLVM/project 723eaa4libc/cmake/caches baremetal_common.cmake

[libc][cmake] Enable assertions and Werror for baremetal builds (#214093)

Enable LLVM_ENABLE_ASSERTIONS and LLVM_ENABLE_WERROR in
baremetal_common.cmake
to ensure pre-merge checks catch assertion failures and compiler
warnings for
baremetal targets.

Assisted-by: Gemini
DeltaFile
+2-0libc/cmake/caches/baremetal_common.cmake
+2-01 files

LLVM/project b4d1d3ellvm/lib/Target/PISA/MCTargetDesc PISATargetStreamer.cpp

Fix formatting
DeltaFile
+2-2llvm/lib/Target/PISA/MCTargetDesc/PISATargetStreamer.cpp
+2-21 files

LLVM/project 7fe0858llvm/lib/Target/PISA PISAInstrInfo.td PISARegisterInfo.td, llvm/lib/Target/PISA/MCTargetDesc PISAMCTargetDesc.h PISAMCTargetDesc.cpp

Remove unnecessary edits
DeltaFile
+4-4llvm/lib/Target/PISA/PISA.td
+3-3llvm/lib/Target/PISA/PISARegisterInfo.td
+1-1llvm/lib/Target/PISA/PISAInstrInfo.td
+1-1llvm/lib/Target/PISA/MCTargetDesc/PISAMCTargetDesc.h
+1-1llvm/lib/Target/PISA/MCTargetDesc/PISAMCTargetDesc.cpp
+1-1llvm/lib/Target/PISA/MCTargetDesc/PISAInstPrinter.h
+11-113 files not shown
+13-129 files

LLVM/project af2a0e9compiler-rt/cmake/Modules CompilerRTUtils.cmake

[compiler-rt][cmake] filter libc-backed builtins superseded by assembly (#213481)

apply
https://github.com/llvm/llvm-project/pull/209900#discussion_r3615454574

fix the duplication that causes issues like this:
```
 lit-23: /__w/llvm-project/llvm-project/compiler-rt/test/builtins/Unit/lit.cfg.py:186: fatal: builtins_source_features contains duplicates: ['librt_has_floatdidf', 'librt_has_floatdisf', 'librt_has_floatundidf', 'librt_has_floatundisf']
FAILED: compiler-rt/test/builtins/CMakeFiles/check-builtins /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/CMakeFiles/check-builtins 
cd /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins && /usr/bin/python3 /usr/bin/lit-23 -sv --show-xfail --show-unsupported /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/TestCases /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/X86_64LinuxConfig
ninja: build stopped: subcommand failed.
```

Part of #197824
DeltaFile
+2-0compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+2-01 files

LLVM/project 5650cd1llvm/lib/Target/PISA PISAInstrInfo.cpp PISAInstrFormats.td, llvm/lib/Target/PISA/MCTargetDesc PISAInstPrinter.cpp PISATargetStreamer.cpp

Add PISA register file, instruction set, and MC layer

Add the PISA register file and register-bank descriptions, the instruction
formats and definitions, and the MC/assembly layer (instruction printer,
register and code encoders, target streamer, MC target description and the
supporting enums), replacing the stub descriptions from
the initial target skeleton.

This provides the instruction-set description and assembly-emission
foundation. The GlobalISel lowering and instruction selection that consume it
are added in the following changes.
DeltaFile
+2,511-11llvm/lib/Target/PISA/PISAInstrInfo.td
+1,075-0llvm/lib/Target/PISA/PISACombine.td
+834-0llvm/lib/Target/PISA/PISAInstrFormats.td
+572-0llvm/lib/Target/PISA/MCTargetDesc/PISATargetStreamer.cpp
+448-1llvm/lib/Target/PISA/PISAInstrInfo.cpp
+394-11llvm/lib/Target/PISA/MCTargetDesc/PISAInstPrinter.cpp
+5,834-2333 files not shown
+8,449-6439 files

LLVM/project d19d7e8clang/lib/Analysis IssueHash.cpp, clang/lib/StaticAnalyzer/Checkers/WebKit RawPtrRefMemberChecker.cpp

[clang][StaticAnalyzer] Add support for variables and fields in GetEnclosingDeclContextSignature

Function `getIssueHash` relies on the name of the enclosing
declaration of the issue Decl for hashing. But the underlying
function `GetEnclosingDeclContextSignature` does not compute the
enclosing declaration for variables or fields, causing missing HTML
reports despite text warnings being printed.

The added
`clang/test/Analysis/Checkers/WebKit/html-diag-dedup-members.cpp`
example is a reproducer of this kind of issue we observed in WebKit.

Also, `RawPtrRefLocalVarsChecker` and `RawPtrRefMemberChecker` never
called `Report->setDeclWithIssue()`. This commit fixes it.

rdar://183700416

Assisted-by: Claude sonnet
DeltaFile
+33-0clang/test/Analysis/Checkers/WebKit/html-diag-dedup-ivars.mm
+31-0clang/test/Analysis/Checkers/WebKit/html-diag-dedup-members.cpp
+25-0clang/test/Analysis/Checkers/WebKit/html-diag-dedup-parameters.cpp
+23-0clang/test/Analysis/Checkers/WebKit/html-diag-dedup-local-vars.cpp
+15-0clang/lib/Analysis/IssueHash.cpp
+1-0clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
+128-01 files not shown
+129-07 files

LLVM/project 66032aaclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenBuiltin.cpp CIRGenCoroutine.cpp

[CIR] Change previous coroutine builtins to have their own coro intrinsic ops (#211699)

This PR introduces dedicated CIR operations for the coroutine intrinsics
(`coro.intrinsic.id`, `coro.intrinsic.alloc`, `coro.intrinsic.begin`,
`coro.intrinsic.free`, `coro.intrinsic.end`, `coro.intrinsic.size`)
instead of emitting them as calls to hand-created builtin functions.
LLVM IR already has its own dedicated ops for these cases, so this
follows the same pattern at CIR.

Along the way this also changes how coroutine builtins are handled in
`CIRGenBuiltin`: previously the intrinsics emitted automatically as part
of lowering `EmitCoroutineBody` and the ones triggered by an explicit
`__builtin_coro_*` call written in user source code were going through
the same path. This PR separates the two, since they're conceptually
different emission points.

New tests covering these builtins are included as well.

Also added explicit `errorNYI` messages for the remaining

    [11 lines not shown]
DeltaFile
+109-115clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
+114-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+51-0clang/test/CIR/CodeGenCoroutines/coro-builtins.cpp
+34-14clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+36-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+8-14clang/test/CIR/CodeGenCoroutines/coro-task.cpp
+352-1433 files not shown
+369-1559 files

LLVM/project 9567f47llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp

[AMDGPU][GlobalISel] Use single B32 rule for permlane16

B32 already covers s32, <2 x s16> and 32-bit pointers, so one StandardB
fast rule replaces the separate S32, V2S16 and DivPtr32 rules. This
matches permlane_bcast/up/down/xor and permlane64, which have the same
overloaded intrinsic shape.

Change-Id: I770a93d5e75e68df704e84d7ad165fdd2cf2fc53
DeltaFile
+4-11llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+4-111 files

LLVM/project 2ea101ellvm/include/llvm/IR PISAIntrinsicUtils.h IntrinsicsPISA.td, llvm/include/llvm/Support PISAAddrSpace.h

Add PISA IR intrinsics and address-space utilities

This patch adds the PISA IR intrinsics definitions, address space
utilities, and basic tests.
DeltaFile
+252-0llvm/include/llvm/IR/IntrinsicsPISA.td
+121-0llvm/lib/IR/PISAIntrinsicUtils.cpp
+72-0llvm/include/llvm/IR/PISAIntrinsicUtils.h
+59-0llvm/include/llvm/Support/PISAAddrSpace.h
+24-0llvm/test/CodeGen/PISA/intrinsics-attributes.ll
+20-0llvm/test/CodeGen/PISA/intrinsics-address-space.ll
+548-05 files not shown
+572-011 files

LLVM/project fc2f417llvm/lib/Target/PISA PISARegisterInfo.td PISATargetMachine.h, llvm/lib/Target/PISA/MCTargetDesc PISAMCAsmInfo.cpp PISAMCTargetDesc.cpp

Add PISA target registration and backend stub

Register the Intel GPU portable ISA (PISA) target. Add the pisa Triple
arch, data layout, and a minimal MC/TargetMachine skeleton.
DeltaFile
+85-0llvm/lib/Target/PISA/PISATargetMachine.cpp
+64-0llvm/lib/Target/PISA/MCTargetDesc/PISAMCTargetDesc.cpp
+61-0llvm/lib/Target/PISA/PISASubtarget.h
+46-0llvm/lib/Target/PISA/PISATargetMachine.h
+41-0llvm/lib/Target/PISA/MCTargetDesc/PISAMCAsmInfo.cpp
+39-0llvm/lib/Target/PISA/PISARegisterInfo.td
+336-025 files not shown
+880-031 files

LLVM/project d7575bcllvm/lib/Target/RISCV RISCVInsertVSETVLI.cpp, llvm/test/CodeGen/RISCV/rvv xsfmm-vsetvl-removal.ll

[RISCV] coalesce between VSETVLI and SF_VSETTNT (#203438)

When twiden != 0, LMUL, tail policy, and mask policy from the user are
ignored. The tail policy and mask policy are always treated as agnostic.
The normal RVV instruction will ignore the twiden parameter. This
observation could allow the RVV instruction and xsfmm instruction to
share the same configuration instruction.

We need to make sure the AVL, SEW, and AltFmt is same between VSETVL and
VSETVLTN.

---------

Co-authored-by: Luke Lau <luke_lau at icloud.com>
DeltaFile
+666-0llvm/test/CodeGen/RISCV/rvv/xsfmm-vsetvl-removal.ll
+111-0llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+777-02 files

LLVM/project 1fc2b37llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.mfma.gfx950.ll llvm.amdgcn.smfmac.gfx950.ll

[AMDGPU][GISel] RegBankLegalize rules for BF16 variants of gfx950 MFMA intrinsics (#214042)
DeltaFile
+1,130-583llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.gfx950.bf16.ll
+668-345llvm/test/CodeGen/AMDGPU/llvm.amdgcn.smfmac.gfx950.ll
+75-37llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.gfx950.ll
+29-29llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+1,902-9944 files

LLVM/project 02b5bebllvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.cvt.scalef32.sr.ll llvm.amdgcn.cvt.scalef32.pk.ll

[AMDGPU][GISel] RegBankLegalize rules for CVT Scale and SR BF16-specific intrinsics (#214018)
DeltaFile
+352-172llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.sr.pk.ll
+305-116llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.gfx950.ll
+235-65llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scale.pk.ll
+115-119llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.ll
+62-27llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+85-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.sr.ll
+1,154-5006 files not shown
+1,258-56412 files

LLVM/project 20339dalldb/source/Target ThreadPlanStepInRange.cpp

[lldb] Step past a prologue the pc is inside (#213555)

A step into a function ran past its prologue only when the pc was
exactly the function's first address. A target whose entry point is not
a function's first address (such as WebAssembly) is entered past it.
This means that the check took every such call for one whose prologue
had already run, and the step stopped on the opening brace instead of
the first statement.

What says the prologue has yet to run is the pc being inside it, which
for a target that does enter at the first address is the condition that
was there before.
DeltaFile
+12-4lldb/source/Target/ThreadPlanStepInRange.cpp
+12-41 files

LLVM/project bd41173llvm/lib/CodeGen/GlobalISel LoadStoreOpt.cpp, llvm/test/CodeGen/AArch64/GlobalISel store-merging-debug.mir store-merging.mir

[AArch64][GlobalISel] Use a concrete type for store merging. (#213740)

This is just to reduce the number of scalar types in the MIR, as the
value is between a constant and a store it should have little effect.
DeltaFile
+16-16llvm/test/CodeGen/AArch64/GlobalISel/store-merging.mir
+2-2llvm/test/CodeGen/AArch64/GlobalISel/store-merging-debug.mir
+1-1llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+19-193 files

LLVM/project 437ff36clang/lib/CIR/CodeGen CIRGenClass.cpp, clang/test/CIR/CodeGen partial-array-cleanup.cpp array-ctor.cpp

[CIR] Move array-ctor cleanup to properly cleanup temporaries (#213993)

This patch came out of self-build, any constructor temporary called
during the construction of an array element was being improperly cleaned
up (actually, no terminator?). This patch moves the RunCleanups RAII to
do so immediately in the body.

The OGCG/LLVM check lines are effectively equal, except OGCG uses a PHI
and we are doing so with an iterator loop, but the 'dtor called
immediately' is still correct.
DeltaFile
+178-0clang/test/CIR/CodeGen/array-ctor.cpp
+161-0clang/test/CIR/CodeGen/partial-array-cleanup.cpp
+59-60clang/lib/CIR/CodeGen/CIRGenClass.cpp
+398-603 files

LLVM/project bc6f2a9clang/lib/CIR/Dialect/IR CIRDialect.cpp, clang/test/CIR/IR invalid-global.cir

[CIR] Reject a global carrying a function type (#214065)

The verifier was accepting a `cir.global` whose `sym_type` is a
function. The LLVM dialect global takes one too, so it survives to LLVM
IR translation and crashes instead of reporting an error.
`GlobalOp::verify()` now rejects it.
DeltaFile
+9-0clang/test/CIR/IR/invalid-global.cir
+5-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+14-02 files

LLVM/project 99fabb8flang/lib/Lower/OpenMP Clauses.cpp

format
DeltaFile
+5-5flang/lib/Lower/OpenMP/Clauses.cpp
+5-51 files

LLVM/project 8ecbad0llvm/lib/Target/AMDGPU AMDGPUInsertDelayAlu.cpp, llvm/test/CodeGen/AMDGPU insert-delay-alu-wmma-xdl.mir

[AMDGPU] Skip s_delay_alu for gfx1250 WMMA C-reuse chains

Consecutive gfx1250 WMMA/SWMMAC ops accumulating into the same matrix C
register reuse the accumulator in place, so the tied srcC read is
omitted and no delay is needed. AMDGPUInsertDelayAlu did not model this
and emitted an s_delay_alu that stalls the reuse chain.

Detect a C-reuse edge (tied srcC overlaps the previous XDL WMMA's dest,
with no intervening instruction) and skip the delay for that operand.
The change is state-neutral and safe, since GFX12+ interlocks the
matrix C hazard in hardware.
DeltaFile
+44-0llvm/test/CodeGen/AMDGPU/insert-delay-alu-wmma-xdl.mir
+23-0llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp
+67-02 files

LLVM/project 452467cllvm/lib/CodeGen/SelectionDAG LegalizeTypes.h LegalizeVectorTypes.cpp, llvm/test/CodeGen/NVPTX masked-divrem.ll

[SelectionDAG] Split masked div/rem operands with illegal masks (#214058)

PR description written by Codex

Split masked signed and unsigned division/remainder alongside illegal
vector masks to fix NVPTX SelectionDAG crashes. Covers all four
intrinsics and the original eight-lane reproducer; five focused LLVM
tests pass.
DeltaFile
+46-0llvm/test/CodeGen/NVPTX/masked-divrem.ll
+22-0llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+1-0llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
+69-03 files

LLVM/project 95572b4llvm/test/MC/RISCV rv32i-invalid.s

[RISC-V][MC] Add a few more tests for invalid lw operands

To show the difference in diagnostic output as suggested in
https://github.com/llvm/llvm-project/pull/210901.

Pull Request: https://github.com/llvm/llvm-project/pull/214070
DeltaFile
+15-1llvm/test/MC/RISCV/rv32i-invalid.s
+15-11 files

LLVM/project 05801eallvm/test/CodeGen/RISCV target-abi-invalid.ll

improve tests

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+11-11llvm/test/CodeGen/RISCV/target-abi-invalid.ll
+11-111 files

LLVM/project aeaa2aaclang/lib/CodeGen CGOpenMPRuntime.cpp, clang/test/OpenMP target_map_nested_ptr_member_mapper_codegen.cpp

[OpenMP] Propagate PRESENT to pointee entries in mapper codegen (#210214)

For cases like:

```c
#pragma omp declare_mapper (default: S s) map(s.x, s.p[0:10])

S s1;
...
#pragma omp target_enter_data map(present, alloc: s1)
```
After "mapper-expansion", the behavior of the above should be equivalent
to:

```
#pragma omp target_enter_data map(present, alloc: s1.x) map(present, alloc: s.p[0:10])
```

i.e. The `present` map-type needs to be propagated to the map for the

    [31 lines not shown]
DeltaFile
+36-11llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+20-17clang/test/OpenMP/target_map_nested_ptr_member_mapper_codegen.cpp
+10-17offload/test/mapping/mapper_target_update_present_ptee.c
+14-13offload/test/mapping/mapper_map_mbr_then_present_mbr_ptee.c
+15-4llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+13-3clang/lib/CodeGen/CGOpenMPRuntime.cpp
+108-656 files

LLVM/project 459d6a9flang/lib/Lower/OpenMP ClauseProcessor.cpp Utils.cpp

Apply clang-format to iterator lowering
DeltaFile
+2-2flang/lib/Lower/OpenMP/Utils.cpp
+1-2flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+3-42 files

LLVM/project 50122b5lld/test/ELF/lto riscv-target-abi.ll, llvm/lib/Target/RISCV RISCVSubtarget.cpp

rebase on top of baseline change. simplify RISCVTargetELFStreamer to avoid duplicate message

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+36-0lld/test/ELF/lto/riscv-target-abi.ll
+15-1llvm/test/MC/RISCV/rv32i-invalid.s
+2-10llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
+4-4llvm/test/CodeGen/RISCV/target-abi-invalid.ll
+2-1llvm/lib/Target/RISCV/RISCVSubtarget.cpp
+59-165 files

LLVM/project 6f056c5lld/test/ELF/lto riscv-target-abi.ll, llvm/test/MC/RISCV rv32i-invalid.s

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.8-beta.1-arichardson

[skip ci]
DeltaFile
+36-0lld/test/ELF/lto/riscv-target-abi.ll
+15-1llvm/test/MC/RISCV/rv32i-invalid.s
+51-12 files

LLVM/project 32c8b19llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.rcp.bf16.ll llvm.amdgcn.sqrt.bf16.ll

[AMDGPU] Support GISel for bf16 rcp and sqrt
DeltaFile
+179-74llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sqrt.bf16.ll
+135-4llvm/test/CodeGen/AMDGPU/llvm.amdgcn.rcp.bf16.ll
+16-9llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+330-873 files

LLVM/project 745271fclang/docs BoundsSafetyImplPlans.md, clang/include/clang/Basic Attr.td AttrDocs.td

[NFC][BoundsSafety] Give `counted_by_or_null`, `sized_by`, and `sized_by_or_null` their own documentation (#212877)

Previously the `counted_by`, `counted_by_or_null`, `sized_by`, and
`sized_by_or_null` attributes all pointed at a single `Documentation`
object (`CountedByDocs`). The generated `AttributeReference.rst`
therefore folded all four into one entry whose text described only
`counted_by` used on a C99 flexible array member.

This was misleading because the attributes differ in important ways that
went undocumented:

* `counted_by` counts *elements* whereas `sized_by` counts *bytes*.
* `counted_by` and `sized_by` require a null pointer to have a zero
count/size, while the `_or_null` variants allow a null pointer
regardless of the count or size.
* `counted_by` may be applied to a flexible array member, but
`sized_by`, `counted_by_or_null`, and `sized_by_or_null` apply to
pointers only.


    [29 lines not shown]
DeltaFile
+225-6clang/include/clang/Basic/AttrDocs.td
+3-3clang/include/clang/Basic/Attr.td
+6-0clang/docs/BoundsSafetyImplPlans.md
+234-93 files

LLVM/project 42c92b9lld/test/ELF/lto riscv-target-abi.ll

fix typo

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+3-3lld/test/ELF/lto/riscv-target-abi.ll
+3-31 files