[webkit.UncountedLambdaCapturesChecker] Skip template patterns while traversing (#224572)
870d762546ee taught RawPtrRefLambdaCapturesChecker to ignore a lambda
passed to a call whose callee isn't resolved yet, by enumerating the
expressions that appear in a template pattern in place of a resolved
call: an OverloadExpr, a CXXDependentScopeMemberExpr or a
DependentScopeDeclRefExpr as the callee, a CXXUnresolvedConstructExpr,
and a type-dependent ParenListExpr or InitListExpr.
That list can only ever be approximate. A call through an object of
dependent type, as in
template <typename T> void f(T& callable) {
RefCountable* obj = make_obj();
callable([obj] { obj->method(); });
}
has a plain DeclRefExpr to the parameter as its callee, so none of the
cases matched and the lambda was reported even when the instantiation
[14 lines not shown]
bsnmp: validate the lower bound of error_index in responses
Check if the response's error_index is within a sane interval.
Otherwise, a rogue peer could crash us.
PR: 298222
Reported by: Robert Morris
Reviewed by: markj
Discussed with: secteam (markj)
MFC after: 2 weeks
Analyzed with: Claude Code Opus 5
[ConstraintElim] Cache decompositions to avoid compile-time blow-up. (#225207)
With the recent improvements to isKnownNoWrap, we now can call decompose
again on (sub-) expressions multiple times for a given query.
In some cases, this can lead to exponential compile-time increases, as
as each decompose sub-call can lead to many more repeated decompose
calls via isKnownNoWrap.
For the test case in the patch, compile-time without the patch is > 250s
on my system, vs < 0.5s with the patch.
The caching is mostly beneficial to avoid exponential compile-time, and
does not translate to compile-time improvements in
https://llvm-compile-time-tracker.com/compare.php?from=150f8999285d07bdebc6a73dfdeae520dbdf1468&to=5f64294359fb513d62e257e95988779b2d5b8d77&stat=instructions:u.
Note that mayLookThrough is needed to avoid going through the cache
unnecessarily for leave nodes. Without that bypass, I measured a
[6 lines not shown]
[lldb/Interpreter] Report scripted hook failures to the user (#225292)
A scripted hook whose Python implementation failed reported nothing. The
error exists: `Dispatch` has returned it since #224988, but none of the
three call sites put it anywhere the user could see it:
- `Target::StopHookScripted::HandleStop` logged to LLDBLog::Target,
which is off unless you already know to `log enable lldb target`.
- `Target::HookScripted::HandleStop` consumed the `Expected` with no log
at all.
- `HandleModuleLoaded`/`HandleModuleUnloaded` had no error channel, so
the Python interface could only log and carry on.
This gives the two module callbacks an `llvm::Error` return, and route
all three through `ReportScriptedHookError`, which formats via a
`CommandReturnObject` whose immediate streams both point at the hook's
output stream, the same thing `StopHookCommandLine::HandleStop` already
does for a failing command. That gets the standard `error: ` prefix and
keeps the message interleaved with whatever the hook printed.
[16 lines not shown]
[SLP]Keep splat subtree load roots in memory order
The roots have no users and the gathers reuse their lanes by value, but
the group or reordering-pass order added a reorder shuffle and non-free
extracts, so the profitable vector load was dropped.
Fixes the perf regression from #221717.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/225527
[NFC][compiler-rt][hwasan] Avoid variable length array warning in test (#225497)
Replace the non-constant array size expression for the static buffer
with a fixed size.
Assisted-by: Gemini
[AMDGPU] Fall back for FP8-to-half conversions without native support
The custom v2i8 source action also handles half results on gfx950, which
has native OCP FP8-to-f32 conversions but lacks FP8-to-f16 instructions.
Converting FP8 vectors to half therefore reached lowerFromFP8 and asserted
that FP8F16ConversionInsts was available.
Use generic legalization for half results when the subtarget lacks the
required instructions. Preserve native f32 conversions and native f16
conversions on targets that support them.
Add gfx950 regression coverage for both OCP encodings, including vectors
that widen or split into pairs, and check that native f32 instructions
remain selected.
[MachineOutliner] Preserve debug locations on outlined call sequences (#224189)
Machine Outliner replacement call sequences currently have no DebugLoc.
When one immediately follows another call, its address can be emitted
with DWARF line 0, meaning “unknown source location,” so symbolication
finds the function but not the source line.
Copy the first usable source location from each candidate to its
replacement call sequence, including any target-inserted save and
restore instructions. If none exists, leave the sequence locationless.
This matches the IR Outliner’s policy: preserve each replacement call’s
location while leaving the shared outlined body locationless because it
represents multiple source regions.
libdvdread: add pkg-config to USE_TOOLS
Library failed to link when dvdcss option was set. Fix is to
add pkg-config to USE_TOOLS, as suggested by Taylor Campbell.
[CIR] Fixup 'zero' branch of Null Initialization (#225490)
The zero branch has a test for an NYI based on whether the thing is a
VLA or not. However, classic codegen uses 'dyn_cast_or_null', and we
used 'isa', so a nullptr caused an assert. This patch fixes it.