LLVM/project bfdc766orc-rt/lib/bedrock CMakeLists.txt, orc-rt/lib/support CMakeLists.txt

[orc-rt] Compose Bedrock from object libraries (#221650)

Add orc-rt-bedrock-objects, and rename orc-rt-support to
orc-rt-support-objects, leaving orc-rt-bedrock as a shipped library with
no sources of its own that is composed from both. The -objects suffix
marks targets that produce no artifact.

The unit tests now link the object libraries directly rather than the
shipped library. This will allow them to continue working when Bedrock
becomes buildable as a dylib with no C++ API exported.
DeltaFile
+15-9orc-rt/test/unit/CMakeLists.txt
+13-6orc-rt/lib/bedrock/CMakeLists.txt
+3-3orc-rt/lib/support/CMakeLists.txt
+31-183 files

LLVM/project b0aa16fllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/lib/Transforms/Vectorize/SLPVectorizer SLPUtils.h SLPUtils.cpp

[SLP][modularisation][NFC] Move isFixedVectorShuffle to SLPUtils (#221639)

Move the BoUpSLP-independent shuffle helper out of SLPVectorizer.cpp
into SLPVectorizer/SLPUtils.{h,cpp}:

  isFixedVectorShuffle

It sits with the existing shuffle/mask helpers. Behavior is unchanged.

Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
DeltaFile
+113-0llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPUtils.cpp
+0-112llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+8-0llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPUtils.h
+121-1123 files

LLVM/project 80062a2llvm/lib/Target/Mips/AsmParser MipsAsmParser.cpp, llvm/test/MC/Mips macro-la-pic-defined-global.s

[Mips] Use ELF binding when expanding PIC la (#217566)

A symbol already assigned to a section is not necessarily local. Use ELF
symbol binding when expanding PIC `la`, retaining the existing
section-based fallback for non-ELF targets, so defined default-visible
globals use the correct global GOT form.

Adds `llvm/test/MC/Mips/macro-la-pic-defined-global.s` covering global,
local, and `$25` call-register expansions.

Fixes #217371

(cherry picked from commit eac7a734625083fc78164f1b7d67a74cb5ab334f)
DeltaFile
+44-0llvm/test/MC/Mips/macro-la-pic-defined-global.s
+5-5llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+49-52 files

LLVM/project d27393cflang-rt/lib/runtime environment.cpp

[flang-rt] Fix runtime/environment.cpp compilation on FreeBSD (#219705)

`runtime/environment.cpp` doesn't compile on FreeBSD:

```
runtime/environment.cpp:115:47: error: use of undeclared identifier 'RTLD_DEFAULT'
  115 |   auto envpp{reinterpret_cast<char ***>(dlsym(RTLD_DEFAULT, "environ"))};
      |                                               ^~~~~~~~~~~~
```

`<dlfcn.h>` needs to be included.

Tested on `x86_64-pc-freebsd15.1` and `x86_64-pc-linux-gnu`.

(cherry picked from commit 20102748a3548a1006e32056868cb3df8ce83565)
DeltaFile
+3-1flang-rt/lib/runtime/environment.cpp
+3-11 files

LLVM/project a53c3e5llvm/lib/Target/Mips MipsISelDAGToDAG.h MipsISelDAGToDAG.cpp, llvm/test/CodeGen/Mips cmov.ll

[MIPS] Fix GP-relative selection after select/add combine (#215414)

## Summary

- Rewrite `$gp + select(...)` before MIPS instruction selection when a
select
  arm contains a GP-relative relocation.
- Keep each `MipsISD::GPRel` attached to a selectable add operation.
- Add MIPS32 regression coverage and update the resulting MIPS64 checks.

## Background

The generic DAG combiner can transform:

    select C, (add $gp, %gp_rel(A)), (add $gp, %gp_rel(B))

into:

    add $gp, (select C, %gp_rel(A), %gp_rel(B))

    [34 lines not shown]
DeltaFile
+49-0llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
+3-4llvm/test/CodeGen/Mips/llvm-ir/select-globaladdr.ll
+6-0llvm/test/CodeGen/Mips/cmov.ll
+2-0llvm/lib/Target/Mips/MipsISelDAGToDAG.h
+60-44 files

LLVM/project d1e3b26llvm/lib/Target/Mips MipsISelLowering.cpp, llvm/test/CodeGen/Mips named-register-mips3-o32.ll

[Mips] Select GPR register class based on requested type size (#220012)

In MipsTargetLowering::getRegisterByName(), the register class was
previously selected solely based on Subtarget.isGP64bit(), ignoring the
requested value type size (VT).

When compiling for a 64-bit MIPS CPU with the 32-bit o32 ABI (such as
-mcpu=mips3 -target-abi=o32), Subtarget.isGP64bit() is true even though
32-bit registers are expected. Reading a 32-bit named register like $gp
(e.g., via llvm.read_register.i32) returned a 64-bit register ($gp_64).
This resulted in a cross-register-class copy from GPR64 to GPR32 that
MipsSEInstrInfo::copyPhysReg() could not lower. In builds without
assertions, this constructed an invalid TargetOpcode::PHI (opcode 0)
instruction and caused a crash in MipsMCCodeEmitter during object file
emission.

Inspect VT.getSizeInBits() in getRegisterByName() to select
GPR32RegClassID for 32-bit types and GPR64RegClassID for 64-bit types
when supported by the subtarget, reporting an error for invalid types.

    [5 lines not shown]
DeltaFile
+29-0llvm/test/CodeGen/Mips/named-register-mips3-o32.ll
+17-3llvm/lib/Target/Mips/MipsISelLowering.cpp
+46-32 files

LLVM/project 4f7718bflang-rt/unittests/Runtime Exceptions.cpp

[flang-rt][test] Fix Exceptions.cpp compilation on FreeBSD (#219709)

The `Runtime/Exceptions.cpp` test doesn't compile on FreeBSD:

```
unittests/Runtime/Exceptions.cpp:41:10: error: no type named '__fesetenv_int' in namespace 'std'
   41 |     std::fesetenv(&saved_);
      |     ~~~~~^
/usr/include/fenv.h:158:22: note: expanded from macro 'fesetenv'
  158 | #define fesetenv(a)             __fesetenv_int(a)
unittests/Runtime/Exceptions.cpp:41:20: error: declaration of reference variable 'saved_' requires an initializer
   41 |     std::fesetenv(&saved_);
      |                    ^~~~~~
```

`<fenv.h>` defines

```
#define fesetenv(a)             __fesetenv_int(a)

    [7 lines not shown]
DeltaFile
+4-2flang-rt/unittests/Runtime/Exceptions.cpp
+4-21 files

LLVM/project 13259baclang/lib/Format UnwrappedLineFormatter.cpp, clang/unittests/Format FormatTestJava.cpp

  [clang-format] Keep empty Java interface/record body on one line (#219910)

`AllowShortRecordOnASingleLine` (introduced for C++ records) made
  `LineJoiner::tryFitMultipleLinesInOne` route Java `TT_RecordLBrace`
  lines to `tryMergeRecord`, which only handles C++ class/struct/union
  records. Empty Java `interface` and `record` bodies were therefore no
  longer merged onto a single line, regressing the behavior that
  `BraceWrapping.SplitEmptyRecord: false` previously provided.

  Handle Java records separately and restore the pre-existing
  `SplitEmptyRecord`-based merge.

  Fixes #219711

(cherry picked from commit 6d390ea43be046d62bc880524ffc4734a21307a7)
DeltaFile
+7-2clang/lib/Format/UnwrappedLineFormatter.cpp
+7-0clang/unittests/Format/FormatTestJava.cpp
+14-22 files

LLVM/project 9f658calibc/include/llvm-libc-macros float16-macros.h

[libc] Disable float16 on 32-bit x86 without SSE2 (#219675)

Fixes #219668

Building llvm 23.1.0 (and current main) for 32-bit x86 without SSE2
fails since APFloat.cpp started including libc's shared/math.h. All the
errors come from the float16 headers:

```
libc/src/__support/FPUtil/BasicOperations.h:63:67: error: SSE register return with SSE2 disabled
libc/src/__support/math/acosf16.h:73:14: error: invalid conversion from type '_Float16' without option '-msse2'
```

The float16 detection in float16-macros.h checks __FLT16_MANT_DIG__.
Since GCC 14 that macro is defined on ia32 even without SSE2, where
_Float16 is storage-only and any arithmetic or returning by value is an
error.
The GCC 14 release notes say to check __SSE2__ for arithmetic support
instead: https://gcc.gnu.org/gcc-14/changes.html

    [12 lines not shown]
DeltaFile
+1-1libc/include/llvm-libc-macros/float16-macros.h
+1-11 files

LLVM/project 5f27b70llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp, llvm/test/CodeGen/X86 intrinsic-cttz-elts.ll

[SelectionDAG] Avoid irregular INSERT_SUBVECTOR when widening CTTZ_ELTS (#218019)

Fixes #217985

Non-poison `CTTZ_ELTS` pads widened operands with active lanes using
`INSERT_SUBVECTOR`. For irregular fixed-length vectors whose
widened type subsequently requires splitting, this can reach the
`SplitVecRes_INSERT_SUBVECTOR` stack-spill fallback.

That fallback calls `getVectorSubVecPointer`, which requires
byte-addressable elements.

Use `VECTOR_SHUFFLE` for this specific widening case. Original lanes are
selected from the normally widened source, while padding lanes are
selected from an all-ones vector. This avoids the irregular
`INSERT_SUBVECTOR` and prevents poison/undef widened padding from being
observed.

Other widening cases retain their existing behavior.

    [7 lines not shown]
DeltaFile
+67-0llvm/test/CodeGen/X86/intrinsic-cttz-elts.ll
+14-3llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+81-32 files

LLVM/project efa71d3llvm/lib/Target/SPIRV SPIRVInstructionSelector.cpp SPIRVLegalizeImplicitBinding.cpp, llvm/test/CodeGen/SPIRV/hlsl-resources ImplicitBinding.ll

[SPIRV] Fix inconsistent operand order for counter resource intrinsic

The `llvm.spv.resource.handlefrombinding` intrinsic stores its binding operands in the order (DescriptorSet, BindingNo, ...). The `llvm.spv.resource.counterhandlefrombinding` intrinsic should use the same order.

The `llvm.spv.resource.counterhandlefrombinding` intrinsic is currently emitted only by the `SPIRVLegalizeImplicitBinding` pass. The pass previously interpreted and rebuilt its operands in the wrong order, and the instruction selector repeated the same inversion when emitting decorations.

This change makes the operand order consistent with `llvm.spv.resource.handlefrombinding`.
DeltaFile
+30-3llvm/test/CodeGen/SPIRV/hlsl-resources/ImplicitBinding.ll
+7-5llvm/lib/Target/SPIRV/SPIRVLegalizeImplicitBinding.cpp
+2-2llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+39-103 files

LLVM/project fcbebccclang-tools-extra/docs/clang-tidy/checks/readability function-cognitive-complexity.md magic-numbers.md

Apply batched suggestions from code review

Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
DeltaFile
+3-3clang-tools-extra/docs/clang-tidy/checks/readability/magic-numbers.md
+2-2clang-tools-extra/docs/clang-tidy/checks/readability/function-cognitive-complexity.md
+5-52 files

LLVM/project 2362eebclang/lib/Sema SemaCUDA.cpp SemaTemplateInstantiateDecl.cpp, clang/test/SemaCUDA attr-instantiation-duplication-spirv.cu attr-instantiation-duplication-amdgpu.cu

[clang][Sema][CUDA,SPIRV] Instantiating function templates duplicates GPU attrs (#218582)

A number of GPU related attributes were incorrectly falling back to the
generic attribute instatiation logic which resulted in duplicating the
attributes. The duplicates were also not correctly instantiated.

This also exposed a failure to prevent duplicate addition in
handleGlobalAttr as well.
DeltaFile
+78-0clang/test/SemaCUDA/attr-instantiation-duplication-amdgpu.cu
+31-0clang/test/SemaCUDA/attr-instantiation-duplication-spirv.cu
+13-5clang/lib/Sema/SemaDeclAttr.cpp
+5-0clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+2-0clang/lib/Sema/SemaCUDA.cpp
+129-55 files

LLVM/project 71504ceclang-tools-extra/docs/clang-tidy/checks/readability redundant-lambda-parameter-list.md redundant-string-init.md

[clang-tidy][docs] Rewrite readability check docs to Markdown [4/5]
DeltaFile
+96-102clang-tools-extra/docs/clang-tidy/checks/readability/simplify-boolean-expr.md
+44-45clang-tools-extra/docs/clang-tidy/checks/readability/redundant-preprocessor.md
+37-39clang-tools-extra/docs/clang-tidy/checks/readability/redundant-member-init.md
+37-38clang-tools-extra/docs/clang-tidy/checks/readability/redundant-nested-if.md
+27-30clang-tools-extra/docs/clang-tidy/checks/readability/redundant-string-init.md
+24-24clang-tools-extra/docs/clang-tidy/checks/readability/redundant-lambda-parameter-list.md
+265-2784 files not shown
+338-35310 files

LLVM/project 2c2fad9clang-tools-extra/docs/clang-tidy/checks/readability redundant-nested-if.rst redundant-nested-if.md

[clang-tidy][docs] Rename readability check docs to Markdown [4/5]
DeltaFile
+0-125clang-tools-extra/docs/clang-tidy/checks/readability/simplify-boolean-expr.rst
+125-0clang-tools-extra/docs/clang-tidy/checks/readability/simplify-boolean-expr.md
+0-61clang-tools-extra/docs/clang-tidy/checks/readability/redundant-preprocessor.rst
+61-0clang-tools-extra/docs/clang-tidy/checks/readability/redundant-preprocessor.md
+0-59clang-tools-extra/docs/clang-tidy/checks/readability/redundant-nested-if.rst
+59-0clang-tools-extra/docs/clang-tidy/checks/readability/redundant-nested-if.md
+245-24514 files not shown
+507-50720 files

LLVM/project 1f74b1allvm/lib/Target/AMDGPU AMDGPUPassRegistry.def AMDGPUTargetMachine.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel combine-zext-trunc.mir combine-rot.mir

[AMDGPU][GIsel][NPM] Port "AMDGPUPreLegalizerCombiner" to NPM (#217222)

same as https://github.com/llvm/llvm-project/pull/215759
DeltaFile
+89-44llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
+9-2llvm/lib/Target/AMDGPU/AMDGPU.h
+3-3llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+2-1llvm/lib/Target/AMDGPU/AMDGPUPassRegistry.def
+1-0llvm/test/CodeGen/AMDGPU/GlobalISel/combine-zext-trunc.mir
+1-0llvm/test/CodeGen/AMDGPU/GlobalISel/combine-rot.mir
+105-504 files not shown
+109-5010 files

LLVM/project 60505c9flang/lib/Lower PFTBuilder.cpp

[flang] Enable wrap-unstructured-constructs-in-execute-region by default

More extensive testing since the flag was introduced, with the
regressions it uncovered now fixed.
DeltaFile
+1-1flang/lib/Lower/PFTBuilder.cpp
+1-11 files

LLVM/project 18a91e0llvm/lib/Target/RISCV RISCVProcessors.td, llvm/test/CodeGen/RISCV memcpy.ll

[RISCV] Andes: model fast unaligned accesses for the 45-series (#221166)

The 45-series cores support unaligned scalar accesses. Add
FeatureUnalignedScalarMem to each 45-series processor (andes-n45,
andes-nx45, andes-a45, andes-ax45 and andes-ax45mpv), so that it is
selected by -mcpu rather than -mtune. Other processors declare it this
way too. The feature is somewhat architectural: -mtune is only supposed
to affect performance, but reaching it through tune features lets -mtune
introduce unaligned accesses that crash on a CPU which does not support
them.

Cover this in memcpy.ll using -mcpu=andes-a45/-mcpu=andes-ax45. The new
RUN lines pass -mtune=rocket so that the 45-series scheduling model does
not reorder the output, letting them reuse the existing check lines.

Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
DeltaFile
+10-5llvm/lib/Target/RISCV/RISCVProcessors.td
+4-0llvm/test/CodeGen/RISCV/memcpy.ll
+14-52 files

LLVM/project 210e20allvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/lib/Transforms/Vectorize/SLPVectorizer SLPTypeUtils.h SLPTypeUtils.cpp

[SLP][modularisation][NFC] Move getNumberOfParts, isAllowedNonPowerOf2VF (#220827)

Move the following BoUpSLP-independent type/width helpers out of
SLPVectorizer.cpp into SLPVectorizer/SLPTypeUtils.{h,cpp}:

  getNumberOfParts
  isAllowedNonPowerOf2VF

Both read a file-local cl::opt (SLPReVec and VectorizeNonPowerOf2
respectively). The options stay static in SLPVectorizer.cpp; the moved
helpers take their values as explicit bool parameters. Behavior is
unchanged.

Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
DeltaFile
+31-57llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+25-0llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPTypeUtils.cpp
+15-0llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPTypeUtils.h
+71-573 files

LLVM/project 4edfeadllvm/lib/CodeGen InterleavedLoadCombinePass.cpp, llvm/test/CodeGen/AArch64 interleaved-load-combine-many-candidates.ll

[InterleavedLoadCombine] Index candidates to avoid quadratic matching (#213053)

Matching scanned every candidate against every other candidate, which
got very slow on functions with many interleaved loads. Index by address
offset and look up neighbors instead.

llc's Compile-time drops from 212s to ~2s on a Grace machine for the
test case in the issue.
[ Compile-time remains flat

](https://llvm-compile-time-tracker.com/?config=Overview&stat=instructions%3Au&remote=madhur13490)

Fixes #162299.

Assisted by Cursor.
DeltaFile
+130-97llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
+83-0llvm/test/CodeGen/AArch64/interleaved-load-combine-many-candidates.ll
+213-972 files

LLVM/project 98baf03libcxx/include/__optional comparison.h, libcxx/test/std/utilities/optional/optional.comp_with_t not_equal.pass.cpp less_than.pass.cpp

[libc++] Implement LWG4072: std::optional comparisons: constrain harder (#209968)

Resolves #118345.

Previously, the heterogeneous comparison operators (`==`, `!=`, `<`,
`<=`, `>`, `>=`) for arguments `T` and `U` don't check that `T` or `U`
are not a `std::optional` themselves. This allowed the operators to
cause ambiguous overload resolution instead of falling back to
`optional`'s own operators, which possibly caused hard error when there
should not be a matched overload.

This patch implements the resolution by adding
`!__is_std_optional_v<_Up>` (and the `_Tp` equivalent for the reversed)
to the constraints in all twelve involved operators.

As required by the LLVM Project's AI use policy:
- The fix and test processes were revised and verified with AI
assistance.
DeltaFile
+41-24libcxx/include/__optional/comparison.h
+23-0libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp
+23-0libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp
+23-0libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp
+23-0libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp
+23-0libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp
+156-242 files not shown
+180-258 files

LLVM/project 2fb1835lld/ELF SyntheticSections.cpp EhFrame.cpp, lld/test/ELF eh-frame-negative-pcrel-sdata4.s eh-frame-negative-pcrel-sdata2.s

Revert "[ELF] Omit zero-range FDEs from .eh_frame_hdr" (#221624)

Reverts llvm/llvm-project#220492

This causes the RISC-V buildbots to fail in the exception handling
tests, see https://lab.llvm.org/buildbot/#/builders/210/builds/12623 for
the gauntlet build logs

Apologies this revert is coming in so late, there is a proposed fix at
https://github.com/llvm/llvm-project/pull/221342 but it looks like it
might require additional rounds of review so reverting to get the
buildbots back to green for now

cc @MaskRay @Prabhuk
DeltaFile
+0-64lld/test/ELF/eh-frame-fde-encoding.s
+0-37lld/test/ELF/eh-frame-hdr-zero-range.s
+7-6lld/test/ELF/eh-frame-negative-pcrel-sdata2.s
+0-10lld/ELF/EhFrame.cpp
+0-4lld/ELF/SyntheticSections.cpp
+2-2lld/test/ELF/eh-frame-negative-pcrel-sdata4.s
+9-1231 files not shown
+9-1257 files

LLVM/project c6fd19fllvm/lib/Transforms/Vectorize VPlanPatternMatch.h

[VPlan] Make m_False and m_True matchers stateless. NFC (#221581)

is_zero_int and is_one avoid storage unlike is_specific_int, and allow
the match function to be an inlined isZero/isOne call instead of
APInt::isSameValue.

Improves compile time:
https://llvm-compile-time-tracker.com/compare.php?from=8f7d3ba08f14c3d54b8b407d1758dbd1da01bb38&to=c766163e82ec7a377efc7a26ef1e6db38e0dec1d&stat=instructions:u
DeltaFile
+4-8llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+4-81 files

LLVM/project f054924llvm/include/llvm/Support AMDGPUObjLinkingInfo.h, llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp

[AMDGPU] Add FUNC_WAVE32 for object linking info flag
DeltaFile
+35-19llvm/test/CodeGen/AMDGPU/lds-link-time-codegen.ll
+5-5llvm/test/MC/AMDGPU/amdgpu-info-roundtrip.s
+3-1llvm/include/llvm/Support/AMDGPUObjLinkingInfo.h
+4-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
+1-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
+1-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+49-252 files not shown
+51-258 files

LLVM/project 6a13183llvm/include/llvm/Support AMDGPUObjLinkingInfo.h, llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp

[AMDGPU] Add FUNC_WGP_MODE for object linking info flag
DeltaFile
+16-13llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-typeid.ll
+21-0llvm/test/CodeGen/AMDGPU/lds-link-time-codegen.ll
+5-5llvm/test/MC/AMDGPU/amdgpu-info-roundtrip.s
+3-1llvm/include/llvm/Support/AMDGPUObjLinkingInfo.h
+4-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
+2-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+51-193 files not shown
+54-199 files

LLVM/project ede6cddllvm/docs AMDGPUUsage.rst, llvm/lib/Target/AMDGPU AMDGPUSubtarget.cpp AMDGPUAsmPrinter.cpp

[AMDGPU] Introduce ABI occupancy for object linking

This PR introduces ABI occupancy as the contract used to compile functions under
object linking. The default is the occupancy needed for a 1024 workitem
workgroup. It can be overridden for a module by the `amdgpu_abi_waves_per_eu`
module flag, replaced for a function by `amdgpu-flat-work-group-size`, or
tightened by an accepted `amdgpu-waves-per-eu` hint.

The ABI occupancy replaces the workgroup-derived minimum that an
`amdgpu-waves-per-eu` hint is validated against, so the hint can only make the
contract stricter.

The backend emits the selected occupancy in `.amdgpu.info` and uses it to
enforce the object linking register budget.
DeltaFile
+58-22llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+40-32llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+62-0llvm/test/CodeGen/AMDGPU/object-linking-abi-occupancy-module-flag.ll
+54-0llvm/test/CodeGen/AMDGPU/object-linking-abi-occupancy-flat-work-group-size.ll
+49-2llvm/docs/AMDGPUUsage.rst
+49-0llvm/test/CodeGen/AMDGPU/object-linking-abi-occupancy-waves-per-eu.ll
+312-5610 files not shown
+420-6516 files

LLVM/project 91d3532clang/docs ReleaseNotes.md, clang/include/clang/Basic ABIVersions.def

[Clang][X86] Add Clang23Compat for __int128 bit-field ABI change (#220788)

Follow up of #216777.

Assisted-by: Claude Opus 4.8
DeltaFile
+35-0clang/test/CodeGen/X86/x86_64-unnamed-bitfield-abi-compat.c
+13-4clang/lib/CodeGen/Targets/X86.cpp
+7-6clang/docs/ReleaseNotes.md
+6-3llvm/lib/ABI/Targets/X86.cpp
+6-0clang/include/clang/Basic/ABIVersions.def
+2-1llvm/include/llvm/ABI/TargetInfo.h
+69-141 files not shown
+71-147 files

LLVM/project b1f20ddllvm/lib/TableGen StringToOffsetTable.cpp

[TableGen] Escape single quotes when emitting a string table as char literals (#221612)

Fix a latent bug in StringToOffsetTable, which led to breakage after
#218845

```
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/Options/Options.inc(135,18): error: expected expression
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/Options/Options.inc(135,24): warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
  135 |   'D', 'o', 'n', ''', 't', ' ', 'e', 'm', 'i', 't', ' ', 'e', 'r', 'r', 'o', 'r', 's', ' ', 'o', 'n', ' ', 'i', 'n', 'v', 'a', 'l', 'i', 'd', ' ', 'a', 'n', 'a', 'l', 'y', 'z', 'e', 'r', '-', 'c', 'o', 'n', 'f', 'i', 'g', ' ', 'i', 'n', 'p', 'u', 't', 's', '\0',
      |                        ^
```
DeltaFile
+4-1llvm/lib/TableGen/StringToOffsetTable.cpp
+4-11 files

LLVM/project 1dfbc1eclang/include/clang/Analysis/Analyses/LifetimeSafety LifetimeSafety.h, clang/lib/Analysis/LifetimeSafety Checker.cpp

Implement pay-for-what-you-use warnings in LifetimeSafetyChecker

We split IsLifetimeSafetyEnabled into individual check functions
in SemaLifetimeSafety.h:
- ShouldCheckSafety
- ShouldCheckNoescapeViolations
- ShouldCheckLifetimeboundViolations
- ShouldCheckMisplacedLifetimebound
- ShouldCheckInapplicableLifetimebound
- ShouldSuggestLifetimeAnnotations

These properties are stored in LifetimeSafetyOpts, which are then checked
inside the Checker to avoid invoking expensive reporting functions mapping
to diagnostics that are disabled.

TAG=agy
CONV=a79c61c3-92c6-404e-83e3-3e3088f77c0e
DeltaFile
+73-43clang/lib/Sema/SemaLifetimeSafety.h
+13-4clang/lib/Analysis/LifetimeSafety/Checker.cpp
+5-0clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeSafety.h
+91-473 files

LLVM/project 067b6d9orc-rt/test/unit CommonTestUtils.h CMakeLists.txt, orc-rt/test/unit/bedrock/sps SimpleRemoteCATest.cpp SimpleNativeMemoryMapSPSCITest.cpp

[orc-rt] Split unit tests into SupportTests and BedrockTests (#221562)

Replace CoreTests with one test binary per layer. SupportTests links the
Support object library and nothing else, so a new support-to-bedrock
dependency fails to link rather than going unnoticed.

Making that work required splitting CommonTestUtils.h: its
Bedrock-dependent helpers move to a new BedrockTestUtils.h, so that no
SupportTests translation unit includes a Bedrock header. That in turn
lets ProxyTest join SupportTests -- Proxy.h only forward-declares
Session, so the test can define its own instead of constructing a real
one.
DeltaFile
+40-0orc-rt/test/unit/BedrockTestUtils.h
+20-17orc-rt/test/unit/CMakeLists.txt
+4-20orc-rt/test/unit/CommonTestUtils.h
+9-5orc-rt/test/unit/support/ProxyTest.cpp
+1-0orc-rt/test/unit/bedrock/sps/SimpleRemoteCATest.cpp
+1-0orc-rt/test/unit/bedrock/sps/SimpleNativeMemoryMapSPSCITest.cpp
+75-426 files not shown
+81-4212 files