[MLIR] [Python] a few more fixes to type annotaitons (#186106)
* `_OperationBase.walk` was missing a default.
* `MLIRError` is now fully defined in C++. The monkey-patching
previously done in `_site_initialize` was opaque to type checkers.
[mlir][spirv] Add last 6 elementwise unary ops in TOSA Ext Inst Set (#186060)
This patch introduces the following elementwise unary operators:
spirv.Tosa.Log
spirv.Tosa.LogicalNot
spirv.Tosa.Negate
spirv.Tosa.Reciprocal
spirv.Tosa.Rsqrt
spirv.Tosa.Sin
Also dialect and serialization round-trip tests have been added.
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
[CIR] Add support for null checks with operator delete (#185987)
This implements a check for null pointers when processing operator
delete. This is especially important now that we have implemented array
delete because we need to read from the pointer location in that case.
[OpenMP][OMPT] Remove Threads dependency from omptest link interface (#186183)
Link against Threads using PRIVATE scope, instead of PUBLIC.
Reason: it imposes a transitive dependency on library users.
If Threads could not be found this could cause a link error.
The issue would manifest, if omptest is used via find_package.
Addresses issues with previous PR
https://github.com/llvm/llvm-project/pull/185930
[flang][NFC] Converted five tests from old lowering to new lowering (part 30) (#186000)
Tests converted from test/Lower/Intrinsics: get_command.f90,
get_command_argument-optional.f90, get_command_argument.f90,
get_environment_variable-optional.f90, get_environment_variable.f90
AMDGPU/GlobalISel: Lower G_EXTRACT/INSERT in legalizer (#181036)
Lower G_EXTRACT/INSERT in legalizer by using custom lowering for simple
32-bit aligned cases and calling generic extract/insert lowering for all
other cases.
[mlir][pygments] add mkdocs instructions and `_all_` addition (#181978)
Pygments requires __all__ to be defined in lexer modules that are
discovered via the LEXERS entry-point mapping. Without it, importing
the lexer through Pygments' standard plugin machinery fails silently.
This also adds brief usage instructions for integrating the lexer
into documentation pipelines.
[LV] Add tests for incorrect narrowing of IGs with scalable vectors.
Add test coverage for mis-compile in https://github.com/llvm/llvm-project/issues/185860.
Currently a wide load gets incorrectly narrowed to a single-scalar one
with scalable VFs, which only loads one element instead of the needed
vscale elements.
config: fix STATX_MNT_ID detection
statx(2) requires _GNU_SOURCE to be defined in order for sys/stat.h to
produce a definition for struct statx and the STATX_* defines. We get
that at compile time because we pass -D_GNU_SOURCE through to
everything, but in the configure check we aren't setting _GNU_SOURCE, so
we don't find STATX_MNT_ID, and so don't set HAVE_STATX_MNT_ID.
(This was fine before ccf5a8a6fc, because linux/stat.h does not require
_GNU_SOURCE).
Simple fix: in the check, define _GNU_SOURCE before including
sys/stat.h.
Sponsored-by: TrueNAS
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18312
[clang] Fix alias declaration fix-it location for token-split '>>' (#184555)
Fixes #184425
When parsing an alias declaration like:
```c++
using A = X<int>>;
```
clang splits `>>` into two `>` tokens while parsing templates. In this
token-split case, `Lexer::getLocForEndOfToken` was advancing past the
already-correct expansion end location, which moved the fix-it insertion
point too far right (at `;` instead of before the second `>`).
This patch detects token-split expansion ranges and returns the
expansion end location directly after `isAtEndOfMacroExpansion`,
avoiding the extra token-length advance.
[7 lines not shown]
[SystemZ] Drop assertion against preg-def in definesCmp0Src(). (#186177)
This assertion was some kind of sanity check that there are no physreg
defining instructions between a compare with zero and the instruction
defining the compared value. This is the expected generally with calls
as they clobber CC and their outgoing preg definitions should always end
up just above the call, below any compare with zero.
However, with an inline asm that does not clobber CC this could actually
happen. As biasPhysRegExtra() will now handle any such preg def it seems
this assertion isn't that useful anymore.
[PowerPC] Update dmr builtin names (#183160)
Remove `_mma` from the following built-ins as they are not related to
MMA:
* __builtin_mma_dmsetdmrz
* __builtin_mma_dmmr
* __builtin_mma_dmxor
* __builtin_mma_build_dmr
* __builtin_mma_disassemble_dmr
AI Assisted.
[CUDA] Use monotonic ordering for __nvvm_atom* builtins (#185822)
CUDA's __nvvm_atom* builtins are expected to produce atomic operations
with relaxed ordering. However, Clang lowered tham as atomicrmw and cmpxchg
with the default seq_cst ordering. That mismatch went unnoticed because
until recently NVPTX back end was unable to lower all atomic instructions correctly,
and despite using `cst_seq` ordering in IR we ended up generating the intended
PTX instructions with relaxed ordering, It worked well enough until
https://github.com/llvm/llvm-project/pull/179553 implemented correct NVPTX
atomic lowering.
That, in turn, caused severe performance regression for the code that
relied on these builtins.
Thanks to @akshayrdeodhar for figuring out what happened.
Switching __nvvm_atom* builtins to generate atomic instructions with
monotonic ordering matches the expected semantics of the builtins,
and restores performance of the generated code.
See:
https://github.com/llvm/llvm-project/pull/179553#issuecomment-4035193968
import ports/devel/jupyter-console, ok tb@
A terminal-based console frontend for Jupyter kernels. This code is
based on the single-process IPython terminal.
[lldb][Process/FreeBSDKernelCore] Add assertion for pcb (#183969)
pcb layout is not stable yet so it can be changed anytime on FreeBSD
side. Changes to pcb might not be reflected to FreeBSD source tree or
upstream LLDB possibly because the developer forgot to do so, which
breaks kernel debugging functionality. This patch adds assertion thus
LLDB cannot be built if its expected pcb layout doesn't match the real
one. This assertion is only enabled when the build machine architecture
matches `RegisterContextFreeBSDKernelCore_<arch>`.
Due to identifier conflict, I had to lower PCB_FP and PCB_LR.
---------
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
tcp: make sack_filter.c compilable without _WANT_TCPCB
This file can be compiled as a standalone program for debugging purposes.
Achieve that without exposing hack from tcp_var.h that is destined for
removal.
netinet: remove _WANT_INPCB and _WANT_TCPCB
These were hacks since FreeBSD 12 that provided some transition period for
utilities to migrate from reading kernel memory via kvm(3) to sysctl(3)
based APIs. The transition period is over.
systat: remove kvm(3) support for -netstat mode
The kvm(3) mode was actually non-functional since FreeBSD 8 for kernels
with VIMAGE, since FreeBSD 12 for the GENERIC kernel and since FreeBSD 14
for all kernels. The reason for that is that systat(1) tried to lookup
symbol "tcb" to check if kvm(3) is working. The symbol no longer exist in
the kernel.
A side effect was that systat(1) lost true kvm(3) support for all other
modes, e.g. -swap or -pigs. The tool was still working, but libkvm was
just a shim to sysctl(3) API.
So, contrary to what the header line says, this change actually restores
the kvm(3) support for other modes. Now we read the "allproc" symbol.
This was the last tool that abused _WANT_INPCB.