[Mips] Fix MipsJmpLink and MipsTailCall to use compact branch instructions on MIPS32/64 R6 (#232578)
On MIPS32/64 R6, `-mcompact-branches=always` should emit the `BALC`
instruction for MipsJmpLink instead of `JAL`. Currently LLVM emits `JAL`
regardless of the option, while GCC correctly emits `BALC`.
This patch adds R6-specific pseudo instructions `JAL_R6` and
`TAILCALL_R6` that expand to `BALC` and `BC`, and selects them when
`UseCompactBranches` is enabled. The `JAL` and `TAILCALL` patterns are
restricted to pre-R6 targets, and a `NotUseCompactBranches` predicate is
added to keep `JAL` and `TAILCALL` available on R6 when compact branches
are disabled.
Fix #165634.
[clang][NVPTX][MLIR][NVVM] Add overloaded fma intrinsics (#232672)
This change adds the following overloaded `fma` intrinsics with
NVPTX codegen:
- `llvm.nvvm.fma`
- `llvm.nvvm.fma.ftz`
- `llvm.nvvm.fma.sat`
- `llvm.nvvm.fma.ftz.sat`
- `llvm.nvvm.fma.relu`
- `llvm.nvvm.fma.ftz.relu`
The rounding mode is passed in as an `i32` immediate operand.
Auto-upgrades the older non-overloaded intrinsics (including the
legacy variants that used integer storage types for the bf16
operands) to the new ones, and updates clang builtins, CIR codegen,
and MLIR NVVM ops to lower to the new intrinsics. The
`llvm.nvvm.fma.rn.oob{.relu}` intrinsics are left unchanged.
[21 lines not shown]
[mlir][SPIR-V] Fix deserializer crash on entry block selection header (#237137)
Split the entry block when it also starts a selection, since it cannot
move into the region
system: invalidate sysctl cache on apply; closes #11109
As mentioned in 41ab7fb9f57 this fixes the glaring issue of the
sysctl cache being stuck while trying to avoid reloads during
normal operation. The performance hit is solely in the apply
path with is already slow, but now at least syncs up with the
system each time which also means there is no more boot race.
[mlir][SPIR-V] Extract complex abs and zero-check helpers in ComplexToSPIRV (NFC) (#236851)
Move the overflow safe magnitude and zero check out of SignOpPattern so
other lowerings can reuse them
Required for other ops lowering (e.g. sqrt/rsqrt)
[lldb-dap] Report the language of compile units (#235995)
Add language to the CompileUnit type in the compileUnits response, with
its version where known, for example c11 or c++17. Clients can use it
instead of guessing a frame's language from its file extension. It is
omitted when the language is unknown.
rdar://190656790
[lldb-dap] Report a frame's language specific data (#235984)
Add $__lldb_languageSpecificData to StackFrame, passing through what the
frame's language runtime reports about the frame, such as the
Objective-C runtime version.
rdar://190656849
[ADT] Qualify AddressRange in AddressRangesBase::find. NFC
With `-fdelayed-template-parsing` (the default for clang targeting the
MSVC ABI), `find` is parsed at the end of the TU, where `llvm-profgen`
makes `llvm::sampleprof::AddressRange` visible in `namespace llvm`.
Qualify with `llvm::` to avoid the ambiguity.
```
AddressRanges.h:101:42: error: reference to 'AddressRange' is ambiguous
note: candidate found by name lookup is 'llvm::AddressRange'
note: candidate found by name lookup is 'llvm::sampleprof::AddressRange'
```
Fix apps test on enterprise HA systems
## Problem
`test_app_with_unusable_metadata_is_reported_and_deletable` asserted that `app.available` lists the community app it installs. `app.available` only reports preferred trains, and applying a license on an HA system narrows those to the enterprise train, so the assertion failed there even though nothing was broken.
## Solution
Assert that `app.available` returns a non-zero count instead. This still exercises the full listing path over the broken app without depending on which trains are preferred.
vtnet: honor the advertised MTU limit on attach
When VIRTIO_NET_F_MTU is negotiated, virtio_net_config.mtu specifies
the maximum MTU the driver may use. vtnet_ioctl_mtu() enforces this
limit for subsequent MTU changes, but ether_ifattach() unconditionally
initializes the interface MTU to ETHERMTU (1500).
So a device advertising a maximum below 1500 starts with an MTU above
its limit. So make sure to set the initial MTU no larger than
vtnet_max_mtu. That is, for vtnet_max_mtu less than 1500
interface MTU will be set to this value, otherwise the current behaviour
is preserved, MTU will be set to 1500.
Reviewed by: kfv, tuexen
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60980
Fix apps test on enterprise HA systems
## Problem
`test_app_with_unusable_metadata_is_reported_and_deletable` asserted that `app.available` lists the community app it installs. `app.available` only reports preferred trains, and applying a license on an HA system narrows those to the enterprise train, so the assertion failed there even though nothing was broken.
## Solution
Assert that `app.available` returns a non-zero count instead. This still exercises the full listing path over the broken app without depending on which trains are preferred.
Revert "[DAGCombiner] Don't always spill widened dynamic insertelt chains via stack" (#237145)
Reverts llvm/llvm-project#232086. The new test
insertelt-dynamic-chain-widen.ll is failing on several Buildbots.
Relates to #232235.
misc/py-safetensors: Make the PyTorch dependency optional
Upstream has torch as an extra (safetensors[torch]); the core library has no
mandatory dependencies. The port pulled py-pytorch unconditionally, for
every consumer, including those that only use the numpy path.
PR: 300030
Approved by: yuri (maintainer)
Sponsored by: Netzkommune GmbH
misc/py-diffusers: Add the missing PyTorch dependency
diffusers needs torch and had no dependency of its own; it took it from the
unconditional one in misc/py-safetensors, which is about to go away.
PR: 300030
Approved by: yuri (maintainer)
Sponsored by: Netzkommune GmbH
[mlir][ArmNeon/ArmSVE] Reorganise .td and test files (NFC) (#236797)
Group related operation definitions and tests, and add comments to make
the organisation clearer and more consistent.
* Group DOT definitions and tests together.
* Group MMLA definitions and tests together.
* Clearly separate regular operations from intrinsic operations in
ArmSVE.td.
* Move tests that exercise scalable vectors without SVE-specific
operations
from mlir/test/Target/LLVMIR/arme-sve.mlir to
mlir/test/Target/LLVMIR/scalable-vectors.mlir.
* Add TODOs identifying potentially redundant tests for future removal.
This organisation should simplify maintenance and make it clearer where
new definitions and tests belong.
[VPlan] Allow early exit loops with side effects by masking in the vector loop.
Rename UncountableExitStyle::ReadOnly to MaskedHandleExitInVectorLoop and
use it for early exit loops with stores, when every store comes after all
the early exits. Each early exiting block branches to the latch on the
lanes from the first exiting one on, so the stores after it are masked off
for them, and values from the skipped blocks are poison on those edges.
Loops fall back to MaskedHandleExitInScalarLoop if a store is in the latch,
a store isn't properly dominated by every early exiting block, the latch's
exit condition uses a value from a block the exits can skip, or a load
might fault.
[VPlan] Preserve SSA in early exit loops
MaskedCond is used to logically-and the condition to early exit with the current block in-mask. However because we use it in the latch block where the condition isn't defined on all paths, we have to workaround it not being in SSA in the verifier.
This fixes this by using reconstructSSA added in #212209 to preserve SSA in both the exit conditions and live outs in the exit blocks. It also means we get the right exit condition without MaskedCond and allows us to remove the MaskedCond exceptions in the verifier. MaskedCond is still kept since a followup PR will still use it.
One subtle point is that we need to freeze any branch conditions. Any lanes after and including the early exiting lane might contain poison and we can have branches on those poison lanes that didn't we didn't previously branch on in the scalar loop.
There's no miscompile on main today because we coincidentally don't keep SSA so exit conditions are read directly without being polluted by poison stemming from a branch past the early exit. But in this PR the exit conditions are polluted and we can end up with poison in the condition operand of a select, which causes an undefined result for AnyOf even if it freezes its operand. The poison in the branch will also cause problems in future if we decide to preserve uniform control flow and emit branches instead of blends. The exit_cond_merged_after_poison_branch test illustrates this.
Pull up following revision(s) (requested by mrg in ticket #562):
external/mit/xorg/lib/brotli/brotli.mk: revision 1.2
external/mit/xorg/lib/brotli/brotli-rename.mk: revision 1.2
add new decoder sources and symbols for the renamer.