[BOLT] Make mispreds optional for preagg B/T/R records (#202856)
Extend pre-aggregated format with an optional mispredictions field.
Update parsing and pre-aggregated profile writer.
Test Plan:
added PreAggregatedX86TestHelper.OptionalMispredField
updated pre-aggregated-records.s
[libc] Complete hardening of time functions and remove Y2038 limit (#203298)
Completed safety and hardening refactoring for time functions, and
removed Y2038 limitation:
* Hardening: Refactored update_from_seconds to return ErrorOr<int>
(instead of int64_t status, as it only returns status 0 or error)
and propagated it to entrypoints. Added LIBC_CRASH_ON_NULLPTR to public
boundaries and converted tests to death tests using SIGILL.
* Y2038: Removed the artificial int32_t max check from ctime and
ctime_r, allowing them to support timestamps beyond 2038 (up to Year
9999).
* Tests: Updated ctime/ctime_r tests to include Year 2039 test cases and
updated overflow test cases to Year 10000.
* Style: Fixed header blocks and added Doxygen comments in converter.h,
str_converter.h, and time_utils.h.
* Conventions: Fixed relative includes in converter.h and time_utils.h.
Assisted-by: Automated tooling, human reviewed.
[ids-check] Re-enable the workflow (#203325)
Following earlier changes, the workflow should now only affect modified
headers.
The effort to build LLVM as a shared library is tracked in #109483.
devel/rust-cbindgen: revert to 0.29.3
That 0.29.4 breaks gecko -esr builds.
Revert "devel/rust-cbindgen: update to 0.29.4" and bump PORTEPOCH
This reverts commit 033b0f421534bb7a1442a1155b857c4b9484d3ce.
Fix race during socket unsplicing.
Problem was that splicing holds the socket lock when it writes
so_sp, but unsplicing does not when it reads so_sp. So it may get
the new pointer, but PR_ZERO is not visible due to reordering. Then
so->so_sp->ssp_socket is garbage. Crash happend on octeon/mips64
during regress/sys/netinet/udpthread test run-unsplice.
When creating a splice from socket 1 to socket 2, kernel holds
socket buffer lock on so1->so_rcv and so2->so_snd and socket lock
on both while installing so_sp on so1 and so2. Concurrent sosplice()
on socket 2 has the opposite order, we hold sblock on so2->so_rcv,
sblock on so1->so_snd and solock on both sockets.
The unsplice thread of the source socket did hold sblock on so->so_rcv
only. So we did lockless so_sp check while concurrent sosplice()
thread installs so_sp on the same socket as drain, holding sblock
on so->so_snd.
Grabbing sblock on both so->so_srv and so->so_snd fixes the crash.
with and OK mvs@
[AMDGPU][SCEV] Tighten max backedge-taken count for shift recurrence loops. (#197292)
Application code on AMDGPUs often uses the following pattern:
for (int i = blockDim.x / 2; i >= 1; i >>= 1)
if (threadIdx.x < i) {
<STMT based on threadIdx.x>
}
__syncthreads();
}
but this is currently not unrolled by LLVM for two reasons:
1. We overestimate the loop count with the number of bits in the
iteration variable (32).
2. Runtime unrolling is not applicable because of convergent
instructions.
For the specific pattern above, we can compute a tighter bound by using
range information, which for blockDim.x is (0,1025) and already emitted
[4 lines not shown]
[arm64e][cfi] .cfi_negate_ra_state is irrelevant for Mach-O platforms (#203076)
The arm64e unwinder on Mach-O platforms always assumes saved LR's have
been signed with a pacibsp, and does not support mixed signed and
un-signed frames. Since the unwinder behaves the same whether the
directive is present, it is better to avoid emitting it in the first
place. This aligns with the behavior of AppleClang.
rdar://178084701