[lldb][test] Add tests for formatting of command option descriptions (#178235)
These test the existing behaviour before I work on #177570.
I chose "breakpoint set" because it has options with ANSI underlines
in the description.
The tests cover no ANSI (use-colour off) and with ANSI (use-color on).
The latter is where we have problems right now.
[lldb] Fix memory monitor shutdown on Linux using eventfd (#178083)
The current linux implementation has a 1 second timeout when polling for
memory pressure. lldb-dap may take up to an extra 1 second to shutdown.
Use an event file descriptor to immediately stop the memory monitor
thread.
Fixes #150220
[AMDGPU] Change scale_src2 encoding from vgpr0 to literal 0 (#178404)
This changes the fix from #167777 to use the encoding for literal 0
instead of the encoding for vgpr0, to match new SP3 behaviour and for
consistency with all other unused VALU source operands since #175753.
[libc++][NFC] Remove _LIBCPP_FREESTANDING (#176907)
`_LIBCPP_FREESTANDING` isn't used and it is unclear what libc++'s
strategy is going to be for implementing freestanding at the moment.
Therefore, remove the macro.
[AMDGPU][GFX1250] Implement offset handling in s.buffer.load (#178389)
Divergent path of s.buffer.load must handle 32b offset extension
behaviour on GFX1250.
Tests in llvm.amdgcn.s.buffer.load.ll are rewritten to avoid using
export instructions not available on GFX1250.
[WebAssembly] Fix crash in ReplaceNodeResults for ANY_EXTEND_VECTOR_INREG (#178374)
Fixes a crash during type legalization by allowing
ISD::ANY_EXTEND_VECTOR_INREG to fall back to default expansion instead
of hitting llvm_unreachable.
Fixed: #177209
(cherry picked from commit 16d8d4b84edd257a81b243767d7b6bd62bbfb9fa)
[LifetimeSafety] Handle temporaries of non-trivial view types (#177878)
Fixes https://github.com/llvm/llvm-project/issues/177802
This enables the analysis to correctly track lifetimes through
non-trivial view types that require temporary binding due to having a
destructor.
This is fixed by handling `MaterializeTemporaryExpr` even for
lifetime-extended temporaries and fixing the flow of origins.
workflows/release-tasks: Add missing needs tag to release-lit job (#178224)
The job references variables from the validate-tag job, so it needs to
have it listed in the 'needs' tag. This is why this job failed for the
22.1.0-rc2 release.
(cherry picked from commit 7901e2d04c553f6b9e17800059be8cd702c65bac)
[flang] Remove `AmbiguousStructureConstructor` warnings (#178088)
Remove `AmbiguousStructureConstructor` warnings. This removes harmless
warnings about standards-conforming generic function references that
are never ambiguous with structure constructors.
(cherry picked from commit 5136b04dd2aaeb3cbc724c0015e7f06ed2408e1a)
[flang] Document experimental support for multi-image features (#178011)
This PR updates flang's Fortran standard conformance documentation to
reflect the recent addition of experimental support for multi-image
features.
PRs implementing that support include:
* #151675
* #154081
* #154770
* #154166
* #165573
(cherry picked from commit a58038307a604096bcc2ba0e6635be339ea704b7)
[lldb-dap] Fix debugger initialisation order in DAP::InitializeDebugger (#178022)
Validate the debugger before assigning it to the member debugger to
avoid setting an invalid debugger on error.
We usually have an existing session with that debugger ends up messing
with that session.
(cherry picked from commit fa3b3a0be13c3921d983375b1d0ac03d3d2b725d)
[ShrinkWrap] Ensure we do not crash on unreachable blocks. (#178009)
Since we started optimizating always-true branches in the AArch64
backend (like cbz wzr), shrink wrap has been exposed to some block
structures that it does not handle correctly, usually with unreachable
blocks. This prevents the call to FindIDom/findNearestCommonDominator
from failing when looking at the predecessors of a loop if one is
unreachable.
Fixes: #177866
(cherry picked from commit f5de33dbf59a30246a6113e507e0cb41c21b9e45)
[IRMover] Use signature for exact definition (#177381)
It is possible for optimizations to modify attributes on exact
definitions. In particular, DeadArgumentElimination may find that a
certain argument is dead, and replace arguments in calls with `poison`.
This requires dropping the `noundef` attribute on the argument.
When ThinLTO import is performed, the destination module already has a
declaration for the function, and the definition is not imported (e.g.
because it is noinline), we currently simply retain the original
declaration. This is incorrect if call with poison arguments were
imported, as the calls become immediate UB.
There was a previous attempt to address this in
https://reviews.llvm.org/D139209. What that patch did was to fix up the
attributes of the declaration after the fact, dropping UB implying
attributes that are not present on the definition. It was reverted
because it made an incorrect assumption that the signature between the
declaration and definition must match.
[12 lines not shown]
[SystemZ] Precommit for moving some functions around. (#177441)
In preparation for #171066 (FP16 vector support).
(cherry picked from commit e0a132691fe9499857d95dc1d26994f82f7f4a44)
[SystemZ] Support fp16 vector ABI and basic codegen. (#171066)
- Make v8f16 a legal type so that arguments can be passed in vector
registers. Handle fp16 vectors so that they have the same ABI as other
fp vectors.
- Set the preferred vector action for fp16 vectors to "split". This will
scalarize all operations, which is not always necessary (like with
memory operations), but it avoids the superfluous operations that result
after first widening and then scalarizing a narrow vector (like v4f16).
Fixes #168992
(cherry picked from commit c999e9a4fe8870f7943551d9ff8b575eb282d16d)
[flang] fix DIR IVDEP for array assignments inside loops (#177940)
The access attribute set on hlfir.assign for arrays was lost in
InlineHLFIRAssign.cpp. This patch propagates it to the creates loads and
stores.
(cherry picked from commit c2d510f5bdabf71f4f5fde36a37faf5565762195)
[ARM] Fix inlining issue in ARM (#169337)
There is an issue on ARM where a function wont be inlined due to
mismatching target features between caller and callee.
The caller has `HasV8Ops` and `FeatureDotProd` and the callee does not,
but AFAIK this should not be a problem.
https://godbolt.org/z/f19h3zT66 is an example showing how the call is
not inlined on armv7.
The expected asm output would be something like:
```asm
.fnstart
vsdot.s8 q0, q1, d4[0]
bx lr
.Lfunc_end0:
```
Thanks to @Amichaxx we managed to narrow it down and now can resolve
this problem by adding `ARM::FeatureDotProd, ARM::HasV8Ops` to
InlineFeaturesAllowed in llvm/lib/Target/ARM/ARMTargetTransformInfo.h,
[10 lines not shown]
[SelectionDAG] Use promoted types when creating nodes after type legalization
When creating new nodes with illegal types after type legalization,
we should try to use promoted type to avoid creating nodes with
illegal types.
Fixes: https://github.com/llvm/llvm-project/issues/177155
[mlir][scf] Interpret trip counts as unsigned integers (#178060)
Trip counts represent iteration counts and are always non-negative. This
PR fixes all call sites to correctly use `getZExtValue()` instead of
`getSExtValue()` when extracting trip count values from `APInt`. Also
documents to clarify results are unsigned.
[clang][unittests] Fix linker error for DirectoryWatcherTest with CLANG_LINK_CLANG_DYLIB (#178455)
Move clangDirectoryWatcher from LINK_LIBS to CLANG_LIBS so it gets
replaced by clang-cpp when building with CLANG_LINK_CLANG_DYLIB=ON.
When using both CLANG_LINK_CLANG_DYLIB=ON and LLVM_ENABLE_LTO=Thin, the
test would fail with:
ld.lld: error: undefined symbol:
clang::DirectoryWatcher::create(llvm::StringRef, std::function<void
(llvm::ArrayRef
This happens because clangDirectoryWatcher was being linked as a
separate library alongside clang-cpp (which already contains
clangDirectoryWatcher), causing duplicate symbol issues with LTO.
The fix correctly categorizes:
- clangDirectoryWatcher → CLANG_LIBS (Clang library, bundled in
clang-cpp)
- LLVMTestingSupport → LINK_LIBS (LLVM library, always linked directly)
#178302
[mlir][NVVM] Add support for tcgen05.ld.red Op (#177330)
The commit adds the following:
- Adds tcgen05.ld.red Op with tests under tcgen05-ld-red.mlir and
tcgen05-ld-red-invalid.mlir
- Renamed ReduxKind to ReductionKind and renamed it across NVVM and GPU
Dialects
- Replaced Tcgen05LdRedOperationAtr with ReductionKindAttr
- Updated tcgen05.ld.red and nvvm.redux.sync tests
[lldb] Make `print` delegate to synthetic frames.
This patch is more of a proposal in that it's a pretty dramatic change to the way that `print` works. It completely delegates getting values to the frame if the frame is synthetic, and does not redirect at all if the frame fails.
For this patch, the main goal was to allow the synthetic frame to bubble up its own errors in expression evaluation, rather than having errors come back with an extra "could not find identifier <blah>" or worse, simply get swallowed. If there's a better way to handle this, I'm more than happy to change this as long as the core goals of 'delegate variable/value extraction to the synthetic frame', and 'allow the synthetic frame to give back errors that are displayed to the user' can be met.
stack-info: PR: https://github.com/llvm/llvm-project/pull/178602, branch: users/bzcheeseman/stack/7