[SLP]Combine fmuladd for the nodes of the gathered slices
The fadd/fsub nodes from the vectorized gathers were never combined with
their fmul operands, while their scalars were costed as fused.
It overestimated the vector cost of such trees.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/232361
[CIR] Extract DynLib build/link fixes from #221291 (#232330)
The review from #221291 finally got me to see that we failed a few
things with Dynlib. This extracts the changes from that review so that
they are separate from the main one, so we can merge that patch with
this on main eventually.
[libc] Add support for writing to wchar_t in printf_core/ converter functions. (#230246)
This is part of the ongoing work toward implementing wide-character
printf functions.
* A `CharT` template type parameter is added where appropriate to the
converter functions.
* The converter_test cases are extended to `TYPED_TEST`s covering both
`char` and `wchar_t`.
* Some new test cases are added for character and string conversion.
* As a part of this change `BasicFormatSection<T>` is renamed back to
simply `FormatSection<T>`. (It was renamed in #222988 with
`FormatSection` becoming an alias mainly to keep from changing a lot of
lines in converter_test twice.)
Assisted-by: Automated tooling, human reviewed.
[CIR][OpenMP] Add support for the OpenMP 'for' directive
This patch adds support for wsloop in ClangIR: the `for` directive and its
combined forms `parallel for` and `target parallel for`. This is lowered to an
omp.wsloop + omp.loop_nest, nested utilizing the existing queue-based
decomposition.
Assisted-by: Cursor / Claude Sonnet 5 High
AArch64: Move the Windows trap after noreturn calls into the AsmPrinter
With Windows unwind info, the unwinder finds the function or funclet
for a frame from its return address, so a call must not be the last
instruction of one.
This was hackily handled by overwriting TrapUnreachable in the
TargetMachine constructor which inserts traps after every
unreachable. X86 handles the same problem by padding calls in the
AsmPrinter, so do the same here: emit a trap only after a noreturn
call that would end a function or funclet. This addresses the FIXME
about eliding the trap when the next instruction is in the same
region, so noreturn calls in the middle of a function no longer get a
trap.
This removes one of the last obstacles to removing ExceptionModel from
TargetOptions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[X86][LoongArch]Fix ODR violation in CostKindCosts
Both targets defined a global CostKindCosts with different field
orders. Without inlining, the linker merged the inline operator[],
swapping X86 throughput and latency costs.
Assisted-by: Cursor
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/232356
[lldb] Let the host platform write to pipes
`Platform::WriteFile` on the host platform could not write to a pipe: it
goes to `FileCache::WriteFile`, which seeks to the offset before
writing, and a pipe refuses the seek with ESPIPE. The offset means
nothing for a pipe, so `FileCache::WriteFile` now writes at the pipe's
end when the seek fails that way.
This is the host-side counterpart of #232045, which does the same for
lldb-server's `vFile:pwrite`. With both, writing to a pipe through a
platform works the same whether the platform is the host or a remote
one. Downstream, NVIDIA's GPU support writes a byte to a pipe in the
debugged process through the target's platform, to ask the CUDA driver
to attach.
The new FileCacheTest opens a named pipe through `FileCache`, writes to
it at a nonzero offset, and reads back exactly the bytes sent. Without
the fix, the write fails with ESPIPE. The test is POSIX-only, since
named pipes are files only there.
Firewall: NAT: Destination NAT - cleanup some more for https://github.com/opnsense/core/pull/10944
Removed a bit too much in previous commit, if we're passing traffic to a port alias without changing destinations, we can simply omit the port from the target.
[lldb] Fix a statusline deadlock when flushing the process (#231719)
Since #188377, Process::Flush calls Debugger::FlushStatusLine, which
takes the statusline mutex. Process::Flush may run under the target API
mutex, while a statusline redraw holds the statusline mutex and then
waits on the API mutex, resulting in a deadlock.
For example, this happens when a scripted command runs "target modules
load" through SBDebugger::HandleCommand while a progress event redraws
the statusline.
Make FlushStatusLine set an atomic flag instead, and have the next
redraw clear the cached frame under the statusline mutex. This keeps the
stale frame protection without the risk of lock inversion.
rdar://189958732
[Windows] FlushViewOfFile() for sparse files before unmap (#231823)
The issue has been described here
https://github.com/swiftlang/llvm-project/issues/12605 We have
reproduced this issue on x86_64 too running 2000 processes
simultaneously. It is hard to create a stable test for this patch. The
problem is specific to sparse files on NTFS. There is no problem on
ReFS.
I think using sparse files increases fragmentation and reduces
performance. It might be worth considering moving away from sparse
files.
Address feedback
- Use logger.exception for a failed TrueSearch mount check.
- Drop the 5 second reconfigure delay and RECONFIGURE_TIMER. The mount
check already runs once per burst of mounts, so it now reconfigures
TrueSearch directly.
- Cut the new unit tests down to one short test per change and move the
TrueSearch ones into test_truesearch.py.
[flang][OpenMP] Improve diagnosing invalid operators in DECLARE_REDUCTION
Move the check out of the common MakeNameFromOperator function and
into OmpStructureChecker. Remove the no longer needed SemanticsContext
parameter in MakeNameFromOperator.
This will allow reusing at least some parts of the the name-mangling
code in DECLARE_INDUCTION.
[AArch64] Combine non-extending partial.reduce.fadd into fma (#230120)
Using partial reductions as the default (#228481) results in some
regressions, in particular for imagick from spec2017. The cause in that
case is a lack of combining fmul and fadd into fmla, since the fadd was
still part of the intrinsic at that point.
This PR makes sure that the partial_reduce_fmla ISD node is constructed
with the same flags that the intrinsic had, copies flags to the nodes
generating when expanding during vector op legalization, then performs a
target DAG combine for the FADD_P and FMUL_P AArch64ISD nodes.
[Offload] Allow 0 to be returned for `MEMORY_CLOCK_RATE` (#232265)
For integrated Intel GPUs, level zero APIs will return 0. It's not easy
to fetch dram's clock rate, so we just accept 0 as valid result of the
test.
NAS-144534 / 27.0.0 / Fix `test__iscsi_extent__disk_choices` flakiness (by themylogin) (#20023)
udev creates the snapshot device symlink some time after the snapshot is
created. That leads to this test being flaky.
An alternative is to wait for udev to settle after snapshot creation.
IMO it will be useful in a very limited amount of cases, but will
introduce unnecessary latency in the vast majority of cases.
Original PR: https://github.com/truenas/middleware/pull/20022
Co-authored-by: themylogin <themylogin at gmail.com>
AMDGPU: Don't look up ConstantData in the constant access cache (#232283)
AAAMDAttributes checks the constant operands of all instructions for
address space casts and LDS globals that need the queue pointer or
flat scratch initialization, looking each of them up in a cache. Skip
the lookup for trivial constants which have no operands.
Instructions spent in amdgpu-attributor:
rocPRIM test_device_scan, gfx942: 1429M -> 1419M (-0.7%)
Blender Cycles HIP kernel, gfx1100: 507M -> 506M (-0.2%)
rocPRIM 16 tests, full LTO, closed world: 5283M -> 5263M (-0.4%)
The effect is magnified with other pending compile time improvements.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[flang] Move reduction name mangling code to Semantics/tools
Gather all the mangling/demangling code in one place.
Also remove MangledIntrinsicOperatorReductionName that was only there
to expose MakeNameFromOperator, whose declaration was not in include/.
One remaining issue is emitting a diagnostic specific to DECLARE
REDUCTION in MakeNameFromOperator.