[Clang][RISCV] Allow three SiFive CLIC interrupt arguments (#216159)
The SiFive CLIC interrupt values may be combined with each other and
with the machine value, but the interrupt attribute previously accepted
at most two arguments.
This commit allows three arguments for the combination of machine,
SiFive-CLIC-preemptible, and SiFive-CLIC-stack-swap.
Fixes #216138
[X86] isTargetShuffleEquivalent - only use "known zero" element if its known never poison/undef as well (#217030)
We're starting to hit cases where we've used AND/ANDNP masking to zero
out vector elements, but SimplifyDemandedElts assumes the element is
unused, folds to poison and then later folds AND(poison,0) -> poison.
This needs a more thorough cleanup of a number of x86 folds that do this
(similar to #215538), but that would result in a great deal of churn,
and it looks like a #214388 fix requires backporting to 23.x.
So initially I'm taking the approach that @xyyy1420 found so we can get
this backported and I can then address the issue more thoroughly in
trunk. I'm not convinced that this will address all poison cases, but
I'm reluctant to attempt a larger backport patch.
Fixes #214388
[VPlan] Append recipes created via builder to worklist
The previous PR appended the top most created recipe to the worklist, and this PR extends it to any other nested recipes that were created, similar to InstCombine.
This removes the header mask in a good few more places on RISC-V as measured on SPEC CPU 2017, e.g. for the following loop:
```c
long f(const int *p, const int *q, long n) {
long a = 0, b = 0;
for (long i = 0;; i++) {
if (p[i] && q[i]) { a += i; b += i; }
if (i + 1 == n) break;
}
return a + b;
}
```
Before:
[49 lines not shown]
[VPlan] Process simplifyRecipes in a worklist
This brings simplifyRecipes further in line with InstCombine, and asides from unlocking more simplifications it also helps avoid spurious test churn whenever passes are moved around simplifyRecipes.
For now just push the new recipe onto the worklist, not its users.
This uses a post order traversal so we maintain the same simplification order as before.
I've gone through and checked every simplification we do is a canonicalisation that converges, and I checked on llvm-test-suite + SPEC CPU 2017 in various configurations that we don't hit any cycles.
[VPlan] Make simplifyRecipe more like InstCombine
Most combines in simplifyRecipe RAUW a value, but not all of them erase the old recipe.
Unify them and bring it in line with InstCombine by having it return a VPValue, which simplifyRecipes can then call RAUW with, and automatically erase the old recipe.
Similarly to InstCombine, combines that modify a recipe should return the same recipe.
[LV] Make operand bundle test not constant-foldable/dead. NFC (#217253)
The test looks like it was originally added to check that operand
bundles were preserved, but the libcall is constant folded away and made
dead. Later PRs may end up removing this, see the conversation in
https://github.com/llvm/llvm-project/pull/212968#discussion_r3702373769
evbarm/am18xx: sdmmc driver
A first version of the SD card driver for the TI am1808. The driver works fine, but the performance is lower than expected.
litestream: Update to 0.5.16
pkgsrc changes:
- Bump modernc.org/sqlite to version that brings back NetBSD/amd64
support
Changes:
Too long to include, sorry, please see:
<https://github.com/benbjohnson/litestream/releases>
evbarm/ti_edma: clear events before transfer
The sdmmc controller on the am18xx fires dma events even in PIO mode. Clear these event before starting a DMA transfer.
mk: Introduce support for ULIMIT_PRECMD.
While this has potential to run any pre-command, it is primarily useful as a
hook to insert ulimit(1) commands that will apply to shell commands, hence
the name.
In bulk builds there will occasionally be packages that end up spinning on
CPU and hanging the build until the user has a chance to kill the process.
For some builds this is desirable so that the issue can be debugged, but for
others the user may prefer to avoid having to interact with the build to get
it to complete, in which case they can set this to e.g. "ulimit -S -t 3600".
[Clang][NFC] Remove unused constructor of ASTTemplateArgumentListInfo (#217200)
It turns out that its only client VarTemplateSpecializationDecl has
stopped copying template arguments since 2024, see
12028373020739b388eb2b8141742509f1764e3c
Thread Safety Analysis: Treat blocks constructing noreturn temporaries as non-returning (#215691)
When a temporary object with a [[noreturn]] destructor is constructed
conditionally (e.g., inside a branch of a ternary operator), Clang's CFG
inserts a TemporaryDtorsBranch decision block before dispatching to the
destructor block.
Thread Safety Analysis previously treated this block as a generic join
point. Because the path through the temporary construction terminates in
the destructor, and dropped held locks on the continuation path. This
premature join resulted in spurious lockset mismatch warnings
Teach neverReturns() to recognize when a block's single successor is a
TemporaryDtorsBranch whose temporary was constructed in that block and
whose destructor branch is noreturn.
Assisted-by: Antigravity:gemini
[MLIR][LLVM] Add function metadata to LLVMFuncOp
Add a generic LLVM dialect carrier for LLVM IR function metadata on LLVMFuncOp.
Represent attachments as an ordered list so repeated metadata kinds, such as
multiple type metadata attachments, can be preserved while keeping metadata names
language-agnostic.