[InstCombine] Optimize fcmp ord/uno logical select operations using freeze (#205076)
This pull request optimizes logical select sequences checking ordered or
unordered floating point operations.
Currently, InstCombine canonicalizes:
fcmp ord x, 0.0 AND fcmp ord y, 0.0 to fcmp ord x, y
fcmp uno x, 0.0 OR fcmp uno y, 0.0 to fcmp uno x, y
However, this canonicalization is blocked for logical selects because it
is not poison safe if the second operand evaluates to poison when the
first evaluates to NaN.
This patch enables the transformation for logical selects by inserting a
freeze on the second evaluated operand to guarantee poison safety.
Fixes #49175
[RISCV][NFC] Remove direct access to FeatureKV (#206233)
This is preparatory work for changing the representation of
FeatureKV/SubTypeKV, in which they will no longer be that easily
accessible as global variables. Therefore, get them from the subtarget
instead.
snd_dummy: advance pointers for both channels
Previously only the play pointer advanced each tick; the record channel
refilled the whole buffer with silence and left the DMA pointer at 0.
Advance the record pointer by one block per tick and fill that block
with silence, so the DMA pointer changes and mmap kqueue consumers can
track progress.
MFC after: 1 week
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D57834
[LangRef] Clarifying the copying behaviour of byval (#205576)
The hidden copy of a byval argument can only be treated as a continuous
memcpy with the allocation size. It is incorrect to interpret it as a
load-store forwarding in the specified type, since a padding between
struct fields may still be a part of an active member of a union type.
[LifetimeSafety] Reapply liveness propagation and fix loop liveness leakage
(#205740)
Reapplies the liveness propagation fix (originally #205323, reverted in
#205687) and fixes a false positive involving conditional operators in
loops.
### Key Changes
* **Reapply**: Corrects liveness propagation through origin flows and
adds support for GNU statement expressions (`({ ... })`).
* **Loop Liveness Fix**: Resolves a false positive where temporary
origins leaked liveness across loop backedges via the conditional
operator's merge block. We now path-isolate these flows by generating
the `OriginFlowFact`s in their respective predecessor blocks (branches)
instead of the merge block.
Details about the old liveness leak. Consider this example
```cpp
for (int i = 0; i < 2; i++) {
[41 lines not shown]
[ProfileData] Introduce SampleProfileFuncOffsetTable (NFC) (#205045)
This patch introduces SampleProfileFuncOffsetTable, a unified wrapper
representing the function offset table.
Currently, the offset table is always a DenseMap. To support the
upcoming on-disk hash table (v104) for faster sample profile loading,
this patch abstracts the offset table representation. The new class
can delegate lookups to either the in-memory DenseMap or the on-disk
OnDiskIterableChainedHashTable.
This patch updates the reader to use the new wrapper's lookup and
insert interfaces. Since the on-disk path is not yet active, this
change is a non-functional change (NFC).
RFC:
https://discourse.llvm.org/t/rfc-faster-sample-profile-loading/90957/4
libtest: Simplify test selection.
Instead of requiring the user to specify selectors for test
cases and test functions separately, match test selectors
against the 'canonical names' for the tests in the executable.
Canonical test names use the form "TESTCASENAME:FUNCTIONNAME".
This change simplifies both the user-interface for test
selection and the code for implementing it in the driver
framework.
[Analysis] Improve readability of `KnownBits::pext` and `KnownBits::pdep` (#205176)
- Change the parameter names to `Val` and `Mask` to emphasize their semantics.
- Use `clearBits` instead of bitwise AND for increased expressiveness.
- Rewrite explanatory comments.