[Option] Declare library command line options in TableGen (#226087)
Implement the first step of
https://discourse.llvm.org/t/rfc-declare-library-command-line-options-in-tablegen-one-struct-per-library/91877:
the TableGen backend, the cl:: dispatch, and LLVMCGData's 13 cl::opts as
the first migrated library.
A .td with an `OptionsStruct` def declares a library's options with
`BoolField` (`-x`, `-x=<bool>`) and `ValueField` (`-x=v`,
`-x v`). `-gen-opt-parser-defs` generates a struct with one member per
option, a `Global` instance, the option table, and `apply(const Arg &)`.
A member is named after its option (`-codegen-data-generate` sets
`codegen_data_generate`) unless the defm names it.
`cl::ParseCommandLineOptions` keeps owning argv: a static
`opt::RegisterLibraryOptions<T>` registers the struct as a
`cl::LibraryOptions`, and an argument naming none of cl::'s options is
dispatched to the library that declares it. `-help-hidden` lists library
options (`let Hidden = 0 in` also lists them in `-help`),
[7 lines not shown]
[InstCombine] Fold select of pow into select of the differing operand
When both arms of a select are calls to `llvm.pow` with one use that
differ in exactly one operand, sink the select into that operand:
$$
\mathrm{select}(c,\ x^{y},\ x^{z}) \rightarrow x^{\mathrm{select}(c,\ y,\ z)}
$$
$$
\mathrm{select}(c,\ x^{z},\ y^{z}) \rightarrow \mathrm{select}(c,\ x,\ y)^{z}
$$
This removes one `pow` call. FMF are intersected and debug locations
are merged. The transform is skipped when a differing operand is a
constant, since that may enable a cheaper lowering (e.g.
$x^2 \rightarrow x \cdot x$).
[InstCombine] Add tests for select of pow with one differing operand
Add tests for select between two `llvm.pow` calls whose operands differ in
exactly one position, covering scalar and vector types, FMF, !prof
metadata, constant operands, and negative cases (multiple differing
operands, extra uses, mismatched intrinsics).
handle max-pk-ok path identically when the incoming user is invalid;
avoids max-pk-ok feature presenting a username validity oracle
analysis and patch from Chris Rohlf in collaboration with Claude and
Anthropic Research
[flang-rt] Consider NaN and the signedness of zero for PRODUCT (#226918)
Currently, the result of PRODUCT can be calculated in three places:
1. Constant folding in Semantics
2. The runtime library
3. Inlined code
However, only the runtime ignores NaN and the signedness of zero. This patch
fixes this discrepancy.
Fixes #211437
---------
Co-authored-by: Eugene Epshteyn <eepshteyn at nvidia.com>
Build and release the tray icon instead of toggling its visibility
Hiding a Gtk.StatusIcon and showing it again re-embeds it in the panel.
That leaves the notification area with a stale embedded window and makes
GTK thaw a GdkWindow it never froze, which prints:
Gdk-CRITICAL: gdk_window_thaw_toplevel_updates: assertion
'window->update_and_descendants_freeze_count > 0' failed
TrayIcon now builds the status icon when it is shown and releases it when
it is hidden, through its own set_visible(). Releasing the icon is what
removes it from the panel, since Gtk.StatusIcon has no destroy() and
run_dispose() leaves the embedded window in place.
tray_icon() is gone and the call sites go through Data.system_tray
directly. left_click() is no longer a classmethod because it has to hide
the icon through the new path rather than through the status icon the
signal hands it. The empty menu built in the constructor is removed,
nm_menu() replaces it on every right click.
devel/R-cran-arg: New port
Checks function arguments, ideally for use in R packages. Uses a simple
interface and produces clean, informative error messages using 'cli'.
archivers/lzfse: Fix build with CMake 4
Bump cmake_minimum_required() from 2.8.6 to 3.5; compatibility with
versions below 3.5 has been removed in CMake 4. Also move the call
before project().
PR: 298638
[NVPTX] Properly support acquire/release/acq_rel atomics pre-SM70 by emitting membars (#222449)
acquire/release/acq_rel are not supported semantics on pre-SM70 atomics.
We need to implement these by relaxing the atomic to "relaxed" and then
surounding it with membars. This makes the atomic sequentially
consistent, which is a superset of acquire-release behavior. We already
do this for pre-SM70 atomic that cmpxchg expand, just not for atomics
that otherwise are natively supported.
[mlir][sparse] Register bufferization dialect in stage pass (#227550)
StageSparseOperations may create bufferization.dealloc_tensor while
staging conversions. Register the dialect as a pass dependency and add a
standalone regression test.
[mlir][bufferization] Make equivalent result removal order-independent (#227752)
After bufferization, in-place tensor results commonly become memref
results that are equivalent to function arguments. These results are
redundant and should be removed before later calling-convention
conversions such as buffer-results-to-out-params.
DropEquivalentBufferResults currently visits each function once in
module order. If a caller precedes its callee, rewriting the callee can
expose an equivalent result in the caller after it has already been
visited. This makes the transformation depend on function order and may
require running the pass repeatedly.
Use a caller-driven worklist to revisit affected functions until no more
results can be dropped. Refresh stored call operations after rewriting
them so recursive call graphs can also converge safely. Termination is
guaranteed because each propagation step is triggered by removing a
function result.
[4 lines not shown]
[Github] Automatically derive python version in release-binaries (#227795)
Makes updating the python version easier, especially for renovate.
Assisted By: LLM