[mlir][SPIRV] Add SPIRVToLLVM conversion for selection with yielding values (#210600)
The current SPIRVToLLVM conversion for SelectionOp does not handle merge
blocks with yielding values. This change implements that by adding
arguments to the continue block in the SelectionPattern.
Closes #204714
NAS-141898 / 27.0.0-BETA.1 / Remove unnecessary uid/gid range checks (#19375)
LocalUID/LocalGID max (90000000) is below the container range
(2147000001), so such an id can't be submitted.
NAS-141899 / 27.0.0-BETA.1 / Remove dead code in `group.update` (#19376)
`gid` can't be specified in `group.update` request, so this code is
never reached
[libc++] Remove redundant benchmarks for lexicographical_compare_three_way (#210268)
We already test the `_slow_path` and `_fast_path` functions through the
generic `BM_lexicographical_compare_three_way`. We don't need to
benchmark them again.
[lldb][test] Skip stop-reason tests unsupported on WebAssembly (#211266)
TestThreadStates::test_process_state expects a signal stop reason after
"process interrupt", but the trap from the single step used to step off
the breakpoint is reported as a trace stop. It is already skipped on
Linux and Darwin for the same reason.
TestBuiltinDebugTrap expects to continue past __builtin_debugtrap, but
on WebAssembly that lowers to the unreachable instruction, a fatal trap
that cannot be resumed.
[libc++] Don't require complete types in vector<T>::empty() (#210754)
This was previously not required, but the patch to introduce a new
size-based vector layout unintentionally added this new requirement. We
almost certainly not want to promise this guarantee going forward, but
we should actually land this change explicitly and consider the
transition story, not do it as a fallout of another refactoring.
Fixes #210732
(cherry picked from commit 17ac8fdd95283110a14f1de8c15a0fc661119296)
[flang][Lower][OpenMP] Fix reduction on array sections aborting in lowering (#209701)
**Summary**
This regression was introduced by #196094, which added a special
lowering path for reductions on a single array element, such as `a(2)`.
The problem is that Flang also treated an array section like `a(2:96)`
as if it were a single element. Because of this, the section was sent to
a code path that only supports scalar elements.
That path produced an array type that the reduction initialization code
could not handle, so Flang reached a `TODO` and aborted with a “not yet
implemented” error.
**Fix**
The fix is to use the special element path only when the expression has
rank 0, which means it represents one single value. Array sections have
[9 lines not shown]
[RISCV] Avoid forming Zilsd pairs with x0 for non-x0 register classes (#211019)
The pre-RA Zilsd optimizer allowed a pair when both stored values came
from the same virtual register if that virtual register was defined by a
copy from X0. This is only valid when the virtual register class can
actually contain X0.
Check the virtual register class before treating the value as `x0_pair`.
This prevents forming an invalid paired store for register classes such
as `GPRNoX0`.
Without this change we were hitting the following assertion in
`RISCVLoadStoreOptimizer`:
```
assert(
FirstReg != SecondReg &&
"First register and second register is impossible to be same register");
```
[2 lines not shown]
NAS-141889 / 27.0.0-BETA.1 / Fix crash in `user.set_password` (#19368)
`if not entry:` branch didn't raise an error, and `entry` was used by
the code below, which lead to a crash
[RISCV] Support uimm5 operands for Xqcicm cmovs in RISCVExpandPseudoInsts (#210955)
`expandCCOpToCMov` was only accepting signed 5-bit immediates before
forming `Xqcicm` conditional-move pseudos. Valid `uimm5` operands for
unsigned compare forms such as `QC_MVGEUI` and `QC_MVLTUI` were not
being handled leading to a crash.
Track whether the selected conditional-move opcode expects a signed or
unsigned immediate, and validate the RHS against the matching range.
(cherry picked from commit 9bcb851e86941117ec9e82db8986ed301f929647)
[llvm-readobj] Print all callgraph sections (#198929)
Ensure that `llvm-readobj` / `llvm-readelf` processes and dumps all
SHT_LLVM_CALL_GRAPH sections present in an object file, rather
than just the first one.
**Motivation:**
Consider this `foo.s` file
```
.pushsection .text, "axG", %progbits, foo
.globl foo
foo:
ret
.pushsection .llvm.callgraph, "?", %llvm_call_graph
.byte 0, 0
.dc.a foo
.quad 0
.popsection
.popsection
[19 lines not shown]
kernel/linker: serialize recursive unload
Restore the safe list traversal from commit
e7a2d40362352344eff1c4f395caf0a735e00a3e.
'llf_lock' is now recursive and held through the unload path, so
callbacks and dependency release can recurse without exposing a
partially unloaded file.
GitHub-PR: #50
[analyzer] Fix StdVariantChecker crash on std::get with a non-ptr arg (#210167)
When `std::get` is called on a dereferenced integer-to-pointer cast, the
checker `alpha.core.StdVariant` crashes. Minimal reproducer:
```
std::get<int>(*(std::variant<int, char> *)11);
```
Godbolt reproducer - https://godbolt.org/z/4EKe1PrKb
The root cause is that `StdVariantChecker::handleStdGetCall()` calls
`SVal::getType()` on any non-unknown argument, then calls
`getPointeeType()` on the result while assuming it is a pointer type. In
the case of a concrete integer cast to a pointer and then dereferenced,
it is modeled as `loc::ConcreteInt`, whose recovered type is an integer.
`getPointeeType()` on such an input returns a null QualType, on which
`getTypePtr()` crashes.
[4 lines not shown]
[analyzer] Fix crash in RegionStoreManager::bindArray from constructor array-to-pointer decay (#210649)
ProcessInitializer() strips implicit casts from a CXXCtorInitializer's
init expression via IgnoreImplicit(), then decides whether to treat the
initializer as a direct array-to-array member copy by checking
Init->getType()->isArrayType(). For a pointer member initialized via
array-to-pointer decay of a reference-to-array constructor parameter
(e.g. `Foo(T (&arr)[N]) : ptr_(arr) {}`), IgnoreImplicit() strips the
ArrayToPointerDecay cast, exposing the underlying array-typed
expression, so this check misfires even though the field itself is a
pointer, not an array. That branch fetches the raw region address of the
whole array, bypassing the normal decay logic (which produces an
ElementRegion), so the pointer member ends up holding the address of the
whole array typed as the array itself, instead of an ElementRegion at
index 0.
Later, dereferencing and storing through that mistyped pointer routes
into RegionStoreManager::bindArray() (instead of bindScalar()), which
unconditionally casts its Init value to nonloc::CompoundVal, asserting
[37 lines not shown]
[lldb] Gate `PolicyStack::Current()` log behind verbose (#209527)
`Process::GetState()` calls `PolicyStack::Get().Current()` on every
prompt redraw, so the previous unconditional LLDB_LOG at the read site
fired on every keypress once `log enable lldb process` was on, drowning
out any other process log output. Keep the dump for when it's actually
wanted, but only fire it if the log is set to verbose.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
(cherry picked from commit c7a0afe5049a3d4789f34a8d746c6a45d73557b4)
[SDAG] Use DAG.getTokenFactor in more places (#210949)
This will cause the TokenFactor to be split into nodes of at most
SDNode::getMaxNumOperands() size.
This fixes #189161 but I have not added a test case as the output is
in excess of 160000 lines long.
(cherry picked from commit ba836590ffed1305a770fc18f4a3f676f9829df1)
kernel/linker: preserve refs after unload veto
linker_file_unload() used to take a temporary file reference (file->refs)
before notifying modules to unload [1]. Its veto path dropped that
temporary reference before returning the error.
The 2009 linker code sync with FreeBSD [2] removed the temporary
reference but retained the decrement. Therefore, every failed kldunload
reduced 'file->refs' even though the file remained loaded, allowing
repeated EBUSY returns to drive the count below zero.
Keep the existing reference when a module vetoes unload. sys_kldunload()
already restores userrefs on error, and a later unload attempt can retry
with both counters unchanged.
[1] Handle recursive situations a bit more robustly ...
commit e7a2d40362352344eff1c4f395caf0a735e00a3e
[2] modules: pull in most of FreeBSD's module linker changes
commit 1c0e32863e0583221e430c22c1c68a023fd16195
[2 lines not shown]