[mlir][Bufferization] Don't assert in foldMemRefCasts on a func body without func.return (#217515)
`foldMemRefCasts` (used by One-Shot Module Bufferize when inferring
function result layouts) assumes every `func.func` body with a region
ends in a `func::ReturnOp`, and asserts if `getReturnOps()` finds
none. That assumption does not hold: `func.func`'s verifier only
requires the region to end in some terminator, not specifically
`func::ReturnOp`, so a body ending in e.g. a different dialect's
terminator parses and verifies fine but crashes this pass. This code
path is normally reached through
`insertTensorCopies`/`analyzeModuleOp`, which already reports this
case gracefully via `emitError` — but that analysis is skipped
entirely when `copy-before-write=1` is set, going straight to
`bufferizeModuleOp` and hitting the unguarded assert.
Fix by bailing out of `foldMemRefCasts` (nothing to fold) when there
are no `func::ReturnOp`s, mirroring how the rest of the file already
tolerates an empty `getReturnOps()` result.
[9 lines not shown]
math/py-random2: Update to 1.0.2
* Switch to the PEP517 build framework to make the port future-proof.
* Update WWW to point to actual upstream repository to get some more
info about its activity.
Changelog:
https://github.com/strichter/random2/compare/1.0.1...1.0.2
[docs] Reflect C++'s read-write and write-read coherence rules in the LLVM memory model
Currently, the LLVM IR memory model as written allows behaviors of monotonic
atomic operations that violate C++'s [read-write](https://eel.is/c++draft/basic.exec#intro.races-13) and [write-read](https://eel.is/c++draft/basic.exec#intro.races-14) coherence rules.
This PR adds similar rules to the definition of the monotonic memory ordering
to make monotonic atomics behave more like C++'s relaxed atomics.
Without this, translating C++'s relaxed atomics into LLVM's monotonic atomics
is technically incorrect.
Example litmus tests:
1: read-write coherence
```
; thread 0
store atomic i32 1, ptr %p monotonic ; S1
; thread 1
%l0 = load atomic i32, ptr %p monotonic ; L0
[45 lines not shown]
[C++20] [Modules] Diagnose instantiation of templates including TULocal entities (#217836)
Close https://github.com/llvm/llvm-project/issues/214982
which is invalid example but users thought it is not. We should give
better diagnostic messages
wireguard: make the textarea of the generator interactive
This lets the QR code jump a bit on the new peer path, but
also allows updating immediately after typing in the config.
Maybe we can defer the jumpy start a bit until all settings
have been gathered and then start unhiding the QR code.
[libc++] Temporarily increase the number of extra attempts for the benchmark cron (#217839)
We've had instability on lnt.llvm.org lately due to bots crawling the
server without it being a CDN and it going down. We also enabled https
from the user to the Fastly CDN, which led to some jobs failing since
they were trying to submit using http instead of https.
All of this resulted in a few commits reaching their number of max
attempts without having 3 samples each. To make up for the missing runs
in LNT, this patch temporarily increases the extra attempts so the
system will submit jobs for the missing data automatically.
We should be able to revert this patch in roughly 1 day once the missing
commits have data.
ui: trigger "h" and "a" shortcuts on all matches
Problem seen on WireGuard and IPsec settings page. Advanced
events were also triggering on all elements on a single click
which meant that they would re-disable on enable on IPsec.
import ports/multimedia/obs-studio, from Daniil Ryvkin, ok tb
OBS Studio is software designed for capturing, compositing, encoding,
recording, and streaming video content, efficiently.
[VectorCombine] Propagate profile metadata when combining selects (#217690)
Note: In foldDeinterleaveInterleavePair when the condition is scalar all
instructions within a step have the same condition, so propagating from
NarrowInst works.
[mlir][memref] Avoid overflow in mem2reg alloca checks (#205245)
This patch fixes a crash in memory slot promotion under extremely large
static memrefs while handling element-count overflow.
Root Cause:
`MemRefMemorySlot.cpp` currently checks promotability with: `if
(getType().getNumElements() > MaxElementsToPromote)`
For extremely large static memref such as:
`memref<9223372036854775807x3xi32>`
This will result `ShapedType::getNumElements` overflows and triggers
assertion in `BuiltinTypeInterfaces.cpp:86:`:
`assert(num.has_value() && "integer overflow in element count
computation")`
Fix:
The changes in `AllocaOp::getPromotableSlots` can detect total element
[5 lines not shown]
[clang][nfc] Formatting fix for SubobjectAdjustment struct in Expr.h (#217803)
I was hitting an unnecessary reformat in another change and it's just a
minor formatting issue.