[clang][lex] Cache stat failures in `-Wshadow-header` (#215962)
The `-Wshadow-header` warning introduced in
https://github.com/llvm/llvm-project/pull/162491 gets enabled by
`-Weverything` and causes `O(H*I*S)` extra `status()` syscalls (where H
is the number of included headers, I is the average number of inclusions
per header, S is the number of search paths). This is caused by
proactively probing search paths even after finding a suitable header,
and calling `FileManager` with `CacheFailure = false`.
There's no reason to not cache the non-existence of header files during
these probes. This PR starts caching these, bringing down the complexity
to `O(H*S)` and adds a regression test.
(cherry picked from commit 5fa5caa0f2f768af54087a3df749990c41c18a04)
[clang][LoongArch] Match GCC ABI handling of integer complex types (#215222)
GNU integer complex types such as `_Complex unsigned char` and `_Complex
unsigned short` were incorrectly recognized as eligible floating-point
ABI aggregates by `detectFARsEligibleStructHelper`. When used as a
member of a structure, this caused the real and imaginary parts to be
expanded into separate general-purpose argument registers.
Integer complex types are not floating-point complex types and should be
handled as ordinary aggregates. Restrict the complex-type expansion path
to elements with real floating-point types, allowing small integer
complex aggregates to be packed into a single general-purpose register,
consistent with GCC.
Fixes #214810
(cherry picked from commit 70998dbeda3a9f29b38af26e5256feeeeb20acea)
[llvm][object][GOFF] refine Global flag conditions (#211632)
Currently when iterating across the symbol table with the object library (in tools like nm/ar), some symbols that we wouldn't expect to be Global to the binder get flagged as SF_Global. With GOFF, we should exclude ESD entries who's type or binding scope make them unavailable for binder to use at Global scope.
The implementation currently only filters the Section binding scopes when setting the Global flag, so this change adds filters for SD/ED type records and Module scope as well (which restricts the def to only the current module).
We also add a test that checks ESD records for various types and binding strengths to see that we get the expected values.
(cherry picked from commit 3873a4da50256649d4be843aea172fd6507aa2e8)
[AArch64] Fix cost of vector shifts with non-uniform constant amounts (#214206)
Non-uniform constants use variable shifts and require materializing the
shift vector. Account for a shift and materialization per legalized vector.
net-mgmt/monitoring-plugins: Remove sudo from check_mailq
Fixes error:
/usr/local/libexec/nagios/check_mailq
Global symbol "$sudo" requires explicit package name (did you forget to declare "my $sudo"?) at /usr/local/libexec/nagios/check_mailq line 580.
Execution of /usr/local/libexec/nagios/check_mailq aborted due to compilation errors.
Upstream removed sudo for check_mailq completely in version 3.0.3.
Changes: https://github.com/monitoring-plugins/monitoring-plugins/releases/tag/v3.0.3
PR: 297472
(cherry picked from commit 584c15e5a78c722e7aa3ebcb02f6c92d16513166)
net-mgmt/monitoring-plugins: Remove sudo from check_mailq
Fixes error:
/usr/local/libexec/nagios/check_mailq
Global symbol "$sudo" requires explicit package name (did you forget to declare "my $sudo"?) at /usr/local/libexec/nagios/check_mailq line 580.
Execution of /usr/local/libexec/nagios/check_mailq aborted due to compilation errors.
Upstream removed sudo for check_mailq completely in version 3.0.3.
Changes: https://github.com/monitoring-plugins/monitoring-plugins/releases/tag/v3.0.3
PR: 297472
[mlir][spirv] Mark in-bounds linearized indices no-wrap (#215834)
Preserve signed and unsigned no-wrap guarantees for statically bounded
SPIR-V index linearization, allowing buffer address arithmetic to be
reassociated safely.
[DAGCombiner][AArch64] Fix the multiplier when folding a partial reduction of a mask (#215187)
foldPartialReduceAdd synthesises the reduction's multiplier at the
operand's type. At i1 a splat of 1 is all ones, which sign extends to
-1, so the signed forms compute (-1) x (-1) = +1 per lane and sum to +n
where sum(sext(mask)) must be -n.
```llvm
%cmp = icmp eq <16 x i8> %a, %b
%sext = sext <16 x i1> %cmp to <16 x i32>
%r = call <4 x i32> @llvm.vector.partial.reduce.add(<4 x i32> %acc, <16 x i32> %sext)
```
-mattr=+neon sums to -n:
```
cmeq v1.16b, v1.16b, v2.16b
sshll v2.8h, v1.8b, #0
sshll2 v1.8h, v1.16b, #0
[23 lines not shown]
[AArch64] Do not allow anyext load in isEquivalentMaskless (#216288)
isEquivalentMaskless tries to prove that the `and` in `cmp(and(add(x,
C1), 0xff), C2)` is redundant and can be removed, providing that the
input x is know to be a sext or zext. AFAICT it should not apply to
anyext, which could take any value.
Fixes #215839
arm64 vfp: eliminate nested critical sections
At two out of three call sites to vfp_restore_state_common(), the caller
must use critical_{enter,exit}() to prevent preemption between its call
to vfp_restore_state_common() and other actions, notably its call to
sve_enable(). So, it is arguably better to make
vfp_restore_state_common()'s caller responsible for performing
critical_{enter,exit}() and simply perform CRITICAL_ASSERT() inside
vfp_restore_state_common().
Reviewed by: kib, markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D58859