[RISCV] Correct some constants in orc-b-patterns.ll. NFC (#222229)
Based on the test function names being similar to other function, I
assume these were supposed to generate orc.b.
Also remove unnecessary nuw, nsw, and exact flags.
libclc: Update fmod implementations
This was originally ported from rocm device libs in
93af966747b59d37c57312a0c0242151076c072b. Merge in more
recent changes.
Co-Authored-By: Claude <noreply at anthropic.com>
[VPlan][Predicator] Preserve some uniform control flow
Implements "Partial Control-Flow Linearization" by Simon Moll and
Sebastian Hack.
That should allow implementation of an alternative to
https://github.com/llvm/llvm-project/pull/141900 based on this
functionality (see BOSCC in the paper).
[VPlan] Use compact RPOT instead of just RPOT
This is necessary for the future partial linearization change, but I
wanted to commit this bit independently because it changes some tests on
itself and could potentially provide more blend optimization
opportunites (at least I hoped) but that didn't seem to happen.
[VPlan] Make blend operands non-reorderable to optimize their masks in predicator
Sort the incoming edges according to RPOT order so that we could use
simpler source block mask instead of the edge mask.
Log full git output to its own log file
## Problem
`utils/git.py` shortened git's stderr to 50 characters before putting it into the `CallError`, and `textwrap.shorten` collapses newlines before it truncates. `git clone` always opens stderr with `Cloning into '/mnt/.ix-apps/truenas_catalog'...`, which is 47 characters by itself, so every clone failure produced the byte-identical message and the `fatal:` line saying what actually went wrong was discarded every time. Bad credentials, DNS, TLS, a proxy and a missing branch were indistinguishable in the UI, in the logs and in a debug bundle, and git's stderr was preserved nowhere else.
## Solution
- **A dedicated `git` log file.** The tail of git's output goes to `/var/log/git.log` rather than back into `middlewared.log`, which is what the original shortening was trying to keep clean. The syslog-ng filter and destination generate themselves from `ALL_LOG_FILES`, so `logger.py` is the only place that needed touching, plus a line in the existing logrotate stanza.
- **The raised message names the cause.** The last `fatal:` line is preferred, then the last `error:` line, then whatever git printed last. Position alone is not reliable because `reset --hard` on a bad ref prints usage boilerplate after the `fatal:` line. The message stays a single line because it is stored as the job error and rendered into the catalog sync alert, and it points at the log file for the rest.
- **Stopped discarding two other git errors.** A failed checkout or pull was caught, silently dropped and turned into a re-clone, so a repository that stopped being usable left no record of why. The clone error was also re-raised behind a second copy of the prefix `clone_repository` had already produced, which pushed the real error further right in every alert and dropped the inner errno.
[CIR][CMake] Configure MLIR as a dependency-only project
Enable MLIR implicitly for ClangIR without attaching its unrelated tools
and test suite to the aggregate build. An explicit MLIR selection retains
its normal behavior. Add MLIR after all Clang consumers enable Clang, so
CIR also works when Clang is enabled for LLDB.
Package the required MLIR libraries through Clang's existing exports and
LLVM's distribution policy. Register dependency library and header install
components and honor toolchain-only installations. When Clang is itself
an implicit Flang dependency, let Flang package the required targets.
Keep MLIR test support available for CIR and retain the standalone ClangIR
restriction. Leave MLIR disabled when CIR is disabled.
Validated implicit and explicit MLIR, CIR disabled, toolchain-only, binary
distribution, and combined Flang/CIR configurations. Combined SDK and named
distributions configure successfully, as does an external CMake consumer
loading the Clang and Flang build-tree packages.
[2 lines not shown]
[InstCombine] Fold comparisons of urem with dividend (#214933)
This folds equality comparisons of `X urem Y` with `X`
- `(X urem Y) == X` to `X ult Y`
- `(X urem Y) != X` to `X uge Y`
For a defined `urem`, let `Q = X udiv Y` and `R = X urem Y`. Unsigned
division gives `X = Q * Y + R`, so:
```
R == X
<=> Q * Y == 0
<=> Q == 0 (since Y != 0)
<=> X < Y
```
Division by zero is undefined behavior, so no separate handling for `Y
== 0` is required.
[7 lines not shown]
[CallGraph] Remove dead removeAllCalledFunctions and stealCalledFunctionsFrom (NFC) (#222252)
CallGraphNode::removeAllCalledFunctions: Added on November 26, 2001 in
commit e409c460bf87ef9211d42e1b6ede0df750aeb64a (originally as
removeAllCalledMethods) without any callers.
CallGraphNode::stealCalledFunctionsFrom: The last caller was removed on
June 24, 2022 in commit 217e85761cd1978931e29546e15716614e3b2fcc.
Assisted-by: Antigravity
[CMake] Limit implicit Flang dependency projects
Keep implicitly enabled MLIR and Clang out of aggregate build and install
rules. Preserve normal Clang behavior for LLDB and explicitly requested
clang-tools-extra. Do not cache dependency-only test defaults, so a later
explicit project selection restores normal defaults.
Collect the dependency libraries needed by the Flang SDK and add them to
Flang's existing exports using LLVM's distribution policy. Register library
and header installation components, honor toolchain-only installations,
and retain runtime tools, shared libraries, and compiler resource headers.
Use native target dependencies to build the selected libraries and their
prerequisites without duplicating dependency edges or target exclusions.
Keep MLIR test support available for Flang without registering MLIR's tests.
Forward requested project roots to cross and bootstrap configurations.
Validated implicit, explicit, toolchain-only, binary and SDK distribution,
Clang-tools-extra, and shared LLDB configurations. A compiled CMake fixture
[4 lines not shown]
NAS-143369 / 27.0.0-BETA.1 / Stop nginx closing idle VM SPICE console channels
The VM display proxy is the last websocket location in this file still on
nginx's 60s proxy_read_timeout default. NAS-140066 (5a9a2a522a) fixed the same
class of bug for /api and /websocket and noted /websocket/shell already had
its own; the VM display proxy was not in that audit.
A SPICE session opens one websocket per channel. Measured on 25.10.5 with a
live console and the WebSocket constructor instrumented: the server pings main
and display about every 15s, but inputs and cursor only every 300s, so nginx
closes those two at 61s with code 1006 while the display channel stays up. The
console keeps painting and silently ignores the keyboard and mouse. The same
console straight to websockify keeps all four channels.
3600 covers the measured 300s worst case twelve times over and matches what
NAS-140066 chose for the other two locations.
(cherry picked from commit 364f77c76e6e25d85219f0fa331fc40972974893)
NAS-143369 / 27.0.0-BETA.1 / Stop nginx closing idle VM SPICE console channels (#19646)
[NAS-143369](https://ixsystems.atlassian.net/browse/NAS-143369)
A VM SPICE console that nobody touches for a minute stops responding to
the keyboard and mouse. The picture keeps updating, so the console looks
alive.
The VM display proxy is the last websocket location in `nginx.conf.mako`
still on nginx's 60s `proxy_read_timeout` default.
[NAS-140066](https://github.com/truenas/middleware/pull/18412)
(5a9a2a522a) fixed exactly this for `/api` and `/websocket`, and its
description notes `/websocket/shell` already had its own — the VM
display proxy was not in that audit.
### Why it presents as "input is dead" rather than "console
disconnected"
A SPICE session opens one websocket per channel (`spice-html5` builds
[60 lines not shown]
[MLIR] Remove and narrow unnecessary header dependencies (NFC) (#222364)
This is prerequisite work on reducing the amount of CMake dependencies
on (TableGen) generated header.
Forward-declare IteratorType in TilingInterface.h instead of including
all structured-operation utilities. Include those utilities directly in
SCF and Tensor implementations that use their enum values and helpers,
and remove TilingInterface's dependency on the DialectUtils library.
Replace DialectUtils's Arith library prerequisite with its operation
generator, and SPIR-V's GPU library prerequisite with its
compilation-interface generator. Drop VCIX's obsolete GPU
compilation-interface prerequisite.
Assisted-by: Codex