[lldb][minidump] Fix Memory64List DataSize over-counting on a failed read (#212861)
**Issue:**
save-core records each range's DataSize from the value
ReadMemoryInChunks returns. That value counts bytes read from the
inferior even when the callback dropped them: a chunk that errors
part-way returns Stop before AddData, so the partially-read bytes are
counted but never written.
Because the Memory64List locates every range by the cumulative DataSize
of the preceding ranges, an over-counted DataSize desyncs the shared
data blob: the descriptors claim more bytes than the file holds and
every later range reads back corrupted.
**Fix**
Record the bytes actually written (total_bytes_read) as the range's size
so the descriptor DataSize matches the data in the blob.
**Test**
[3 lines not shown]
[flang] Fix POSIX.1/XPG checks in intrinsics-library.cpp (#201072)
PR #201063 breaks the `flang` build on Solaris:
```
flang/lib/Evaluate/intrinsics-library.cpp:225:26: error: address of overloaded function 'acos' does not match required type '__float128 (__float128)'
flang/lib/Evaluate/intrinsics-library.cpp:225:26: error: address of overloaded function 'acos' does not match required type '_Complex __float128 (_Complex __float128)'
```
There are two problems here:
- The `__float128` support in `intrinsics-library.cpp` is guarded by the
POSIX.1 >= 2001/XPG >= 6 check, but only depends on `HAVE_QUADMATHLIB`.
- That check is done incorrectly: it tests for `_POSIX_C_SOURCE >=
200112L` or `_XOPEN_SOURCE >= 600`, which are no longer defined on
Solaris after the PR above. This check is due a misunderstanding of
those feature test macros: as detailed in [The Open Group Base
Specifications Issue 8, 2.2.1 POSIX.1
Symbols](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html),
[14 lines not shown]
[LoopUnroll] Fix freqs for unconditional latches: N>2, uniform (#182405)
This patch introduces the command-line option `-unroll-uniform-weights`.
When computing probabilities for the remaining N conditional latches in
the unrolled loop after converting some iterations' latches to
unconditional, LoopUnroll now supports the following three strategies:
- A. If N <= 2, use a simple formula to compute a single uniform
probability across those latches.
- B. Otherwise, if `-unroll-uniform-weights` is not specified, apply the
original loop's probability to all N latches and then, as needed, adjust
as few of them as possible.
- C. Otherwise, bisect the range [0,1] to find a single uniform
probability across all N latches. This patch implements this strategy.
An issue with C is that it could impact compiler performance, so this
patch makes it opt-in. Its appeal over B is that it treats all latches
the same given that we have no evidence showing that any latch should
have a higher or lower probability than any other. A has neither
[4 lines not shown]
[VPlan] Set correct VPIRFlags for FP selects when sinking stores. (#212973)
Selects of floats carry fast-math flags. Update getDefaultFlags to take
the result type and use it to handle selects. I am planning on extending
this to other similar opcodes, including PHIs.
Then update sinkPredicatedStores to pass through the correct default
flags.
This fixes a crash in cse when intersecting common metadata.
Fixes https://github.com/llvm/llvm-project/issues/212811.
PR: https://github.com/llvm/llvm-project/pull/212973
[tsan] Fix buildgo.sh on FreeBSD/NetBSD (#213047)
This patch fixes the remaining compile errors when running `ninja
check-all` on FreeBSD and NetBSD:
- `sanitizer_linux.cpp` doesn't compile on NetBSD, so this patch adds a
cast:
```
sanitizer_common/sanitizer_linux.cpp:2492:10: error: format specifies
type 'unsigned long long' but the argument has type '__greg_t' (aka
'unsigned long') [-Werror,-Wformat]
```
- `tsan_interface_atomic.cpp` doesn't compile on both FreeBSD and
NetBSD, so this patch disables the warning:
```
tsan_interface_atomic.cpp:353:12: error: unused function template
'NoTsanAtomic' [-Werror,-Wunused-template]
tsan_interface_atomic.cpp:358:12: error: unused function template
[22 lines not shown]
Merge tag 'pm-7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki:
"These fix issues related to cpufreq, in the ACPI CPPC library and the
generic CPPC cpufreq driver, in the powernow-k8 and amd-pstate
drivers, and in the schedutil governor:
- Allow fast frequency switching in the ACPI CPPC library only when
every supported control used by the driver callback has an address
space already accepted for fast access (Christian Loehle)
- Skip writes to unsupported performance controls in the ACPI CPPC
library (Christian Loehle)
- Update cppc_cpufreq_update_perf_limits() to read policy->min and
policy->max once and, if the lockless snapshot is inconsistent,
reduce the minimum to the observed maximum, along the lines of
cpufreq_driver_resolve_freq() (Christian Loehle)
[24 lines not shown]
devel/libudev-devd: Update to 0.7.0
The update adds evdev and DRM enumeration in jails via sysctl.
Also it makes the monitor fd non-blocking.
PR: 296887
clang: Use NVPTX TargetParser for OpenMP unified-addressing check (#212746)
processRequiresDirective enumerated every OffloadArch value in a switch
only to error on nvptx architectures older than sm_60. Replace it with
NVPTX::supportsUnifiedAddressing() applied to the parsed target CPU so
we don't need to keep adding cases here every time a new target is
added.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
NVPTX: Add target names in TargetParser (#212734)
Track the canonical sm name and other target information.
This will eventually be used to reduce the pain of maintaining
OffloadArch in clang; all of the disjoint targets share an
enum which makes target specific covered switches annoying.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
Fix classof implementation for QuantizedType (#213014)
This PR aims to fix the misleading implementation of `classof` which
accepted as a `QuantizedType` every type registered under the
`QuantDialect.`
The now updated implementation makes the checks more restrictive,
allowing only direct subtypes of `QuantizedType` to be recognized as a
`QuantizedType,` therefore preventing `QuantileType` and other types
that are registered under `QuantDialect` to be seen as a subtype of
`QuantizedType` and wrongfully use its methods which might lead to
potential crashes.
[SBVec] Refactor BottomUpVec pass for clarity and maintainability
- Corrected comments to clarify the direction of def-use and use-def chains.
- Changed the initialization of the SchedDirection variable to improve clarity.
- Updated documentation in vectorizeRec() to better describe the purpose of UserBndl.
- Removed outdated TODO comment regarding top-down vectorization scheduling.
[SBVec] Add top-down vectorization to the unified Sandbox Vectorizer
Extend the Sandbox Vectorizer's `bottom-up-vec` pass so a single
implementation can vectorize in either direction, and add the top-down
strategy that walks def-use chains forward from a seed.
Direction selection
--------------------
The pass direction is chosen from the Region's auxiliary pass argument:
"bottom-up" (or empty, the default) and "top-down" map onto a
SchedDirection, and any other value is rejected with a fatal usage error.
The vectorizer always runs in the same direction as the scheduler.
Top-down traversal
------------------
Bottom-up starts from a seed slice (e.g. stores to consecutive addresses)
and recurses into operands. Top-down instead starts from a seed of
consecutive loads and recurses into *users*:
[32 lines not shown]