[RISCV] Disable rounding of aggregate return/arguments to iXLen. (#184736)
If the type is rounded to iXLen, an additional zext instruction is
generated. For example, https://godbolt.org/z/bG7vG4dvM
[TargetLowering][RISCV] Using index type for step vector in expandVectorFindLastActive (#187984)
This patch change the type of the step vector lowered from
`expandVectorFindLastActive` from `e8` to the index type of the target
machine.
This can help the index out of bound issue when the VLEN is large.
Note that after this patch, there are still some issue in
expandVectorFindLastActive.
Prevent range tree corruption race by updating dnode_sync()
Switch to incremental range tree processing in dnode_sync() to avoid
unsafe lock dropping during zfs_range_tree_walk(). This also ensures
the free ranges remain visible to dnode_block_freed() throughout the
sync process, preventing potential stale data reads.
This patch:
- Keeps the range tree attached during processing for visibility.
- Processes segments one-by-one by restarting from the tree head.
- Uses zfs_range_tree_clear() to safely handle ranges that may have
been modified while the lock was dropped.
- adds ASSERT()s to document that we don't expect dn_free_ranges
modification outside of sync context.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alek Pinchuk <apinchuk at axcient.com>
Issue #18186
Closes #18235
[clang][dataflow] Fix bugprone-unchecked-optional-access for recent changes to libcxx (#188044)
Fix for https://github.com/llvm/llvm-project/issues/187788
- When checking the receiver with an UncheckedDerivedToBase cast, just
check each component of the chain if we've hit the public optional
class, rather than rely on public vs private/protected inheritance. This
covers the case when the class derives from optional.
- or check if the SubExpr of the cast is already the public optional
type (when not deriving from optional -- since you won't see this first
layer in the cast chain).
See comment about why there is public inheritance to a private base
class at the moment:
https://github.com/llvm/llvm-project/issues/187788#issuecomment-4106543794
The performance doesn't seem much different in several benchmarks.
Perhaps because we first see if the method name matches, which filters a
[7 lines not shown]
Fix on archs without OCaml native support
While here:
1. drop the chunk trying to set OCAML_NATIVE in the build environment,
likely taken from devel/ocaml-ocamlbuild but ineffective here.
2. respect MAKE_ENV
[clang-tidy] Fix false positive in cert-ctr56-cpp (PointerArithmeticOnPolymorphicObjectCheck) (#187452)
## Summary
This change adds `unless(isInstantiationDependent())` to the
`ArraySubscript` matcher.
## Motivation
In template code, some array subscript expressions are not fully
resolved yet.
Because of this, the matcher may treat them incorrectly and produce
false positives.
## Change
This patch skips instantiation-dependent expressions in templates.
It helps the matcher work only on resolved expressions.
Closes https://github.com/llvm/llvm-project/issues/187009.
[Object] Normalize BBAddrMap decode address types in ELF (#187962)
This is part of patches to port BBAddrMap to COFF.
DataExtractor::getAddress reads 4 or 8 bytes according to AddressSize and
returns a uint64_t container value. This code path already sets AddressSize
from ELFT::Is64Bits and stores range/function addresses as uint64_t.
Replace temporary uintX_t/unsigned values in this decoder path with uint64_t
and remove the redundant cast from getAddress(). This preserves behavior for
ELF32/ELF64 inputs.
This is a preparatory step for extracting a format-agnostic BBAddrMap decoder.