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

LLVM/project a459ef5libc/src/__support/builtins CMakeLists.txt

fix duplication
DeltaFile
+0-11libc/src/__support/builtins/CMakeLists.txt
+0-111 files

LLVM/project 47b6025llvm/lib/Target/AArch64 AArch64ConditionalCompares.cpp, llvm/test/CodeGen/AArch64 cmpbr-ccmp.ll cmpbr-ccmp.mir

[AArch64] Form CCMP for CBB and CBH

AArch64ConditionalCompares forms CMP/CCMP chains to transform patterns
such as

                 Head                        Head
                 / |                         CmpBB
                /  |                         / |
               |  CmpBB        =>           /  |
               |  / |                    Tail  |
               | /  |                      |   |
              Tail  |                      |   |
                |   |                      |   |
               ... ...                    ... ...

where Head is terminated by a conditional branch and CmpBB contains
a cmp + conditional branch.

We usually try to split any fused conditional branches to be able to

    [8 lines not shown]
DeltaFile
+406-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.mir
+232-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.ll
+38-2llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+676-23 files

LLVM/project 2987844llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 cmpbr-early-ifcvt.mir

[AArch64][CMPBR] Fix splitting of CBB/CBH instructions into ext + cmp

We falsely split CBB/CBH instructions by explicitly extending the
second register operand instead of the first one, leading to the
following, wrong codegen:

  cbh $wn, $wm, cc, trgt  =>  sxth $wt, $wm
                              cmp  $wn, $wt, cc, sxth

Correct is

  cbh $wn, $wm, cc, trgt  =>  sxth $wt, $wn
                              cmp  $wt, $wm, cc, sxth

since cmp with extended register extends it's second, not its first
operand.
DeltaFile
+26-22llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+16-16llvm/test/CodeGen/AArch64/cmpbr-early-ifcvt.mir
+42-382 files

LLVM/project adbd945llvm/lib/Target/AArch64 AArch64ConditionalCompares.cpp, llvm/test/CodeGen/AArch64 cmpbr-ccmp.ll cmpbr-ccmp.mir

[AArch64] Allow forming CCMPs for CB branches (#221111)

AArch64ConditionalCompares currently doesn't consider FEAT_CMPBR CB
instructions when trying to form CCMPs. This leads to a lot more
branches which is usually hurtful for performance.

The patchs adds handling CB instructions, just like we do for other
fused conditional branches such as CBZ or CBNZ.
DeltaFile
+794-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.mir
+519-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.ll
+81-36llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+1,394-363 files

LLVM/project be3c61allvm/lib/CodeGen MachineOutliner.cpp, llvm/test/CodeGen/AArch64 machine-outliner-macho-compact-unwind-frame.mir machine-outliner-debug-admission.mir

[MachineOutliner] Properly handle Debug MachineInstrs (#219326)

Fixes #219176.

Debug instructions could affect `MachineOutliner` output in two ways:

- The minimum basic-block size check used `MachineBasicBlock::size()`,
which includes debug instructions. A block containing one ordinary
instruction and one debug instruction could therefore enter the mapper
even though it was too small to outline.
- Mapping an invisible debug instruction cleared `AddedIllegalLastTime`.
This changed the separator state and could affect persistent token
numbering, outlined-function ordering, and ultimately the generated
object code.

This patch makes debug instructions transparent to both decisions:

- Use the non-debug instruction count for the minimum block-size check.
- Preserve the mapper's separator state for debug instructions while

    [16 lines not shown]
DeltaFile
+262-0llvm/test/CodeGen/RISCV/machine-outliner-debug-codegen.mir
+73-0llvm/test/CodeGen/AArch64/machine-outliner-range-debug.mir
+71-0llvm/test/CodeGen/AArch64/machine-outliner-debug-admission.mir
+26-0llvm/test/CodeGen/RISCV/machine-outliner-mapper-debug-state.mir
+14-4llvm/lib/CodeGen/MachineOutliner.cpp
+18-0llvm/test/CodeGen/AArch64/machine-outliner-macho-compact-unwind-frame.mir
+464-45 files not shown
+480-1311 files

LLVM/project fcc7a65libc/src/__support/FPUtil dyadic_float.h, libc/src/__support/builtins CMakeLists.txt truncxfbf2.h

[compiler-rt][builtins] libc-backed float80-bfloat16/float16 conversion builtins
DeltaFile
+78-17libc/src/__support/builtins/fpconvert_helper.h
+38-24libc/src/__support/FPUtil/dyadic_float.h
+41-0libc/src/__support/builtins/extendhfxf2.h
+40-0libc/src/__support/builtins/truncxfhf2.h
+39-0libc/src/__support/builtins/truncxfbf2.h
+35-0libc/src/__support/builtins/CMakeLists.txt
+271-4111 files not shown
+479-4117 files

LLVM/project d7659d4libc/src/__support/builtins fixunsxfti.h floattixf.h, libc/test/shared shared_builtins_test.cpp

[compiler-rt][builtins] libc-backed float80-int conversion builtins
DeltaFile
+99-0libc/src/__support/builtins/CMakeLists.txt
+45-0libc/test/shared/shared_builtins_test.cpp
+41-0libc/src/__support/builtins/fixunsxfti.h
+41-0libc/src/__support/builtins/floattixf.h
+41-0libc/src/__support/builtins/floatuntixf.h
+41-0libc/src/__support/builtins/fixxfti.h
+308-026 files not shown
+1,071-032 files

LLVM/project 5a95631libc/src/__support/builtins fixunstfdi.h fixunstfsi.h

[compiler-rt][builtins] libc-backed quad-to-int conversion builtins
DeltaFile
+76-0libc/src/__support/builtins/CMakeLists.txt
+41-0libc/src/__support/builtins/fixunstfti.h
+41-0libc/src/__support/builtins/fixtfti.h
+40-0libc/src/__support/builtins/fixunstfdi.h
+40-0libc/src/__support/builtins/fixunstfsi.h
+40-0libc/src/__support/builtins/fixtfsi.h
+278-017 files not shown
+729-023 files

LLVM/project 439f5d6libc/test/shared shared_builtins_test.cpp

[libc][builtins][test] missed int-floating conversion tests
DeltaFile
+66-0libc/test/shared/shared_builtins_test.cpp
+66-01 files

LLVM/project 53071a4libc/src/__support/builtins floatunsitf.h floatsitf.h

[compiler-rt][builtins] libc-backed int-to-quad conversion builtins
DeltaFile
+68-0libc/src/__support/builtins/CMakeLists.txt
+41-0libc/src/__support/builtins/floatuntitf.h
+41-0libc/src/__support/builtins/floattitf.h
+40-0libc/src/__support/builtins/floatunsitf.h
+40-0libc/src/__support/builtins/floatsitf.h
+40-0libc/src/__support/builtins/floatunditf.h
+270-017 files not shown
+721-123 files

LLVM/project 7e0b77dlibc/src/__support/builtins floatunsitf.h floatunditf.h

format
DeltaFile
+1-3libc/src/__support/builtins/floatunsitf.h
+1-3libc/src/__support/builtins/floatunditf.h
+1-3libc/src/__support/builtins/floattitf.h
+1-3libc/src/__support/builtins/floatsitf.h
+1-3libc/src/__support/builtins/floatditf.h
+5-155 files

LLVM/project 98dc9d3libc/test/shared shared_builtins_test.cpp

fix conflicts
DeltaFile
+2-5libc/test/shared/shared_builtins_test.cpp
+2-51 files

LLVM/project 2e0acb6compiler-rt/lib/builtins comparetf2.cpp

ifdef
DeltaFile
+3-2compiler-rt/lib/builtins/comparetf2.cpp
+3-21 files

LLVM/project 43d6d04compiler-rt/lib/builtins comparetf2.cpp, libc/shared/builtins unordtf2.h letf2.h

[compiler-rt][builtins] libc-backed quad-float comparison builtins
DeltaFile
+49-0compiler-rt/lib/builtins/comparetf2.cpp
+36-0libc/src/__support/builtins/getf2.h
+36-0libc/src/__support/builtins/unordtf2.h
+36-0libc/src/__support/builtins/letf2.h
+35-0libc/shared/builtins/unordtf2.h
+35-0libc/shared/builtins/letf2.h
+227-06 files not shown
+321-012 files

LLVM/project c5d883ecompiler-rt/lib/builtins comparedf2.cpp, libc/shared/builtins unorddf2.h ledf2.h

[compiler-rt][builtins] libc-backed double-float comparison builtins
DeltaFile
+54-0compiler-rt/lib/builtins/comparedf2.cpp
+30-0libc/src/__support/builtins/unorddf2.h
+30-0libc/src/__support/builtins/ledf2.h
+30-0libc/src/__support/builtins/gedf2.h
+29-0libc/shared/builtins/unorddf2.h
+29-0libc/shared/builtins/ledf2.h
+202-06 files not shown
+268-012 files

LLVM/project df997decompiler-rt/lib/builtins comparedf2.cpp

if defined -> ifdef
DeltaFile
+4-3compiler-rt/lib/builtins/comparedf2.cpp
+4-31 files

LLVM/project b2c7ec0libc/src/__support/builtins CMakeLists.txt

missed dep
DeltaFile
+1-0libc/src/__support/builtins/CMakeLists.txt
+1-01 files

LLVM/project 1e1f7b3libc/src/__support/builtins CMakeLists.txt

conflict
DeltaFile
+18-10libc/src/__support/builtins/CMakeLists.txt
+18-101 files

LLVM/project ea3b368libc/src/__support/builtins CMakeLists.txt

fix conflict
DeltaFile
+2-0libc/src/__support/builtins/CMakeLists.txt
+2-01 files

LLVM/project 890dbf1libc/src/__support/builtins CMakeLists.txt

conflict
DeltaFile
+10-0libc/src/__support/builtins/CMakeLists.txt
+10-01 files