[DenseMap] Store occupancy in a packed used-bit array (#201281)
Track bucket occupancy in a packed 1-bit-per-bucket "used" array (uint32
words)
instead of an `Empty` sentinel key. The buckets and the used array share
one
allocation. The probing scheme is unchanged.
(uint64_t words lead to slightly larger clang binary.)
Because occupancy is a packed bit instead of an in-band sentinel,
probing and
iteration test a dense bit rather than loading each bucket key. This
helps
find-miss and iteration (the empty terminus and the empty buckets become
a bit
test, not a bucket load; for large keys it also skips the structural
compare
against the empty key) and large-bucket insert. It costs find-hit (the
matched
[19 lines not shown]
CI: Add alternative URLs for CentOS stream
Fallback to trying the "CentOS Strean Composes" repo for the qcow2
images if the regular URLs fail. The Composes repo contains the daily
autobuilt Stream images.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #18628
CI: Increase default RCU stall timeout on Linux
When CONFIG_RCU_CPU_STALL_TIMEOUT is configured an RCU stall which
exceeds the default timeout will trigger an NMI and panic the VM.
Given the heavily virtualized nature of the CI environment we want
to make sure to only trigger this due to a real deadlock and not
due to over-subscription of the systems resources. This timeout
normally defaults to 20-30 seconds and this change increases it
to 120 seconds.
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18624
CI: Update CodeQL actions to v4
CodeQL Action v3 has been deprecated and will be retired
December 2026. Update codeql.yml to use CodeQL Action v4
and update the runner to ubuntu-24.04.
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18629
[lld][WebAssembly] Simplify many-functions.ll test (#201711)
Remove superfluous checks (function bodies, data section, symbol table,
and segment info) from the test.
The primary purpose of this test is to verify that relocations within
the CODE section are handled correctly when linking objects with many
functions (requiring multi-byte LEB128 for function count).
Checking the entire symbol table, segment info, data section, and all
129 function bodies is superfluous and adds unnecessary noise (over 1000
lines of expectations) to the test. These features are covered by other,
more targeted tests. Reducing these checks makes the test much easier to
read and maintain.
Reland HIP offload PGO runtime support as a separate opt-in library (#201606)
This mostly relands the compiler-rt part of #177665 (approved and
merged, then reverted in #201416). The first commit restores it as
merged.
It was reverted because of a Windows problem: the ROCm runtime needs the
sanitizer interception library, which is built /MD on Windows, so
putting it in clang_rt.profile forced that library to /MD and broke
users linking it with the static CRT (/MT).
The second commit fixes this by building the ROCm support as a separate,
opt-in library clang_rt.profile_rocm, a /MD superset of
clang_rt.profile. The base library is left unchanged (/MT, no ROCm). The
driver links clang_rt.profile_rocm first, so it resolves all profile
symbols and the base library stays inert.
clang_rt.profile_rocm is off by default. The compiler-side change and
driver wiring are in a separate PR.
CI: Re-enable CodeQL workflows on push
This workflow was disabled 'on push' recently in commit 1916c2c5
to reduce redundant CI runs. However, this check is fairly quick
and we want it run regularly against the branches. Enable it.
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18627
Remove /etc/sudoers.d/zfs
The smartctl exception in /etc/sudoers.d/zfs doesn't cover devices
like NVMe or symlinked devices. Just get rid of it rather than
keep maintaining it.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #18626
[CIR] Implement Direct+canFlatten in CallConvLowering
CallConvLowering previously ignored the canFlatten flag on Direct
classifications: a Direct arg with a multi-field struct coerced type was
passed as a single struct argument rather than N scalar register arguments.
This is the register-passing pattern the x86-64 SysV ABI uses for structs
like struct { long a, b; }.
A new helper getFlattenedCoercedType centralizes the detection (Direct,
multi-field struct coercedType, canFlatten set). The three lowering sites
are updated: buildNewArgTypes pushes one wire type per field; insertArgCoercion
reassembles the coerced struct from N scalar block args then coerces to the
original type if the two differ; rewriteCallSite extracts each field via
cir.extract_member. The existing coerce-record-to-record-via-memory.cir
test gains can_flatten = false to opt into the single-arg path.
[CIR] Lower byval/byref args in CallConvLowering
ArgKind::Indirect arguments were hitting an errorNYI in
CIRABIRewriteContext. Add the lowering: in the callee the block argument
type changes to !cir.ptr<T>, a load is inserted at entry so the body sees
the original value type, and llvm.byval or llvm.byref is attached based on
ownership. At call sites, both byval and byref are lowered by allocating a
stack slot, copying the value in, and passing the pointer.
For byval, llvm.noalias and llvm.noundef are also added — llvm.noalias
because the call-site rewrite always produces a fresh alloca+store
(equivalent to -fpass-by-value-is-noalias), and llvm.noundef because the
copy is always fully defined. byref carries only llvm.byref and llvm.align
since it does not assert exclusive ownership.
[CIR] Lower sret returns in CallConvLowering
Functions that return an aggregate by value classify their return as
ArgKind::Indirect, but CallConvLowering reached an errorNYI for that
case, so the whole CallConv pass refused to lower any struct-returning
function.
rewriteFunctionDefinition now recognizes an Indirect return: the wire
return type becomes void, a hidden sret pointer is prepended as block
argument 0, and every cir.return is routed through that pointer. Rather
than storing the loaded return value through the sret pointer (a
byte-copy that breaks non-trivially-copyable types -- libstdc++'s SSO
std::string keeps a _M_p pointer into its own _M_local_buf, so a
byte-copy leaves the destination aliasing the source's dying stack
storage), insertSRetStores rewires the __retval alloca to the sret
pointer so construction flows directly into the caller's slot, matching
classic CodeGen's "construct into %agg.result" pattern. CIRGen emits one
cir.load __retval / cir.return pair per return statement, all reading the
single __retval alloca, so the alloca is rewired once and every return is
[18 lines not shown]
[CIR] Implement ArgKind::Expand in CallConvLowering
ArgKind::Expand classifies a struct argument for flattening: each field
becomes a separate scalar argument at the ABI level. Classic CodeGen
calls this "struct expansion" — used on targets like MIPS and some ARM
calling conventions.
CIRABIRewriteContext previously emitted errorNYI at both classification
sites. The replacement covers three call paths. In buildNewArgTypes,
the original struct type is replaced by one wire type per field. In
insertArgCoercion, the single struct block argument is replaced by N
scalar block arguments and an alloca+get_member+store+load sequence at
the entry block reassembles them for body uses; a running block-argument
index (rather than classIdx + sretOffset) correctly tracks the expanded
slot count when multiple Expand args or sret+Expand combinations appear.
The Ignore-drop loop gains a classToBlockArg pre-computation so that
Ignore args following Expand args are erased at the correct index. In
rewriteCallSite, cir.extract_member decomposes the struct operand into
its constituent fields, which become separate call arguments.
[3 lines not shown]
math/octave-forge-dsppack: New port.
GUI tool for designing and analysing IIR/FIR digital filters:
magnitude, phase and pole-zero responses, stability analysis, audio
demo, and code export.
[Webkit Checkers][SaferCpp] Detect base-to-derived downcasts laundered through void* in MemoryUnsafeCastChecker (#200294)
Adds a matcher for static_cast<Derived*>(static_cast<void*>(base)),
which previously evaded detection because the outer cast's immediate
source expression is void*, not Base*.
rdar://173770143
---------
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
[WebAssembly] Fix crash combining complex numbers and multivalue (#200514)
This fixes a crash in Clang when the `experimental-mv` ABI is used on
WebAssembly targets in conjunction with complex numbers as arguments.
There's no strict definition for what the multivalue ABI is at this
time, so the main goal is to just not crash for now.
Closes #70402
Closes #153567
limits: Fix pipebuf resource type
* pipebuf is a size but is listed as a count
PR: 295623
MFC after: 1 week
Fixes: f54f41403d14 ("usr.bin/limits: support RLIMIT_PIPEBUF")
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D57456