[lldb] Remove trailing newlines from AppendErrorWithFormat calls (part 2) (#193168)
Follow up to #192965.
This call adds a newline if there isn't one. Changing these will
eventually let us always add a newline, which is in line with
the other methods on CommandReturnObject.
This is a small part of calls found with:
* VSCode search for
`(\.AppendErrorWithFormat\(([\s\r\n]+)?"(?:(?:\\.|[^"\\])*))\\n"` and
replace with `$1"`.
* Asserting that the last character of the format string is not a
newline.
* Manual inspection.
arm: fix float to integer conversion with `+mve` (#193319)
Fix an instruction selection failure when using the `+mve` (and an implied `-mve.fp`)
target feature. From what I understand, e.g. based on
https://reviews.llvm.org/D60694, this combination of target features
enables float registers and loads/moves, but no real FP operations.
Hence
https://godbolt.org/z/xeTcbqMqx
```llvm
define i32 @foo(float %x) {
%i = call i32 @llvm.fptosi.sat.i32.f32(float %x)
ret i32 %i
}
```
compiled with `llc -mtriple=thumbv8m.main-none-eabi
-mattr=+v8.1m.main,-mve.fp,+mve -O2` hit
[8 lines not shown]
[LoopInterchange] Fix out-of-bounds accesses in tests (NFC) (#193272)
These tests trigger out-of-bounds accesses. Fix them by decreasing the
backedge-taken counts of the loops, and add pseudo code.
[DAG] visitFREEZE - revisit frozen node after merging with unfrozen uses (#188206)
After merging other uses of a N to all use FREEZE(N), make sure we
revisit FREEZE(N) to attempt to push the FREEZE through the (now
hasOneUse()) operand.
The only remaining annoyance I can find is the freeze nodes interfering
with amdgpu scalar/vector instructions - mainly because we end up with
more freeze(vectorload) patterns and extract_vector_elt nodes can't peek
through anymore - this is an ongoing general problem that nobody has
found a good answer to yet.
[MachineCopyPropagation][NFC] Refactor EliminateSpillageCopies (#192609)
This patch builds on the original implementation to address areas that
may impact compile time regression if enabled. The aim of the patch is
to streamline and improve the implementation for better compile time
impact. A summary of the changes is as follows:
- Cost modelling that does an initial scan of the block, any blocks with
less than 6 copies are immediately skipped.
- RegMask scan in `findLastSeenDefInCopy` removed. This now only checks
the recorded copies to ensure that RegMasks are clobbered when they are
seen if they clobber a Reg
- Streamlining of `IsSpillReloadPair` and `IsChainedCopy` to reduce the
need for a second call to isCopyInstr to get the DestSourcePair, these
are now returned from the lamdba function
- Use of TRI API to get the CommonRegClass
Assisted-by: Claude Sonnet 4.6 (Co-Pilot)
[lldb] Override UpdateBreakpointSites in ProcessGDBRemote to use MultiBreakpoint
This concludes the implementation of MultiBreakpoint by actually using
the new packet to batch breakpoint requests.
https://github.com/llvm/llvm-project/pull/192910
[lldb] Implement delayed breakpoints
This patch changes the Process class so that it delays *physically*
enabling/disabling breakpoints until the process is about to
resume/detach/be destroyed, potentially reducing the packets transmitted
by batching all breakpoints together.
Most classes only need to know whether a breakpoint is "logically"
enabled, as opposed to "physically" enabled (i.e. the remote server has
actually enabled the breakpoint). However, lower level classes like
derived Process classes, or StopInfo may actually need to know whether
the breakpoint was physically enabled. As such, this commit also adds a
"IsPhysicallyEnabled" API.
https://github.com/llvm/llvm-project/pull/192910
INIT_ALL: Fix typo in option description
From GitHub pull request #2035; the change needs to be applied to the
source file for the option description, not the generated src.conf.5.
(cherry picked from commit c9f3de0ba95b8da31d35fa92e0a54cf6f3d3f1dd)
[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into Process
The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.
https://github.com/llvm/llvm-project/pull/192910
ctladm tests: Only use allowed chars in IQN
_ isn't part of the allowed IQN format, but - is.
None functional change.
Reviewed by: asomers, ngie
Approved by: asomers (mentor)
MFC after: 1 week
Sponsored by: ConnectWise
Differential Revision: https://reviews.freebsd.org/D56557
ctl: require ctladm in addition to sg_opcodes
Each test case in opcodes.sh uses ctladm to create and remove the LUN it
exercises, but only sg_opcodes was listed in require.progs.
On systems where ctladm is not builded the tests would fail at setup instead of
being skipped cleanly.
Approved by: asomers
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D56568
[lldb-server] Implement support for MultiBreakpoint packet
This is fairly straightforward, thanks to the helper functions created
in the previous commit.
https://github.com/llvm/llvm-project/pull/192910
[lldb-server][NFC] Factor out code handling breakpoint packets
This commit extracts the code handling breakpoint packets into a helper
function that can be used by a future implementation of the
MultiBreakpointPacket.
It is meant to be purely NFC.
There are two functions handling breakpoint packets (`handle_Z`
and `handle_z`) with a lot of repeated code. This commit did not attempt
to merge the two, as that would make the diff much larger due to subtle
differences in the error message produced by the two. The only
deduplication done is in the code processing a GDBStoppointType, where a
helper struct (`BreakpointKind`) and function (`std::optional<BreakpointKind> getBreakpointKind(GDBStoppointType stoppoint_type)`) was created.
https://github.com/llvm/llvm-project/pull/192910
[SPIRV] Fix legalization of zero-sized intrinsic globals (#192730)
Some LLVM global intrinsics like `llvm.global_ctors` may become
zero-sized arrays if all constructors are inlined/optimized out.
These variables use appending linkage, which is only valid on arrays,
however as we are lowing to a pointer, this causes invalid IR if we
maintain the same linkage.
Use `ExternalWeak` linkage, the only other mergable linking type allowed
for intrinsic global variables with definitions. We also need to not
specify an initializer to not produce an invalid module.
As these variables do not represent user visible code, and all entries
were optimized out anyway, the new linkage should be fine.
---------
Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
[lldbremote][NFC] Factor out code handling breakpoint packets
This commit extracts the code handling breakpoint packets into a helper
function that can be used by a future implementation of the
MultiBreakpointPacket.
It is meant to be purely NFC.
There are two functions handling breakpoint packets (`handle_Z`
and `handle_z`) with a lot of repeated code. This commit did not attempt
to merge the two, as that would make the diff much larger due to subtle
differences in the error message produced by the two. The only
deduplication done is in the code processing a GDBStoppointType, where a
helper struct (`BreakpointKind`) and function (`std::optional<BreakpointKind> getBreakpointKind(GDBStoppointType stoppoint_type)`) was created.
https://github.com/llvm/llvm-project/pull/192910
[bolt] AArch64: Fix TLSDESC to LE relaxation by mold (#190370)
mold linker creates relaxation stub from TLSDESC to LE, (lld makes it
IE) using sequence as NOP+NOP+MOVZ+MOVK. This in itself is not an issue,
when --emit-relocs is added the relocs R_AARCH64_TLSDESC_ADD_LO12 and
R_AARCH64_TLSDESC_CALL are associated with useful MOVW instructions.
However bolt does not check for R_AARCH64_TLSDESC_ADD_LO12 in
adjustRelocation() when disassembling the file. This later triggers a
bug when reloc is patched as movk is patched with S_LO12 fixup kind
which is invalid.
Refer to bug: https://github.com/llvm/llvm-project/issues/190366 for
details.
[offload] Get kernel argument sizes from Level Zero (#192487)
Retrieve kernel argument sizes directly from Level Zero API as a
temporary workaround. This approach assumes no padding or alignment
between arguments. This enables immediate functionality while a more
permanent solution requiring offload API changes is being discussed.
math/octave-forge-rf: New port.
RF and microwave network-parameter utilities for GNU Octave. Provides
S-parameter conversions (ST, SZ, SY, SABCD, SH, SG), cascading,
de-embedding, port reordering, renormalization, mixed-mode conversion
for differential pairs, and Touchstone I/O.
[Flang] Add SIMD Compiler Directive (#192969)
Similar to #192674, this adds support for the SIMD Compiler Directive,
previously supported by legacy Fortran frontends such as classic-flang.
This operates in the same way as `VECTORALWAYS`, marking a DO loop to be
vectorised by the LLVM Backend.
The missing support was highlighted while building an opensource
benchmark, as build warnings were indicating that this compiler
directive was being ignored.