[analyzer] Check the nonnull annotation first for parameters in NullabilityChecker (#245167)
NullabilityChecker checks on every dead-symbol callback (and before
reporting) whether the nonnull preconditions of the current function are
violated. checkParamsForPreconditionViolation computed the lvalue of
every parameter, i.e. looked up its VarRegion, before checking whether
the parameter is annotated _Nonnull, which it rarely is. Check the
annotation first.
On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 0.3-0.4% and the
cycles by 0.7-1.2%.
Assisted-by: Claude Opus 5.5
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[clang] Suppress -Wuninitialized for unevaluated builtin args (#217816)
CFGBuilder leaves the arguments of `__builtin_object_size` and
`__builtin_dynamic_object_size` out of the CFG because they are never
evaluated. Use `CallExpr::isUnevaluatedBuiltinCall` instead, which
checks the
`UnevaluatedArguments` attribute, so the same applies to every builtin
declared
that way. `EvaluatedExprVisitor` and `-Wunsequenced` already use the
same
query.
That adds seven builtins: `__builtin_classify_type`,
`__builtin_constant_p`,
`__builtin_infer_alloc_token`, `__GetExceptionInfo`,
`__builtin_os_log_format_buffer_size`, `__builtin_amdgcn_processor_is`
and
`__builtin_amdgcn_is_invocable`. None of them depends on its arguments'
values.
[24 lines not shown]
[SandboxVec][LoadStoreVec] Address review on mixed-type loads
Rename getLanesTypeFor to getSameBitWidthType and document that a wider
scalar spans several lanes. Drop the unused LoadInst cast, explain the
test data layout, and cover a reversed vector/scalar chain plus loads
with multiple uses.
Co-authored-by: Cursor <cursoragent at cursor.com>
IDS: list rotated alert logs in rotation order (#11295)
The alert log selector listed the eve.json files sorted as text, so
with more than ten rotated logs eve.json.10 came before eve.json.2
and the dates were out of order. Sort on the rotation number instead.
[LAA] Find no dependence between non-overlapping loop-invariant accesses
A loop-invariant access touches the same bytes in every iteration, so
two of them are independent iff they do not overlap. LAA proved that
only by showing one ends before the other begins, e.g. p + 4 <=u p + 8
for a and c below, which fails unless SCEV knows the addresses do not
wrap. Otherwise it reported an unknown dependence and gave up on the
loop, so a loop that updates three or more fields of a struct through a
pointer was not vectorized:
struct trio { int a, b, c; };
void acc3(struct trio *p, const int *x, int n) {
for (int i = 0; i < n; i++) {
p->a += x[i];
p->b ^= x[i];
p->c |= x[i];
}
}
[14 lines not shown]
[HLSL][DirectX] Add IsDebuggingEnabled() (#243638)
Adds support for `bool IsDebuggingEnabled()` to Shader Model 6.10. The
function is defined in `hlsl::dx` namespace that is available only for
the DirectX target.
It uses a new built-in function `__builtin_hlsl_isdebuggingenabled`
which is translated to LLVM intrinsic `llvm.dx.isdebuggingenabled` and
lowered to DXIL operation `dx.op.isDebuggingEnabled`.
Fixes #231326
Fixes #231276
[Clang][C] Update the C DR Status page (#245339)
This updates based on the current snapshot; the issue list will be
updated again with all the issues that moved from Open to Review state
at the last meeting, but those updates will be handled in a future PR.
[OpenMP] Add __kmp_invoke_microtask assembly for SPARC (#243945)
Add an assembly implementation of __kmp_invoke_microtask for 32-bit
(V8) and 64-bit (V9) SPARC.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[hwasan] Don't use the tagging ABI in aliasing mode (#245126)
On x86_64 hosts with LAM, CanUseTaggingAbi() succeeds in aliasing mode
because it only checks the number of LAM tag bits, not their position.
LAM uses bits 57-62 while aliasing mode tags bits 39-41, so
EnableTaggingAbi() then fails and every aliasing-mode test dies with:
FATAL: HWAddressSanitizer failed to enable tagged address syscall ABI.
Aliasing mode doesn't rely on hardware tagging, so make
CanUseTaggingAbi() return false when HWASAN_ALIASING_MODE is defined.
Root-cause analysis and fix produced with AI (Claude Code).
---------
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Co-authored-by: Vitaly Buka <vitalybuka at gmail.com>
NAS-145377 / 27.0.0 / Pass the dataset of an SMB share to zfs_core (by anodos325) (#20286)
zfs_core:share_dataset lets smbd refuse a share whose dataset is not
mounted and keeps dataset auto-creation inside that dataset. It cannot
be set as an auxiliary parameter.
Original PR: https://github.com/truenas/middleware/pull/20284
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
NAS-145377 / 27.1.0 / Pass the dataset of an SMB share to zfs_core (by anodos325) (#20287)
zfs_core:share_dataset lets smbd refuse a share whose dataset is not
mounted and keeps dataset auto-creation inside that dataset. It cannot
be set as an auxiliary parameter.
Original PR: https://github.com/truenas/middleware/pull/20284
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
[llvm][Support] Mark llvm::DictScope and llvm::ListScope classes nodiscard (#231870)
Similar to #231700
I didn't find any uses of these classes that discarded the result.
[SandboxVec][LoadStoreVec] Support mixed-type load vectorization
Remove the restriction that every load in a top-level load chain must have the vector's element type. A chain of mixed types such as {i32, float} or {double, i32, i32} is loaded as a vector of integers (as chosen by VecUtils::getCombinedVectorTypeFor()), each original load is unpacked from the lanes it occupies, and then reinterpreted back to its own type with SameSizeReinterpret::reinterpretValue().
Chains involving a non-integral pointer are left alone, since such a pointer cannot be recovered from an integer lane.
SameSizeReinterpret is also used by createConstantVector() to pack constants of mixed types into a constant vector.
Co-authored-by: Cursor <cursoragent at cursor.com>
[SandboxVec][LoadStoreVec] Address review on mixed-type loads
Rename getLanesTypeFor to getSameBitWidthType and document that a wider
scalar spans several lanes. Drop the unused LoadInst cast, explain the
test data layout, and cover a reversed vector/scalar chain plus loads
with multiple uses.
Co-authored-by: Cursor <cursoragent at cursor.com>
[UniformityAnalysis] Fix missed temporal divergence when a cycle exits into another cycle (#243181)
In the current implementation of `propagateCycleExitDivergence`, the
outer-most cycle (from which temporal divergence is propagated) is found
by starting from the inner cycle, walking up its parent while the depth
of the cycle is greater than that of the exit block’s cycle.
This is only correct when every cycle (if any) that contains the exit
block also contains the branch. When the exit block is in a separate
loop, this is not correct, and can lead to mislabeling divergent
instructions as uniform - see the following example (corresponding IR in
the lit-test):
```c
void exit_into_next_loop(int n, bool c) {
int tid = workitem_id_x();
int o, i;
for (o = 0;; o++) { // outer (the actual outer-most cycle)
[19 lines not shown]
[SandboxVec][LoadStoreVec] Support mixed-type load vectorization
Remove the restriction that every load in a top-level load chain must have the vector's element type. A chain of mixed types such as {i32, float} or {double, i32, i32} is loaded as a vector of integers (as chosen by VecUtils::getCombinedVectorTypeFor()), each original load is unpacked from the lanes it occupies, and then reinterpreted back to its own type with SameSizeReinterpret::reinterpretValue().
Chains involving a non-integral pointer are left alone, since such a pointer cannot be recovered from an integer lane.
SameSizeReinterpret is also used by createConstantVector() to pack constants of mixed types into a constant vector.
Co-authored-by: Cursor <cursoragent at cursor.com>