Revert "[SPIR-V] Legalize folded byte-offset GEPs for workgroup memory" (#243292)
Reverts #227104.
This reverts commit 4fbd32ce4c4c7527a814c313a092b8296ad53dc0. It
restores the previous SPIR-V pointer lowering and removes the tests
added by that PR.
Co-authored-by: Copilot <223556219+Copilot at users.noreply.github.com>
Copilot-Session: fbc02c65-a079-4b71-95ce-5a259640d701
[mlir][Bufferization] Propagate function result writability (#241196)
This fixes https://github.com/llvm/llvm-project/issues/240194. Func.call
results were assumed writable even when the callee returned read-only
storage, allowing writes to constant globals after bufferization. Track
tensor result writability across all return sites and aliases, and
consult this information in the func.call interface. Conservatively
treat unknown results as potentially read-only so existing conflict
resolution inserts copies before writes.
Assisted-by: OpenAI Codex
[RISCV][GISel] Enable extended LLT
Pass -gisel-extended-llt to the GlobalISel TableGen backend and call
LLT::setUseExtended(true) in RISCVTargetMachine.
Update the GlobalISel tests: convert hand-written instruction-select
and knownbits MIR inputs from sN to iN/fN, and regenerate CHECK lines.
Some soft-float assembly output changes slightly (constants are
rematerialized instead of kept live across libcalls).
Co-Authored-By: Claude Sonnet 5.5 <noreply at anthropic.com>
[RISCV][GISel] Prepare for extended LLT
Make the RISC-V GlobalISel code correct when LLTs carry integer/float
kinds, ahead of enabling extended LLT:
- Legalize scalar G_BITCAST: legal up to XLen bits, narrowed above that
(i128/f128, or f64/i64 on RV32). Map it in RegisterBankInfo by type
kind and subtarget (FPR only if the FP extension holds that size in an
FPR), and select it as a COPY.
- Use f16/f32/f64/f128 in the FP legalizer rule sets so that types
created by mutations (e.g. f16 -> f32 widening) match the imported
TableGen patterns. Lower bf16 G_FCONSTANT via an integer constant.
- Add iXLen for building new instructions, keeping the any-scalar sXLen
for legality rules. Build mask vectors with i1 elements and use
integer types for other newly created values.
- Call lowering: bitcast f16/f32 values to integer before any-extending
them into wider locations, and bitcast back after truncating.
- RegisterBankInfo: an f64 on a Zilsd target without D lives in a GPR
pair, not an FPR.
[2 lines not shown]
[libc++] Mark LWG4480 as complete and test (#242789)
Resolves #189845
`<stdatomic.h>` already provides `ATOMIC_CHAR8_T_LOCK_FREE` via
`<atomic>`. This PR adds it to the synopsis along with a corresponding
test.
---------
Co-authored-by: A. Jiang <de34 at live.cn>
Update math/minizinc to version 2.10.1, add math/gecode support.
Version 2.10.1
(released 31 August 2026)
Packaging changes:
* The naming scheme for GitHub release assets has changed to use the
build target triple.
* Windows ARM64 packages are now available.
* Separate ARM and Intel macOS packages are provided instead of a
single universal binary.
* Packages containing the MiniZinc command line tools and solvers are
now available without the IDE.
* Docker images are now released on the GitHub Container
Registry, including -dist variants which contain only the MiniZinc
installation and are designed to copied into other images.
[236 lines not shown]
[MemProf] Assign contexts trimmed within a call's inlined stack ids to its node (#240193)
When updating the stack nodes for callsites while building the graph, a
call with inlined frames is assigned the contexts that include all of
its stack ids that have context nodes. Profile matching trims a
context's stack once its allocation type is unambiguous, so a context
can be trimmed at an earlier stack id in that sequence. When a later
stack id has a node because of contexts for a different allocation,
such a context was only assigned to calls ending at the earlier id
that was last in the trimmed context (e.g. an out-of-line copy of
the inlined callee), and the call with the inlined frames kept calling
the original callee even though all of its profiled contexts were cold.
Give each such call duplicates of the trimmed contexts' ids, created up
front from the unmodified graph so the main stack node update loop can
also hand them to the other calls those contexts flow through, except
calls ending at a node of the creating call's own sequence, which would
compete with it for the duplicates. Measured a small (0.5%) peak RSS
increase on a large internal target due to the additional duplicates,
[12 lines not shown]
Revert "[RISCV][GlobalISel] Combine byte-spreading operations to orc.b" (#243271)
Reverts llvm/llvm-project#240276
Test is failing when built without assertions.
Fixes #243242.
[CodeGen][NFC] Factor MachineBlockPlacement::alignBlocks into reusable helper (#241995)
Post-layout passes such as BasicBlockSections reorder and clone blocks
after MachineBlockPlacement (changing fallthrough predecessors) and
operate on Propeller block/edge counts rather than MBFIWrapper. Extract
the block alignment logic from MachineBlockPlacement::alignBlocks() into
llvm::alignMachineBlocks() with a lightweight BlockAlignmentProfile
interface so BasicBlockSections can recompute block alignments from
Propeller profiles without re-implementing the core alignment logic.
Assisted by: Gemini-4 Carbon
bhyve: Reject unsupported checkpoints before saving RAM
pci_snapshot() rejects devices without a pe_snapshot callback, but
vm_checkpoint() reaches that check only after truncating checkpoint
files, pausing the VM, and saving RAM and kernel state.
Check for unsupported PCI devices at the start of vm_checkpoint(),
before creating files or pausing the VM. This preserves existing
checkpoint files when the request cannot succeed. Add
pci_can_snapshot() so that the new check and pci_snapshot() use the
same test.
Reviewed by: markj, kevans
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D61003
SimplifyLibCalls: preserve allocation attributes in optimizeNew
When `LibCallSimplifier::optimizeNew` rewrites an `operator new` call into a
`__hot_cold_t` allocation call, forward the allocation attributes
(`allockind`, `allocsize`, `"alloc-family"`, and parameter `allocalign`) from
the original call onto the synthesized call instruction alongside its metadata.
This is a new patch since 2023 (unlike most of the rest of the stack)
and allows the next patch to remove more specialized C++ knowledge
from the LLVM layer, instead leaving it in clang where it seems more
sensible.
This patch was authored with the assistance of an LLM and was reviewed
by me before posting.
CGExprCXX: emit family and allockind attributes
This allows us to remove the special knowledge about C++ allocation from
LLVM's MemoryBuiltins.cpp, instead trusting attributes to communicate
the important properties.
Annoyingly, clang has to grow a little bit of hard-coded knowledge about
mangled symbol names in order to actually get the most-basic-matching
::operator::new when working out the alloc-family attribute. I spent
some time trying to do this "right" by looking up the available
operators new and finding the best one, but that's super tricky and this
has the virtue of working and being pretty obviously correct when
compared to the old code.
Happily, clang now emits allocator family attributes for custom
allocators like the `__hot_cold_t` overloads in `new_hot_cold.cpp`
(which `isReplaceableGlobalAllocationFunction` in clang recognizes),
allowing us to remove that special knowledge from LLVM.
[7 lines not shown]
clang: emit allocalign to LLVM for alloc_align attributes (#239730)
LLVM is growing knowledge of this, so we should inform it when we have
the information available. As a bonus, since we now check return
alignments in the callee as of an earlier patch of mine, we can now drop
the redundant llvm.assume() that this previously emitted.
This patch is originally from 2023 and was rebased and revised with
assistance from an LLM. I have manually reviewed the diffs to the limit
of my abilities (I don't do much in LLVM, and this is my first time
touching clang in a meaningful way) and they appear sensible. The commit
messages are entirely written by me.
Differential Revision: https://reviews.llvm.org/D119271
[clang] Pass VFS to the ExpansionContext in expandResponseFiles (#243244)
expandResponseFiles() created the llvm::cl::ExpansionContext without a
file system and only set the provided VFS afterwards. The constructor
falls back to vfs::getRealFileSystem() when no file system is given, so
the real file system was always obtained even when the caller provided
a VFS. With the IO sandbox enabled, this is a sandbox violation, e.g.
when the dependency scanner builds a compilation for a by-name query.
Pass the VFS to the constructor instead.