[ADT] Allow SmallVector move construction without move assignment (#219934)
Move-construct inline elements directly instead of using move assignment.
This avoids requiring element types to be move-assignable, only move-constructible.
Such types at the moment forces us to fall back to std::vector, for no good reason other
than an implementation quirks which is fixed here.
Assisted-by: Codex
nfsclient: Fix problems with the NFS over RDMA glue
There were a couple of problems detected w.r.t. the
"glue" for the nfsclrdma.ko module.
- When the NFS server has a small reply for a read,
it can choose to not use the reduction chunk
(separate memory area for the read data). I did
not realize this was the case.
- There was a bug in rpc_copy_uio_pages() function
that caused intermittent crashes in memcpy().
This patch fixes the above cases. It uses M_PROTO6
to mark that an RPC reply has used a reduction chunk,
so that read can handle it correctly. Read also now
provides a reduction chunk for all read sizes, since
the worst case for the rest of the read RPC reply is
close to the 1024 byte limit. (NFSv4 uses strings
instead of uid/gid in the attributes and these name
strings can be rather large.)
[12 lines not shown]
ZTS: Do not run rm -rf / when $TESTPOOL is empty
Grok accidentally did this to itself in a cloud development environment.
Let us learn from its goof.
This also handles other cases where $TESTPOOL is set to something like
`./`, which would still lead to ` rm -rf /` in our scripts. In these
cases, rm implementations that implement --no-preserve-root such as GNU
coreutils 9.1 and later, will not save us.
Reported-by: Grok 4.5 Build Beta
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Chris Longros <chris.longros at gmail.com>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Richard Yao <richard at ryao.dev>
Closes #18933
pdopenpid(2): in cap mode, translate all errors from pdopenpid1() to ECAPMODE
to not leak information about unused pids or system processes' pids.
Reviewed by: markj
Fixes: 73c92a978cce ("pdopenpid(2): allow in capability mode with restrictions")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59252
tests/sys/kern/procdesc.c: mark grandchild var in pdopenpid_capmode() as volatile
The variable is written in the child process which shares the address
space with the parent. The data flow must not be optimized by a compiler.
Reviewed by: markj
Fixes: ddf62c83fc0a ("sys/tests/kern/pdopenpid: pdopenpid(2) is allowed in cap mode")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59282
bluetooth/ath3kfw: Whitelist "Dell Wireless 1802 Bluetooth 4.0 LE"
"Qualcomm Atheros Communications Dell Wireless 1802 Bluetooth 4.0 LE"
(0cf3:e006) is a wifi-bluetooth combo. The bluetooth chip is confirmed
to be AR3012 compatible. That's what the Linux ath3k driver loads as
well. It has been tested with the firmware files from the
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
repository as the comms/ath3k-firmware port appears to be discontinued.
Signed-off-by: Robin Haberkorn <rhaberkorn at fmsbw.de>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2280
[clang][bytecode][NFC] Use Func->getDecl() instead of getCallee() (#220230)
We already `assert(Func)` above and use `Func` directly in other places
in this function, so just get the `FunctionDecl` from that instead of
going through the virtual function.
[fir][AddAliasTags] allow usage of AddAliasTag pass after FirToMemref (#219493)
This is a first patch to improve mixed-dialect support in Flang. The
goal is to allow TBAA tags to be generated before codegen even
after FIRToMemRef or ExternalNameConversion has run.
Concretely:
- Treat non-FIR allocation operations as local allocations under the
"allocated data" TBAA subtree. They cannot alias Fortran dummy
arguments. If a conversion pass copied the Fortran variable uniq_name
onto the new allocation, use that name so the access is distinct from other
named allocations; otherwise use the unnamed "allocated data" tag.
- Always look for fir.internal_name when building the TBAA tree, not
only on llvm.func. This removes the assumption that
ExternalNameConversion has not run before AddAliasTags and
makes it possible to place the pass later in new pipelines.
Note that this patch is not enough to generate Fortran TBAA tags in LLVM
IR after FIRToMemRef. MemRef will also need to understand the tbaa
attribute and propagate it through its LLVM lowering.
[VPlan] Don't replicate extractvalues that would require extracting lanes from a struct (#219941)
In the added test cases, we have an extractvalue in a replicate region:
vector.ph:
WIDEN-INTRINSIC ir<%sincos> = call llvm.sincos(ir<0.000000e+00>)
...
pred.store.if:
EMIT vp<%3> = extractelement ir<%sincos>, ir<0>
CLONE ir<%cos> = extractvalue vp<%3>
CLONE store ir<%cos>, ir<%cos_dst>
However the operand
a) doesn't generate per lane
b) isn't defined in the same replicate region
[6 lines not shown]
[Flang][OpenMP] Fix crash on paths where no optional mangler is provided (#220043)
Currently we will ICE in certain test cases where we run the
DoConcurrentConversion or the privatization pass that invokes
getOrGenImplicitDefaultDeclareMapper with no provided mapper. As we will
still invoke the mapper function without checking it's actually
available. Fix this by verifying we have been provided one first before
usage, the fall back path of using the
getCanonicalDefaultDeclareMapperName results remains the same.
Switch to SmallVector with space on stack
SmallVector allows for much larger small sizes than SetVector, so use 256 to match InstructionWorklist.
We don't need to worry about duplicate worklist entries until we add users to the worklist.
[SLP]Vectorize unique scalars of splat gather nodes as separate subtrees
A splat gather (the same instruction in every lane) is emitted as an
expensive insertion sequence. When the unique scalars of several splat
gathers form a vectorizable bundle, build them as a separate subtree and
emit the splat gathers as broadcasts of the vectorized value.
Original Pull Request: https://github.com/llvm/llvm-project/pull/218250
Recommit after revert in b80664df122426d703fd8eb0ad7e8e9c2c19bbf3 with
fixed compiler crashes
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/220250
[Support][vfs] Remove can_write check when replacing file (#219540)
Remove the can_write check when the file is to be replaced. can_write checks the
permission bits of the file itself, but OnDiskOutputFile::keep() will delete and
replace the file for which the permission bits of the parent directory are the
relevant ones. Keep the check in append mode where the file is actually opened
for writing.
The check causes problems with ccache which removes write permission in
hard_link mode to protect its cache. The file can still be replaced.
AMDGPU: Warn if trying to codegen without a subarch
Warn if using the legacy amdgcn name, or amdgpu without a
specified subarch. This is to push all the non-clang frontends
to update to the new system, but this should turn into an error
in the next release.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>