[libc] Reland %lc support in printf (#176110)
Add support for %lc in printf by calling internal wcrtomb function and
relevant end-to-end sprintf test.
Additionally, made the following changes:
- Modified printf parser for recognizing length modifier
- Added two internal error codes.
- Added a flag to disable wchar support on windows platform.
- To keep printf interface header only, converted wcrtomb and
CharacterConverter to header only implementation and removed the cpp
source.
Resolves GPU libc issues in #169983 and original issue: #166598
---------
Co-authored-by: shubhe25p <shubhp at mbm3a24.local>
Co-authored-by: Joseph Huber <huberjn at outlook.com>
Refresh alias cache before updating static routes. Fix #16407
The code which updates static routes relies on a global alias variable to
determine what changes are needed. Once an alias is updated the global
variable must be refreshed so route changes reflect the latest config.
Also include "network" aliases when detecting static route aliases.
[LLDB] Close previously opened handles in `PseudoConsole` (#176775)
In
https://github.com/llvm/llvm-project/pull/175837#issuecomment-3749408432
I mentioned that any handles that were previously opened and haven't
been closed since, won't be closed in the destructor nor in
`OpenPseudoConsole`.
In this PR, I added `Close` calls to these methods. Calling `Close()` is
a no-op if the handles are invalid.
AArch64/GlobalISel: Use LibcallLoweringInfo in utils (#176946)
Wire up the boilerplate to get the query for bzero from
LibcallLoweringInfo instead of TargetLowering.
astro/osmium-tool: Upgrade to v1.19.0
ChangeLog: https://github.com/osmcode/osmium-tool/blob/master/CHANGELOG.md
Added
* Add integration tests for show command output formats.
Changed
* Switch to C++17 as minimum requirement.
* Use std::back_inserter instead of boost::function_output_iterator removing
one dependency on Boost.
* Various small fixes and code cleanups.
Fixed
* Fix ID comparison in osmium merge to match osmium sort behavior.
* Extract in "simple" mode: Check all nodes in a way for overlap with the
[3 lines not shown]
[Offload] Cast to `void *` in the debug message (#177019)
There are a few places where data types based on character array or
string are printed in the debug message while they do not represent
strings. Such expressions should be casted to `void *` unless they
represent actual strings. Change also includes casting from integral
type to pointer type when appropriate.
Zstd: Document update policy
Add the Zstd update policy to the subtree README.
Also update the documented location of zstd-in.c to match upstream
changes, and normalize naming from 'ZSTD' to 'Zstd'.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18089
Zstd: Restore SPDX license identifiers
When updating Zstandard to version 1.5.7 the SPDX license identifiers
were lost. This commit restores them.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18089
Zstd: Fix ASan poisoning for pooled Zstd contexts
The Zstd context mempool can reuse buffers that were previously poisoned
under AddressSanitizer, leading to false-positive use-after-poison reports
during zloop and other stress tests.
Explicitly unpoison memory when handing buffers out to Zstd and poison the
user-visible region again when buffers are returned to the pool. This makes
the allocator ASan-correct while preserving existing pooling behavior.
Also fix non-standard void * pointer arithmetic in zstd_free() and remove an
early return in zstd_dctx_alloc() so kmem_type/kmem_size are always set on
pool hits.
This only affects ASan bookkeeping in user space, does not change runtime
behavior in non-ASan configurations, and does not affect on-disk formats.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18089
Zstd: Integrate v1.5.7 into the ZFS build system
This commit builds on the previous zstd library update and adds the
necessary ZFS integration and build system changes required to make
zstd 1.5.7 compile and function correctly.
Changes:
- Add zstd_preSplit.c (new in 1.5.7) to all build systems.
- Enable x86_64 assembly in userspace (huf_decompress_amd64.S).
- Disable assembly in kernel for RETHUNK/IBT compatibility.
- Disable intrinsics in kernel for EL10 x86_64-v3 baseline.
- Disable tracing in kernel builds for AArch64 compatibility.
- Fix ZSTD_isError symbol renaming with __asm__ directive.
- Rename abs64 to ZSTD_abs64 (FreeBSD kernel conflict).
- Fix bitstream.h attributes (MEM_STATIC -> FORCE_INLINE_TEMPLATE).
- Remove xxhash.c from BSD build (now header-only).
- Update symbol names in zstd_compat_wrapper.h.
- Ignore checkstyle for zstd-in.c.
[6 lines not shown]
Zstd: Update bundled library to v1.5.7 without further adjustments
This commit only replaces the bundled source and does not include any
ZFS integration changes. Because the build depends on integration
adjustments, it will fail until the accompanying integration commit is
applied.
Upstream release: https://github.com/facebook/zstd/releases/tag/v1.5.7
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18089
[LV] Check if VPlan contains FindLast reduction directly (NFC).
Directly check the VPlan to see if there are any FindLast reductions.
Currently this is NFC, but checking in the VPlan is more future proof,
e.g. if reductions are simplified, removed or transformed. Then checking
in legacy LoopVectorizationLegality is inaccruate.
[MLIR][XeGPU]: Reject `tensor_desc` types with unknown bitwidth (#173922)
Fixes https://github.com/llvm/llvm-project/issues/173851
1. Only allow XeGPU_ScalarType element types in `xegpu::TensorDescType`
(via verifier, keeping mlir::Type params in api)
2. Fix `VectorToXeGPU` to prevent vectors with invalid TensorDescType
element types from lowering
[LoopUnroll][NFC] Simplify recent block frequency tests
Refactor a number of recent tests in
`llvm/test/Transforms/LoopUnroll/branch-weights-freq` to make it
easier to understand and extend them.
The changes mostly resemble the refactoring I recently did in
PR#165635 in response to reviewer comments:
- For each case (e.g., each `-unroll-count` value in
`unroll-epilog.ll`), group all FileCheck directives together. That
way, while digesting a single case, the reader does not need to sift
through all other cases and a complex FileCheck prefix scheme.
- Reduce CFG testing. Drop many FileCheck directives that check for
all basic block labels and branches, and drop the cryptic
`-implicit-check-not` that excludes others. Instead, just use
positive checks for every loop body (represented by `call void @f`),
for relevant metadata, and for the branch instructions to which the
metadata is attached, and use simple negative checks (e.g.,
`-implicit-check-not='!prof'`) to be sure we have not missed any.
[4 lines not shown]