[libc] Use a syscall wrapper for getgid (#240782)
This PR move getgid behind the centralized syscall wrappers, following
libc/docs/dev/syscall_wrapper_refactor.md.
[libc] Use a syscall wrapper for gethostname (#240781)
This PR move gethostname behind the centralized syscall wrappers,
following libc/docs/dev/syscall_wrapper_refactor.md.
[libc] Use a syscall wrapper for getppid (#240780)
This PR move getppid behind the centralized syscall wrappers, following
libc/docs/dev/syscall_wrapper_refactor.md.
[libc] Use a syscall wrapper for getuid (#240779)
This PR move getuid behind the centralized syscall wrappers, following
libc/docs/dev/syscall_wrapper_refactor.md.
[InstCombine] Simplify GEP canonicalization (#240846)
This removes a lot of the custom GEP canonicalization code and instead
reuses the logic from IRBuilder. This should be mostly NFC, though this
does allow us to handle one more edge case (vectors with elements of
overaligned type).
I've left the shouldCanonicalizeGEPToPtrAdd() logic alone for now, as
that would significantly affect the output (by using scaled ptradd).
[AArch64] Disable store-insert patterns under BE. (#240374)
The patterns from #190320 were incorrect for BE, make sure they are
disabled when not storing a 64bit element.
Fixes #240293
[LifetimeSafety] Map arguments to an explicit object parameter correctly (#240411)
For a C++23 explicit object member function the object argument binds to
`self`, getParamDecl(0), but getTrackedArgInfo mapped argument I to
getParamDecl(I - 1) as for an implicit object. A lifetimebound parameter
after `self` was ignored, lifetimebound on `self` was attributed to the
next argument, and a by-value `self` of a gsl::Pointer hit an assertion.
Add hasObjectArg, hasImplicitObjectArg and getParamForArg, and use them
wherever call arguments are mapped to parameters.
Assisted-by: Claude Opus 5.5
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[lldb][Windows] Update the decorators of aarch64 tests (#240872)
`TestPlatformConnect.py` passes on ARM64 Windows with lldb-server.exe.
Remove the XFAIL.
`TestPythonOSPlugin.py` fails on ARM64 Windows with lldb-server.exe but
not on x64. Add a special XFAIL.
This unblocks the aarch64 Windows LLDB buildbot.
Allow configured origins to read /api/versions for TrueNAS Connect
nginx answers CORS on /api/versions only when the system is registered
with TrueNAS Connect, and only for the TNC web app (plus `ng serve` on
dev and staging). A TNC client run against an unregistered system (an
ephemeral TNC stack, local development, CI) cannot read the versions, so
@truenas/api-client falls back to v25.10.0 on systems that serve newer
API versions.
* tn_connect gains `allowed_origins`, set with the private
tn_connect.update_environment. Each must be an origin exactly as a
browser sends it: https with a lowercase host name, or http to
localhost or 127.0.0.1, with an optional port and no path. Unlike the
endpoints it may change while TNC is enabled. update_environment now
reloads nginx after a write, since the endpoints and the origins both
reach its CORS maps.
* /api/versions answers CORS, with Vary: Origin, when the system is
registered or allowed_origins is not empty. Its map lists the allowed
origins and falls back to the existing $allow_origin. /_download keeps
[7 lines not shown]
[AMDGPU] Reuse the RHS known bits for self-multiply MUL_U24/MUL_I24 (#238762)
`computeKnownBitsForTargetNode` and `computeKnownBitsForTargetInstr` for
`AMDGPUISD::MUL_U24`/`MUL_I24` (and the `llvm.amdgcn.mul.u24/i24`
intrinsics)
queried the known bits of both operands. For a self-multiply both
operands are
the same value, so query the RHS first and reuse its known bits for the
LHS
instead of repeating the query.
GlobalISel additionally bailed out as soon as either operand was
unknown. That
loses information: even when every operand bit is unknown, a defined X *
X has
bit 1 clear (a square is 0 or 1 modulo 4), which
`KnownBits::mul(..., NoUndefSelfMultiply=true)` infers. Those two early
exits
are removed, so GlobalISel now infers this (and everything a known LHS
[8 lines not shown]
[clang][test] Added regression test for #36907 (#240787)
Closes #36907
this adds regression test coverage to ensure that evaluating delayed
noexcept specifiers on member function pointers
[SROA] Fix an error where SROA can leave "dead" allocas (#238897)
SROA may fully replace allocas with their constituent parts, but in some
cases it can leave behind "dead" allocas that have only droppable uses. The
leftover allocas are can retain debug information conflicting with the debug
information for the partitions they were split into, which may lead to assertions
failures.
This patch removes such "dead" allocas.
Fixes https://github.com/llvm/llvm-project/issues/238154
Let zfs rewrite -W skip only blocks that a rewrite would keep
zfs rewrite -W skips blocks whose allocated size would not change, so
that a rewrite after a RAID-Z expansion can be run again without
rewriting the same blocks twice. It also skips blocks that a rewrite
would change in other ways: after the compression, checksum, copies,
dedup or special_small_blocks property of a dataset changes, the
blocks written before keep their size and are skipped. After an
expansion, it leaves in place the blocks that take the same space at
the new width, and they split the space freed around them.
Skip a block only when a rewrite would leave it as it is: compare the
block pointer with the properties that dmu_write_policy() gives a write
of the file now, the class of each DVA with the one that
spa_preferred_class() would choose (moved into spa_class_select(), with
no functional change), and, on a RAID-Z vdev, the logical width at the
block's physical birth with the width in the txg of the rewrite. A
block on a vdev that takes no allocations, or is being removed, is
rewritten.
[15 lines not shown]
[mlir][ODS] Include headers declaring used type and attribute constraints (#240449)
#236155 added `cppIncludes` to traits and interfaces so that generated
declarations include the headers of the traits they use.
Extend `cppIncludes` to type and attribute constraints. It lists the C++
headers declaring the C++ classes a constraint refers to. A single
header is not always enough: e.g. `TypeAttrOf<T>` needs
`BuiltinAttributes.h` and the header of `T`. Generated op
declarations now include the headers of the constraints of their
operands, results and attributes, and generated attribute and type
declarations include the headers of attribute and type parameters.
The builtin type and attribute constraints and the builtin dialect
attributes, types and locations set their headers, as do the base
classes of dialect attributes and types.
Co-authored-by: Claude <noreply at anthropic.com>
[OpenMP] Use device scope for atomic constructs on the device
OpenMP 6.0, 17.8.5 specifies that "The memscope clause determines the
binding thread set for an atomic region. If the memscope clause is not
present, the behavior is as if the memscope clause appeared on the
construct with the device scope-specifier."
Thread the sync scopes through codegen amd also add a release note
because this is changing existing behavior.
Existing behavior was overly cautios for OpenMP 5.2, too, though. The
atomic construct never specified the option of having system-level
scope. This only came with the memscope clause and it's "all"
scope-specifier.
Claude assisted with this patch.
[SandboxVec][DAG][Scheduler] Combine erase instr callbacks (NFC) (#240678)
Call the scheduler's erase instruction callback from within the DAG
callback. This is a step towrads simplifying the DAG maintenance logic.
[OpenMP][clang] Apply atomic options to atomic compare
Thread denormal mode, fine-grained memory and remote memory options
through for atomic compare directivs.
Claude assisted with this patch.
[SystemZ] Port LongBranch to NewPM
Standard NewPM pass porting. Also note that the CFG is preserved in the
LegacyPM.
Reviewers: JonPsson1, uweigand
Pull Request: https://github.com/llvm/llvm-project/pull/240598
delete: refuse a path which does not fit when scheduling a directory
The name was copied with strlcpy() into a MAXPATHLEN buffer and then
extended with a slash without checking the result, so a long path was
silently replaced by a truncated one. A path without any slash made the
trailing strrchr() dereference NULL.
register: report a path which does not fit instead of crashing
pkg_absolutepath() returns NULL when the path does not fit in the
MAXPATHLEN buffer it fills, and the three callers ignored it, so
xstrdup(NULL) crashed the manifest parser as soon as a manifest listed a
directory, a file or a configuration file whose path is that long.
delete: strip the leading slashes with RELATIVE_PATH()
The code assumed that a package path and the package prefix both start
with exactly one slash and skipped that character by hand, which pointed
past the terminating NUL for an empty prefix and kept a path absolute
when it started with two slashes.