[SLP]Fix loop-aware cost for gathers crossing sibling-loop boundaries
Scale such gathers by the common parent nest, not by the sibling's
trip count.
Fixes #209325
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/224700
[clang][CodeGen] Emit offsets to __cxa_pure/deleted_virtual under relative vtables (#224148)
Previously, pure and deleted virtual functions were emitted as null (0)
in relative vtables as a temporary workaround for PR43094 (#42439).
Before dso_local_equivalent, taking relative offsets to external runtime
functions required generating local symbols, which caused LLD COMDAT
group merging conflicts for classes defined across multiple TUs.
With dso_local_equivalent, we can now emit direct relative offsets to
__cxa_pure_virtual and __cxa_deleted_virtual without generating local
aliases or encountering COMDAT signature clashes.
[DAG] Canonicalize a non-opaque constant to the RHS of MUL over an opaque one (#224685)
Fix a case noticed in #224494 where we fail to canonicalize a non-opaque
constant to the RHS when both operands are constant, but one of them is
opaque. ("opaque" means created by ConstantHoisting)
We probably have many other instances of this issue, and I do not plan
to pursue this area further.
Assisted-by: Claude Fable 5.1
virtual_oss(8): Fix cuse.ko check
virtual_oss(8) checks if cuse(3) is loaded. However, kldload(2) ends up calling
kern_kldload that checks permissions first. It is only later on in
linker_load_module that -EEXIST is returned if the module is already loaded.
That means that users that can't load modules, always get a -EPERM error first
even if cuse.ko is already loaded and ready to use.
Change it to check if the kernel module is already loaded and try load it if it
isn't.
In addition move the program's arguments parsing early on because otherwise, a
user can't even access the program's help if cuse.ko is not loaded and the
user doesn't have permissions to do it.
Approved by: obiwac@
Differential Revision: https://reviews.freebsd.org/D59621
[NFC][RelLookupTableConverter] Get IndexWidth directly from GEP type (#224454)
`Load->getPointerOperand()` is always the `GEP` prior to it, so just
reuse the GEP rather than querying the Load again.
[AMDGPU] Add getLDSAllocGranule to TargetParser
Model LDS allocation granularity with subtarget features derived from
AMDGPUGenericAnyFeature. Generic targets can select a granularity present
on any covered GPU, independently of their addressable LDS size.
Expose the byte-valued query for GPUKind and subarch and consolidate
backend users on it. gfx9-4-generic uses gfx950's 1280-byte granule while
retaining its 64 KiB addressable LDS capacity.
Test feature membership, granularity assignments, query overloads and
fallbacks, and generic-target LDS block rounding.
Change-Id: Ic0c9345e7657ec3c6978a646628598cb7608b390
llvm-c: Compute the DataLayout from the triple and ABI (#224588)
Drop a use of createDataLayout
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[Flang][OpenMP] Support nested derived types in DO CONCURRENT device conversion (#218963)
Fixes #218760.
When converting `DO CONCURRENT` loops to OpenMP device targets, Flang
previously aborted whenever a live-in derived type contained a nested
derived-type component.
Nested derived types containing only non-allocatable components do not
require special handling: mapping the containing record covers the
storage of its nested components. When a nested component contains an
allocatable member, however, an implicit mapper is required to properly
map the dynamically allocated storage.
This patch removes the unconditional nested-record NYI and updates the
implicit mapper check to recurse through the Fortran element type of
derived-type components. In particular, this handles array-valued nested
derived-type components, which are lowered as `fir::SequenceType`.
[14 lines not shown]
NAS-143945 / 27.0.0-BETA.1 / Turn off ZVOL threading for NVMe-oF namespaces (#19812)
Mirrors the existing iSCSI behavior: disable multi-threading on a zvol
while it's exposed as an NVMe-oF namespace, and restore it afterward.
Add `test__zvol_namespace_volthreading`
(cherry picked from commit 5b68734d26d7a5b948b76a63fd2fbacd867da230)
[Option] Shrink Info from 60 to 40 bytes (#224374)
Drop ID, which is the entry's 1-based position, and narrow
PrefixesOffset and SubCommandIDsOffset to 16 bits like GroupID and
AliasID.
Move help text variants to a side table. The .td HelpTextForVariants
class allows one variant per option and only 5 clang options use it,
yet every entry carries a 12-byte std::array of visibility lists. Store
(visibility mask, text offset) pairs in a separate table, indexed by a
16-bit field in the entry's padding.
clang's table shrinks from 232 KB to 155 KB and Options.inc from 1.70 MB
to 1.29 MB. --help output is unchanged.
Aided by Opus 5
[NFC][LowerTypeTests] Expand tests for CFI jump table hotness ordering (#223848)
Expand pre-commit test coverage to establish the baseline CFI jump table
layout before implementing hotness-based reordering in
https://github.com/llvm/llvm-project/pull/221046.
We expand these tests to verify we accurately track hotness data
originating from `cfi.functions` metadata, BlockFrequencyInfo (BFI)
counts, and IR function attributes (hot/cold). By covering these inputs,
we ensure the correct hotness tier is propagated for layout decisions
across different profile sources and LTO targets.
These tests verify the baseline declaration-order layout where functions
within each strict type are placed without hotness consideration, making
the subsequent reordering diff explicit and easy to review.
PR Stack:
* https://github.com/llvm/llvm-project/pull/220776
* https://github.com/llvm/llvm-project/pull/221043
[6 lines not shown]
NAS-143945 / 27.0.0-BETA.1 / Turn off ZVOL threading for NVMe-oF namespaces (#19812)
Mirrors the existing iSCSI behavior: disable multi-threading on a zvol
while it's exposed as an NVMe-oF namespace, and restore it afterward.
Add `test__zvol_namespace_volthreading`
[MergeFunctions] keep the symbol of a function an alias points at on COFF (#222024)
On COFF an alias is a weak external, which must name the symbol it
resolves to. When that target is local there is no such name, so
`WinCOFFWriter::assignSectionNumbers` invents a
`.weak.<alias>.default.<sym>` fallback named after unrelated contents of
the object. Two objects defining the same alias then disagree and the
link fails with `LNK1227` (hit building the Swift toolchain on Windows).
MergeFunctions reaches that state when the function an alias points at
is replaced by, or aliased to, an internal one. On COFF, decline both:
keep a thunk so the alias goes on naming an external definition. The
merge still happens, and non-COFF is untouched.
[AMDGPU] Add getLDSAllocGranule to TargetParser
Model LDS allocation granularity with subtarget features derived from
AMDGPUGenericAnyFeature. Generic targets can select a granularity present
on any covered GPU, independently of their addressable LDS size.
Expose the byte-valued query for GPUKind and subarch and consolidate
backend users on it. gfx9-4-generic uses gfx950's 1280-byte granule while
retaining its 64 KiB addressable LDS capacity.
Test feature membership, granularity assignments, query overloads and
fallbacks, and generic-target LDS block rounding.
Change-Id: Ic0c9345e7657ec3c6978a646628598cb7608b390