[mlir][LLVMIR] Fix a crash when `llvm.mlir.constant` fails to create an LLVM constant. (#224951)
Fix the `llvm.mlir.constant` translation to handle a failed
`getLLVMConstant()` conversion. The current code can pass a null
`llvm::Value` to users of the constant, causing an assertion. Check the
result of `getLLVMConstant()` and return failure when the conversion
fails.
Fixes #224815
[docs] Fix PDB serialized hash table on-disk format description (#225889)
Fixes #76602
Updating HashTable.md to match how the PDB hash table format is
serialized according to the microsoft-pdb repository:
https://github.com/microsoft/microsoft-pdb/blob/805655a28bd8198004be2ac27e6e0290121a5e89/PDB/include/map.h#L584
The key/value list contains Size entries rather than Capacity entries,
and the present bit vector identifies which bucket each pair belongs to.
AMDGPU: Invalidate VCC live ranges when lowering kill instructions
lowerKillInstr replaces the kill pseudo with a v_cmp defining VCC plus
two instructions reading it, but left any previously computed VCC
regunit ranges alone. If something had already materialized them, the
new uses have no live segment:
*** Bad machine code: No live segment at use ***
- instruction: $exec = S_ANDN2_B64_term $exec, $vcc, implicit-def $scc
Drop the ranges so they are recomputed on demand, as is already done for
EXEC and SCC.
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
[Local] Preserve !callees when merging calls (#225307)
When `SimplifyCFG` hoists or sinks two calls, `combineMetadata` drops `!callees`
even if both calls have it. Take the union of the lists when the retained
call moves, since it must allow the targets of either call. If either call
has no `!callees`, drop it from the merged call. For CSE, keep the list on
the call that stays in place.
loader.efi: Use EfiLoaderData memory type for ram disks
For the images we read into the memory, use EfiLoaderData memory type
instead of EfiReservedMemoryType. The kernel handles the former properly
and won't reallocate it. While the latter isn't necessarily mapped,
which can cause ram disks to fault when loaded. memdisk_uefi.efi
used the latter type, but also registered the device as an ACPI
RAM disk, which we don't do.
Fixes: afee781523e45
Sponsored by: Netflix
[ORC] Re-rename eh-frame alloc actions. (#226038)
Use 'Section' as the suffix rather than 'Frame' to make clear that these
actions register whole sections at a time. This aligns eh-frame
registration action names with the MachO unwind info registration action
names.
An ORC runtime commit implementing these actions will land as a
follow-up commit.
RegisterCoalescer: Don't mark a remat def dead when the copy destination covers it
When rematerializing into a physical register that is not exactly the copy's
destination, reMaterializeDef marks the rematerialized def dead and adds an
implicit-def of the copy destination. That is only correct when the rematerialized
instruction defines more than the copy asked for, so the extra part really is unused.
It is wrong when the def is covered by the copy destination, since then it is
part of that live value:
undef %0.sub_32bit:gr64 = MOV32ri -11
$rax = COPY %0
; coalesces to
dead $eax = MOV32ri -11, implicit-def $rax
$eax is the live low half of $rax, so it must not be dead. Only set the dead
flag when the def has register units the copy destination does not cover.
This makes the dead flags consistent with what LiveVariables would produce
[3 lines not shown]
CodeGen: Suppress per-invoke EH labels via an MCAsmInfo object predicate (#225903)
This is to avoid depending on TargetOptions::ExceptionModel in the
X86ISelLowering constructor. This was used to legalize EH_LABEL to a
nop. Legality rules cannot depend on program state, and the exception model
should be read from the IR module flag. In this instance the exception model
isn't really the relevant property. The specific personality and the target
object's EH table format are. Introduce a new MCAsmInfo predicate which
is a known constant for the triple. Also just do this during the initial label
emission instead of leaving it to legalization. This cleans up some unused
labels for wasm. This is also a minor behavior change for unknown
personalities; the labels will now be conservatively emitted.
I don't know all that much about exceptions, there's a lot of AI reverse
engineering of intent here. Another bruteforce approach would be to just
relocate the current condition to the selector which has access to the
exception model, but the MCAsmInfo check will be reusable in other
contexts.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
Remove unneeded cl::Optional and cl::ZeroOrMore. NFC (#225628)
cl::Optional and cl::ZeroOrMore on a named argument have been no-op
since https://reviews.llvm.org/D120455 removed the "may only occur zero
or one times!" error.
LLM-aided
[cross-project-tests] Avoid requiring packaging for GDB/LLDB version checks (#225126)
Previously, `cross-project-tests/lit.cfg.py` imported `packaging.version` to
compare GDB and LLDB version numbers and unconditionally called
`lit_config.fatal()` when the third-party `packaging` Python package was not
installed in the test environment. Try `packaging.version.parse` first, fall
back to splitting dot-separated integer components when `packaging` is not
available, and raise `ValueError` on unparseable versions so each caller can
emit a context-specific warning instead of aborting the test suite.
This commit was created with the help of AI tools
Pull-Request: https://github.com/llvm/llvm-project/pull/225126
[docs] Update Qualification WG working processes (#224904)
Document the working-process decisions agreed during the [September LLVM
Qualification WG
sync-up](https://discourse.llvm.org/t/llvm-qualification-wg-sync-ups-meeting-minutes/87148/36):
- Clarify the intended use of each communication channel.
- Establish GitHub pull requests as the authoritative place for artifact
reviews and their outcomes.
- Document the review requirements for trivial and non-trivial changes.
- Clarify the use of GitHub issues for tracked actions and backlog
items.
This also converts the group-members list from a MyST `list-table`
directive to a standard Markdown table.
[MC] Flush pending errors when layout stops early due to relaxOnce error (#226028)
When relaxOnce returns nonzero after an error has been reported,
layout() returns without flushing the errors recorded by the last
relaxation pass, and Finish() fails `assert(PendingErrors.empty())`.
Fixes #225036