[LV] Give each RUN line in smax-idx.ll its own check prefix (NFC). (#220210)
The three RUN lines share the CHECK prefix, which only works while all
three VF/IC configurations produce identical output. This fixes the
dropped checks for smax_idx_max_no_exit_user.
While touching the file, also modernize the naming a bit, to be more
uniform with existing tests.
[IVDescriptors] Implement MonotonicDescriptor
RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442
"Monotonic" variable is similar to induction variable, but its value is updated under some condition, e.g.:
```
int idx = 0;
for(int i = 0; i < n; ++i) {
// some uses of idx
if (cond)
++idx;
}
```
In this example, `i` is induction variable and `idx` is monotonic variable: it's updated only when cond == true. In LLVM IR, this looks like:
```
loop_header:
%monotonic_phi = [%start, %prehader], [ %chain_phi0, %latch]
step_bb:
[26 lines not shown]
[lldb] Add Guarded<T, Mutex> to Locked.h (#219421)
LLDB's code base has many variables that have an associated mutex that
needs to be locked to safely access that variable from multiple threads.
However, this locking scheme is currently not enforced by the compiler
and code sometimes accesses these variables without aquiring the
respective mutex first.
This patch introduces a `Guarded` class that strictly enforces that some
memory is only accessed after the respective mutex has been aquired.
This class hands out `Locked` objects for every access which guarentee
that the mutex is held as long as the variable is in scope.
[Verifier] Diagnose local scope chains that miss their DISubprogram
visitFunction() resolved a DILocation's subprogram via
DILocalScope::getSubprogram(), which recurses through
DILexicalBlockBase::getScope() and casts each parent to DILocalScope.
A DILexicalBlock parented to a non-local scope, such as a DIFile,
therefore aborted the verifier before visitDILexicalBlockBase could
report "invalid local scope".
[C++20] [Modules] Profiling the lambda call operator only (#220203)
Close https://github.com/llvm/llvm-project/issues/220187
The root cause of the problem is that during the deserialization process
some of the implicit functions are out of sync. They will be the same in
the end. But at the point of profiling, they are different.
This patch fixes this by profiling the explicit lambda call only, which
should be correct too. This was the intention of
CXXRecordDecl::getLambdaCallOperator(), but we didn't use it due to
deserialization ordering issues.
[LV] Vectorize fmin/fmax reductions (#198300)
Teach LoopVectorize to recognize fmin/fmax reductions. This patch only
supports reductions of this kind which have the FP `minimum/maximum` and
`minimumnum/maximumnum` semantics.
databases/couchdb3: Resolve bundled OTP versions dynamically in PLIST_SUB
The release bundles erts and 13 OTP applications from
lang/erlang-runtime28, and pkg-plist pinned each of their versioned
directory names. Six of the last eight plist commits were pure OTP
rename churn, the largest touching 610 lines, while the 3.5.2 update
itself touched 23.
Derive the versions from the installed runtime at plist-generation time
instead. The package file list is unchanged: resolving the tokenized
plist with the versions this build staged reproduces the previous
pkg-plist byte for byte, so no PORTREVISION bump is needed.
An erlang-runtime28 update now needs only a PORTREVISION bump. Note
this reads ${LOCALBASE}/lib/erlang28 rather than the staged release,
because generate-plist runs before do-install; it holds as long as the
release copies erts and the OTP applications unmodified.
CouchDB's own rebar dependencies stay pinned deliberately - they move
[4 lines not shown]
[AArch64][GlobalISel] Regenerate knownbits tests. NFC (#220200)
Mostly just adding IsKnownNeverZero. knownbits-srem.mir now has auto
generated check lines.
math/scilab-toolbox-swt: 0.3.3
Update to release of January 9, 2025.
https://atoms.scilab.org/toolboxes/swt/0.3.3
Postponed expiration as upstream seems active and math/scilab was undeprecated.
But as nobody noticed when the port was broken I doubt we have any users of this.
If you use this, please speak up and mail the maintainer.
Depend on fortran to fix: (fortran was indirectly pulled in by the dependency on math/scilab)
====> Running Q/A tests (stage-qa)
Error: /usr/local/share/scilab/contrib/swt/sci_gateway/c/libswt_c.so is linked to /usr/local/lib/gcc14/libgfortran.so.5 from lang/gcc14 but it is not declared as a dependency
Error: /usr/local/share/scilab/contrib/swt/sci_gateway/c/libswt_c.so is linked to /usr/local/lib/gcc14/libquadmath.so.0 from lang/gcc14 but it is not declared as a dependency
Remove REINPLACE_CMD for:
====> Running Q/A tests (stage-qa)
Warning: Possible REINPLACE_CMD issues:
- - REINPLACE_CMD ran, but did not modify file contents: sci_gateway/c/swt_common.h
Approved by: no maintainer
[VPlan] Expand AddRecs in Plan's entry (#209921)
Extend VPSCEVExpander to expand AddRecs in the Plan's entry. In the
general case, an AddRec's loop header refers to a BasicBlock that is no
longer in the Plan, and we have to fall back to the IR SCEV expander.
However, when the Plan's entry has a canonical IV that we can re-use as
a VPIRPhi, expand the AddRec to VPInstructions.
Add support for DebugLexicalBlock. (#217965)
Emit
[DebugLexicalBlock](https://github.khronos.org/SPIRV-Registry/nonsemantic/NonSemantic.Shader.DebugInfo.html#DebugLexicalBlock)
for LLVM DILexicalBlock and DINamespace.
This also lets module-scope debug entities (globals, typedefs,
functions, composites) reference a lexical parent instead of always
choosing the compilation unit.
Summary of changes:
1. Collect DILexicalBlock / DINamespace and keep track of their relative
order for later emission.
2. Emit namespace scopes as DebugLexicalBlock before DebugFunction so
namespace-scoped functions and globals can use them as Parent.
3. Emit IR-function-body DILexicalBlock scopes as DebugLexicalBlock
after DebugFunction so these DebugLexicalBlock can properly reference
their parents.
4. Update the already-existing parent scope handling in other opcodes to
use the new data available.
[clang][analyzer] Fix false positive in StdLibraryFunctionsChecker for mmap with MAP_ANON (#219568)
On Darwin,`mmap(2)` acccepts a Mach VM tag encoded in the fd argument
when `MAP_ANON` is set; the encoding is done using `VM_MAKE_TAG(tag)`,
which expands to `(tag << 24)` and is therefore a large negative signed
value for tags >= 128.
This causes a false positive with the existing constraint, which
restricts `fd` to be >= 1, when code uses a `VM_MAKE_TAG` value as the
`fd` argument. The fix here is to eliminate the false positive by
omitting the `fd` constraint on Darwin targets, because it can't be
expressed as a simple range. This does give rise to false negatives (any
`fd` < -1 on Darwin when `MAP_ANON` is not set), but any code with such
a false negative would crash immediately when trying to use the invalid
file descriptor, rather than exhibiting some more subtle dangerous
behavior.
AI disclosure: I used Claude Sonnet 4.6 to help diagnose the original
false positive and suggest possible fixes.
rdar://185124909
[CIR][CUDA/HIP] Fix template static member filtering (#219536)
Check host/device attributes before emitting static member of template
instantiation. This is basically a CIR version of
77fd30f7ce0795b4bbc22e65b3ff42856839d708 .