[CIR] Honor -fno-clangir (#214904)
`-fno-clangir` was a no-op whenever `-fclangir` also appeared on the
command line, in either order: the CIR pipeline ran regardless.
Options.td already declares clangir as a BoolFOption with a NegFlag, so
last-wins semantics were intended and the generated marshalling
implements them correctly.
[lld][WebAssembly] Follow relocations of TLS-base accessors during GC (#206831)
With `--gc-sections` (the default), `wasm-ld` garbage-collects functions
that are only reachable through `__wasm_get_tls_base` /
`__wasm_set_tls_base` in the cooperative-threading (libcall
thread-context) configuration. This produces a linked module that is
invalid or behaves incorrectly: the relocation inside
`__wasm_set_tls_base` is left dangling / mis-resolved, so callers trap
at runtime (e.g. `validation error: ... values remaining on stack at end
of block`, or a call to an unrelated function).
In cooperative-threading mode (`--cooperative-threading`, added in
#200855), per-task thread context is accessed through libcalls rather
than wasm globals. `wasm-ld` synthesizes `__wasm_init_tls` /
`__wasm_init_memory`, which invoke `__wasm_get_tls_base` and
`__wasm_set_tls_base` via **raw `call` instructions that carry no
relocations**. To keep those accessors in the output, the linker marks
them live with `Symbol::markLive()`.
[77 lines not shown]
Protect the IPsec TDB replay counter with mutex.
Put all tdb_rpl read, write and increment under tdb_mtx. Although
shared net lock and kernel lock should be enough for now, we want
to move towards fine grained locking. Mark tdb_rpl and tdb_seen
as MP safe.
The wrap-around check in ah_output() is not atomic with the increment
code and would not work. As tdb_rpl is 64 bit nowadays, it cannot
warp. Better remove the useless tdb_rpl == 0 check than making it
MP safe.
OK deraadt@
[lldb] Remove ConstString from ThreadPlanStepInRange (#215684)
ThreadPlanStepInRange optionally took a "target function name" to
determine if the thread plan could explain a given stop. The name was
being stored into a ConstString which does not need to happen because
(a) the function is sometimes user-supplied, meaning it may or may not
exist, and (b) it may be a substring of a given function name (i.e. not
otherwise in the string pool already).
[Clang] Rework GPU wrapper headers for the `-llvm` environment (#214331)
Summary;
This environment is intended to be the hermetic LLVM interface so we can
compile GPU things in a standalone environment. For this to work, we
resolve the standard include directory and refine the API split. Future
work will add missing functions, but this should let us compile HIP
device code on godbolt without needing a full ROCm interface.
appstream: updated to 1.1.6
1.1.6
Features:
* validator: Ensure description markup has no invalid attributes set
* validator: Validate bundle/pkgname values for allowed characters
Bugfixes:
* xml: Sanitize description markup when reading and writing it
* yaml/json: Ensure description markup is sanitized when loading/saving it
* meson: Work around wrong library linkage when linking Qt tests
* Allow sealing of component-IDs to safely use them in hash tables and indices
* Ensure we never emit or read an invalid data origin
* Prevent crash when comparing bad version strings that have an epoch after rev
* Fix potential out-of-bounds read in OARS mapping table
* apt: yaml: Harden against potential corrupted YAML / YAML-headers
* compose: Guess a filename even from invalid URLs instead of crashing
* compose: Confine directory unit data reads to the unit's root directory
[3 lines not shown]
SPDX: fix incorrect license tags
These already had SPDX tags and so were misidentifed as CDDL-1.0 in
eb9098ed47. Return them to what they were supposed to be.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18914
spdxcheck: detect multiple tags within a file
Since a single tag can express multiple options, enforce that only a
single tag be present.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18914
license: fix CDDL license headers identified by spdxcheck
All missed in 4b05f927dc by virtue of being "close enough".
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18914
spdxcheck: check CDDL-1.0 tags for correct license boilerplate
Now that we have a preferred, canonical form, we can enforce it.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18914
indi: updated to 2.2.4.2
2.2.4.2
iEQ: mark Home operation complete when mount reaches home
WandererRotator: Add configurable move accuracy and fix false "not po…
Add pier side to PMC8 driver
iEQ: clarify firmware labels, show N/A for absent hand controller
[SandboxVectorizer] Dispatch LoadStoreVec::runOnRegion on seed kind
Rebuilt on top of the direction-agnostic packOperands() redesign and
the fresh-Scheduler-per-sub-run fix (previously this same feature
existed on the now-superseded vectorize-loads branch, stacked on the
classifyStoreOperands-gated version of partition-store-bundles).
runOnRegion() previously assumed its seed slice was always a store
chain, unconditionally casting Bndl[0] to StoreInst. This crashed
(assertion in areConsecutive<StoreInst>) whenever -sbvec-collect-seeds
included "loads", since a load-seeded region's Aux holds LoadInsts.
Add createVectorLoad(), a standalone builder used only by the new
vectorizeLoads() (packOperands() replaced its old role of also being
vectorizeStores()'s all-loads fast path -- that path no longer exists,
per the direction-agnostic redesign).
Add a symmetric top-level path for load-kind seed slices:
- vectorizeLoads() builds the vector load via createVectorLoad(), then
[39 lines not shown]
[SandboxVectorizer] Vectorize partial store sub-bundles in LoadStoreVec
Rebuilt on top of the direction-agnostic packOperands() redesign
(previously this same feature existed on the now-superseded
partition-store-bundles branch, gated by classifyStoreOperands).
runOnRegion() previously required the entire seed chain to vectorize as
one unit. A seed slice can legitimately fail that as a whole while a
sub-run within it is still fine, e.g. because it spans an address gap
(SeedBundle::getSlice sorts by address but doesn't guarantee
contiguity) or a sub-range fails to schedule. Add
findLegalStoreRun()/isLegalStoreRun() to search for the longest
vectorizable run starting at a given position, and have runOnRegion()
call vectorizeStores() once per such run instead of once for the whole
chain. isLegalStoreRun() is purely an address/scheduling check now --
no operand-eligibility check is needed since packOperands() accepts any
operand kind.
The search only ever shrinks a candidate length, never grows one:
[35 lines not shown]
[SandboxVectorizer] Hoist getInsertPointAfterInstrs into VecUtils
Move BottomUpVec.cpp's file-local getInsertPointAfterInstrs() into
VecUtils, next to the getLowest()/getLastPHIOrSelf() primitives it's
built from. It has no BottomUpVec-specific state; the next commit adds a
second caller in LoadStoreVec.
Not hoisting BottomUpVec::createPack() itself here: it asserts a single
common scalar type (VecUtils::getCommonScalarType), which doesn't fit
LoadStoreVec's mixed-type ("enable-diff-types") requirement. That needs
its own extended packer, kept local to LoadStoreVec.cpp rather than
force-fitting the shared version.
No functional change: check-llvm Transforms/SandboxVectorizer passes
(28/28).
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
[SandboxVectorizer] Make LoadStoreVec::vectorizeStores direction-agnostic
Remove classifyStoreOperands()/isFoldableLoadOperand(): vectorizeStores()
no longer gates on whether a store chain's value operands are all loads,
all constants, or neither. Instead it always builds the vector value via
a new packOperands(), which packs any mix of loads, constants, or
arbitrary SSA values via extractelement/insertelement -- direction-
agnostic in the sense that it doesn't care what kind of operand it's
given, unlike the load-specific and constant-specific paths it replaces.
packOperands() combines operands at the granularity of their narrowest
common scalar element type (the same rule getCombinedVectorTypeFor()
uses), splitting a wider operand into multiple lanes via a bitcast. A
plain bitcast can't convert between pointer and non-pointer types, and
inttoptr requires an integer source, so reinterpretSameWidth() picks
bitcast, ptrtoint, or inttoptr as needed, routing a non-integer,
non-pointer operand (e.g. double) through an intermediate same-width
integer when the target granularity is a pointer.
[38 lines not shown]
[lldb][RISCV] Construct CSR information dynamically (#203234)
Custom RISC-V extensions may define control and status registers (CSRs)
with overlapping addresses. Therefore, when performing postmortem debug
of 32-bit RISC-V core dump images, dynamically construct CSR information
based on the set of enabled extensions.
Assisted-by: OpenAI GPT-5
[HLSL] Move `lerp` implementation to header files (#215692)
Closes #213097.
This PR replaces the previous implementation of `lerp` with a new one
inside the header files. It also cleans up the tests to use 3 distinct
parameters (x, y, s) for consistency with other similar tests.
The SPIRV intrinsic (`int_spv_lerp`) and its lowering are intentionally
kept, since a follow-up will pattern match `X + S * (Y - X)` back to the
extended instruction and needs the SPIRV intrinsic to do so.
Assisted-by: Claude Opus 4.8
[SandboxVectorizer] Extract LoadStoreVec::vectorizeStores from runOnRegion
Move runOnRegion()'s body -- the store-chain legality checks, operand
classification, vector value construction, and profitability decision
-- into a new vectorizeStores(Bndl, Rgn, Sched, A) method. runOnRegion()
now only builds the initial bundle from the region's Aux and calls
vectorizeStores() once. Also extract the cost-check tail into
acceptIfProfitable(), a small helper worth having on its own. NFC.
[HLSL] Move `radians` implementation to header files (#215379)
Closes #213095.
This PR replaces the previous implementation of `radians` with a new one
inside the header files.
The SPIRV intrinsic (`int_spv_radians`) and its lowering are
intentionally kept, since a follow-up will pattern-match `Val *
(pi/180)` back to the extended instruction and needs the SPIRV intrinsic
to do so.
Assisted-by: Claude Opus 4.8
DAG: Gracefully diagnose missing lrint/lround float-operand libcalls (#215064)
I believe this is my 9000th commit, merged during the solar eclipse
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[AMDGPU][GlobalISel] Fix wide multiply with known-zero parts
Materialize a zero accumulator when all partial products for a destination part are skipped, avoiding an invalid null register during legalization.
Change-Id: I05294cf68ddd4363ccb20df7159981280e7c9c4e