[MLIR][NVVM] Remove the `nvvm.barrier0` op (#195608)
This PR removes `nvvm.barrier0` because it is a duplicate op.
`nvvm.barrier` can cover its functionality and more.
`nvvm.barrier0` was added historically. It is confusing to maintain it
right now.
[libc] Add wchar support to File (#189504)
This PR adds support for wide character operations such as read, write,
and ungetwc to the File class. It also adds tests but does not yet add
entrypoints, that will be done in a followup.
Assisted by Gemini
NAS-140892 / 27.0.0-BETA.1 / Expand usage of atomic_write and truenas_os (#18888)
This commit expands the use of atomic_write across many areas of the
product where we were basically hand-rolling the same.
Some subprocess calls in the system dataset plugin are also
opportunistically replaced with syscalls to OS fd-based mount and
unmount interfaces.
[CIR] Introduce cir.construct_catch_param (#195283)
Add a new CIR operation, `cir.construct_catch_param`, which abstractly
represents the target-specific operations that must performed before
`cir.begin_catch` to bind an in-flight exception object to the local
alloca for a catch parameter.
Generation and lowering of this operation is deferred to follow-up
changes.
Assisted-by: Cursor / claude-opus-4.7-thinking-xhigh
[CIR] Implement devirtualized member function calls (#195106)
Implement the devirtualization logic in
emitCXXMemberOrOperatorMemberCallExpr that was previously guarded by
MissingFeatures::devirtualizeMemberFunction(). This enables the compiler
to emit direct calls instead of virtual dispatch when the dynamic type
can be statically resolved (e.g., final classes, local variables of
known type).
This fixes the 'devirtualized destructor call' errorNYI in
CIRGenExprCXX.cpp, which is point 5 of #192330.
The implementation follows OGCG: use getDevirtualizedMethod() to check
if devirtualization is possible, then getCorrespondingMethodInClass() to
find the target method. For destructors, use getAddrOfFunction() instead
of getAddrOfCXXStructor() since the devirtualized callee may differ from
the original.
Fixes point 5 of #192330.
Supported by : Claude Opus4.6 High
[asan] Print standalone partial granules in poison_history_size (#195723)
Currently, `poison_history_size` only reports the poisoning stack trace
if the shadow value is exactly `kAsanUserPoisonedMemoryMagic`.
Unlike heap or stack poisoning, where red-zones
guaranteed, user poisoning more likely end-up with
single standalong granule. Printing history could be helpful.
Merge https://github.com/llvm/llvm-project/pull/195670 into main.
clang: Use Triple::isCompatibleWith to match OpenMP arguments
Previously this was performing an exact string comparison
of the triple. Use the triple predicate so that in the future
amdgpu triples without a subarch will be considered compatible
with triples that do. This preserves compatibility with existing
uses without a subarch.
Note that if you swap the triples, there's an assert in
buildCompilerRTBasename but this appears to be a pre-existing
issue I can reproduce without the patch (but I can't reproduce
on godbolt for some reason).
[MLIR][DebugInfo][test] Add missing DISubprogram type (#195720)
Needed after #194556, and #195321 missed out on the cleanup since it was
still in review.
[asan] Print standalone partial granules in poison_history_size (#195670)
Currently, `poison_history_size` only reports the poisoning stack trace
if the shadow value is exactly `kAsanUserPoisonedMemoryMagic`.
Unlike heap or stack poisoning, where red-zones
guaranteed, user poisoning more likely end-up with
single standalong granule. Printing history could be helpful.
linuxkpi: Implement `module_*()` APIs as static functions
This fixes an "unused variable" warning when building DRM drivers.
Reviewed by: emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56780
NAS-140747 / 25.10.3.1 / add datasetTable OID (#18898)
This is a cherry-pick of
https://github.com/truenas/middleware/pull/18777 applied to this repo
per request from support team. Tested and works as intended.
[CodeGen][test][NFC] Quote the llc `-passes` arg (#195707)
The arg
`-passes=mir-debugify,function(machine-function(machine-sink)),mir-strip-debug`
only works w/ the lit built in shell, it causes problems when using a
shell to evaluate this command (e.g. `syntax error near unexpected token
'('`)
[Darwin][Clang][PGO] Pass CSPGO related flags to ld when using libLTO.dylib (#195020)
Context-sensitive PGO is currently broken when using libLTO.dylib with
ld on Darwin.
1. `Config.RunCSIRInstr` was not set, and was always false.
2. `ThinLTOCodeGenerator::optimizeModule` always passes an empty
PGOOptions.
3. CSPGO flags were only passed for LLD. Now pass to the linker with
`-mllvm` prefix.
[libc] Add sys/stat syscall wrappers (#195295)
Added ErrorOr-returning syscall wrappers for chmod, fchmod, fchmodat,
mkdir, mkdirat, and statx in
src/__support/OSUtil/linux/syscall_wrappers/. Migrated the sys/stat
Linux entrypoints to use them.
Added hdr/types/struct_stat.h proxy header. Updated stat, lstat, fstat
to use it, and kernel_statx to use the new statx wrapper.
Fixed fchmodat CMakeLists.txt to reference fchmodat.h (was fchmod.h).
Updated test dependencies to use hdr/sys_stat_macros.