[DAG] Add command line option and TLI hook to enable DAG topological sorting (#188636)
The very first step towards #83422 - which will move DAG combines to be
processed in topological order.
There is a lot of churn on existing tests that need to be addressed
before this can be switched on globally, this patch gives the ability to
enable it both on a per-target basis, and via a command line option to
assist with testing and triage.
At the moment I'm focusing on addressing the x86 regressions (example in
the patch's basic test coverage) as that's the target I'm most familiar
with and will help with many other targets as well, but there might be
other/simpler targets that would benefit from earlier handling.
[DA] Add nsw check for addrecs in the Weak Zero SIV tests (#185579)
Check that the addrec has `nsw` in the Weak Zero SIV tests, as their
algorithm rely on the addrecs don't wrap.
Fix the test cases added in #185578 .
[lldb][test] Don't treat 'xcrun clang' as a path for finding clang++ (#188235)
[lldb][test] Don't treat 'xcrun clang' as a path for finding clang++
TestPrintObjectArray.py uses `xcrun clang` as the test compiler.
This is because the test source requires some Objective-C features
that are only available in downstream clang:
```
self.build(dictionary=[...], compiler="xcrun clang")
```
However, this currently just results in us running `clang++`
instead of `xcrun clang++` to compile test sources. If the downstream
`clang++` in PATH is not Apple's downstream version, this then causes
the tests to fail with compilation errors:
```
clang++: error: unknown argument: '-fno-constant-nsnumber-literals'
clang++: error: unknown argument: '-fno-constant-nsarray-literals'
[6 lines not shown]
[UniformityAnalysis] Replace DivergentValues with UniformValues for conservative divergence queries (#180509)
This patch replaces DivergentValues with UniformValues as the single
source of truth for tracking divergence in UniformityInfo.
Old model: DivergentValues starts empty; values are added as divergence
is propagated. isDivergent(V) returns DivergentValues.count(V).
New model: UniformValues starts fully populated (all
instructions/arguments for IR, all register defs for MIR) during
initialize(). Values are removed as divergence is propagated.
isDivergent(V) returns !UniformValues.contains(V), so any value not
present in the set (e.g., a newly created instruction that was not
present during analysis) is conservatively treated as divergent. This
avoids silent miscompilations when transformation passes introduce new
values and query their uniformity.
---------
Co-authored-by: padivedi <padivedi at amd.com>
fix swap encryption data corruption issue
when paging out, uvm_swap_io encrypts the page contents in-place
and then issues write requests to swapdev. if the write fails
for some reason, the pageout will be cancelled. but it leaves
the data in the pages encrypted. ie. data corruption. note that
this doesn't necessarily involve broken swap devices. as we are
in the pagedaemon context, some kind of transient errors are
rather normal. for example, ffs VOP_BMAP has special cases for
the pagedaemon to return ENOMEM.
this commit fixes the issue by simply reverting the encryption
on error.
PR/60082https://gnats.netbsd.org/60082
simplify swap encryption a bit
* disallow changes of vm.swap_encrypt sysctl when any swap
is configured. note: this doesn't affect the ability to
set it in /etc/sysctl.conf because /etc/rc.d/sysctl is
executed before /etc/rc.d/swap1.
* retire per-page encryption tracking. (swd_encmap)
from now on, the whole swap is encrypted or not.
PR/60084https://gnats.netbsd.org/60084
[mlir][XeGPU] Validate single-block requirement in MoveFuncBodyToWarpOp (#188471)
Add validation to ensure GPU function body has a single block before
applying the MoveFuncBodyToWarpOp transformation in XeGPU subgroup
distribution. This check prevents incorrect handling of multi-block GPU
functions. Fixes #185366.
[OFFLOAD] Introduce libdevice function declarations for future use for math OpenMP wrappers (#182215)
The purpose of this PR is to introduce libdevice functions declarations
for SPIRV for future use for math wrappers in order to reduce the PR
size