[lldb] Skip the prologue before reading `this` when stepping into std::function (#209629)
Commit 40152b8 broke CPPLanguageRuntime::GetStepThroughTrampolinePlan by
changing operator() from a multi-line function to a single line
function.
This used to work by accident, because the fallback step-in plan first
advanced past the prologue and the trampoline detection was re-invoked
there with a valid `this`. Once operator() became a one-line inline
definition that intermediate step no longer happened.
Run past the prologue when stopped at the function entry and let the
step-through machinery re-invoke the plan, so the thread plan has a
valid `this` to read from.
18241 tests: vdev_zaps_007: log_must with > must eval
Reviewed by: Gordon Ross <gordon.w.ross at gmail.com>
Reviewed by: Andy Fiddaman <illumos at fiddaman.net>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Dan McDonald <danmcd at Edgecast.io>
18207 Fix the integer type in zfs_ioc_userspace_many()
Reviewed by: Gordon Ross <gordon.w.ross at gmail.com>
Reviewed by: Andy Fiddaman <illumos at fiddaman.net>
Approved by: Dan McDonald <danmcd at edgecast.io>
[AArch64] Lower fixed width bf16 fpround (#209411)
Similar to #209194, this was previously hitting an error with an illegal
FP_ROUND_MERGE_PASSTHRU. This time we lower the fptrunc to a scalable
fptrunc and let it legalize naturally. On SVE systems a f64->bf16
fptrunc will fail to legalize, but lowers successfully with sve2 with
fcvtn. A store(fptrunc) -> truncstore combine was disabled too as it
fails with bf16.
[libcxx] Mark test unsupported in clang-24 (#209794)
After the version bump, we started seeing this test fail. For now mark
it unsupported in newer LLVM versions, until the underlying issue can be
addressed. More details can be found in #209787.
[ConstraintElim] Try to get induction step/start/flags from IR (NFC-ish) (#209284)
Handle the common integer inductions where the increment is plain add
PN, C by looking at IR instead of querying SCEV. There's effectively no
re-use between SCEV expression created in ConstraintElimination, and
handling simple cases in IR can avoid unnecessary, expensive SCEV
queries.
Should be NFC-ish. We miss trivial folding of the start value (see
regressed test), but that should not happen in end-to-end pipeline.
Improves compile-time for some workloads, ClamAV, mafft:
https://llvm-compile-time-tracker.com/compare.php?from=b8ba3c2b72cb53268129bbecfeb4ba7ec5b8d831&to=2bede223d3ec3ed6e2e9654b635258c50e4e90df&stat=instructions%3Au
I am working on follow-up changes that will handle more cases, where
avoiding unnecessary queries will be more important.
PR: https://github.com/llvm/llvm-project/pull/209284
[compiler-rt] Fix asan_interceptors.cpp build warning -Wunused-template (#209750)
mmap_interceptor/munmap_interceptor template functions are instantiated
in sanitizer_common_interceptors.inc only under `#if
SANITIZER_INTERCEPT_MMAP`. Fix `unused function template
'mmap_interceptor'` warning on Windows, which is error under -Werror.
[msan] Handle AVX512 fpclass (floating-point classification) for packed double/float (#209652)
Each bit of the classifier constant specifies whether a particular
classifier is enabled. If Classifiers == 0 (no classifiers are enabled),
the output is trivially known to be zero, thus the output is fully
initialized.
Otherwise, each bit of the output is the bitwise OR of one or more
classifications; we approximate each bit of the output shadow based on
whether the corresponding input element is fully initialized (without
which the classification is potentially unknown). This is only
approximate, because some classifications do not rely on all the bits of
the input element.
This patch only handles packed double/single-precision floating-point.
Handling the scalar equivalents is more complicated because those
intrinsics encode a mask.
[LowerTypeTests] Avoid null dereference on invalid branch funnel operand (#204951)
On the linked issue, a null dereference happens when looping over`
ArrayRef<GlobalTypeMember *> Globals` at
`LowerTypeTestsModule::buildBitSetsFromDisjointSet()`. This stems from
the external globals in the IR which don't enter GlobalTypeMembers.
Following that, operator[] over the DenseMap returns null and it
propagates to the looped over GlobalTypeMember.
Prevent the null dereference via `.find()` and reporting fatal usage
error if it is not present. Add a negative regression test.
Additionally, the LangRef for the `@llvm.icall.branch.funnel` intrinsic
is missing (see #133635). It would also be nice to have a Verifier entry
for this intrinsic, and get rid of most report_fatal_error() in this
file since it's deprecated.
Fixes #191985
[2 lines not shown]
[compiler-rt][sanitizer_common] Fix setgroups syscall pre-hook to check its input (#209207)
# About
`PRE_SYSCALL(setgroups)`/`setgroups16` called `POST_WRITE` on their
`grouplist` argument, but grouplist is a read-only input the kernel
never writes. Under MSan, `POST_WRITE` maps to `__msan_unpoison`, so
annotating a raw setgroups(2) via the documented
`__sanitizer_syscall_pre_setgroups` hook silently marked an
uninitialized group list as initialized -- before the syscall even ran,
and even on failure -- masking a real use-of-uninitialized-value bug.
Under TSan it recorded a write range where a read belongs.
Use PRE_READ, matching every other input-only argument in this file
(e.g. sched_setparam). Add an MSan regression test.
[Clang] [Diagnostic] Extend DiagCompat() to C language modes (#209241)
This expands the compatibility warnings infrastructure added in #132348
to support C mode as well. Implementing this was actually fairly
straight-forward because we are only ever in C _or_ C++ mode, i.e.
during a single compilation we either emit only C compatibility warnings
or only C++ compatibility warnings. This means we can simply reuse the
existing code and just check for different LangOpts depending on whether
we're in C or C++ mode.
Concretely, this means that instead of e.g.
```
def ext_c2y_alignof_incomplete_array : Extension<
"'alignof' on an incomplete array type is a C2y extension">,
InGroup<C2y>;
def warn_c2y_compat_alignof_incomplete_array : Warning<
"'alignof' on an incomplete array type is incompatible with C standards "
"before C2y">, InGroup<CPre2yCompat>, DefaultIgnore;
[24 lines not shown]
Stop mashing together ps_flags ans p_flag. This fine when we did the
initial "struct process" / "struct proc" split, but we added more flags
and they collide now. This is incredible confusing and needs to die.
Instead make some readjustments to the ddb default "ps" output and print
them both separately.
ok claudio@, jca@
[Object][GOFF] Recognize RLD and LEN records (#207118)
This patch adds explicit cases for RT_RLD and RT_LEN records when
parsing GOFF objects. These record types are not handled yet, but
recognizing them allows us to diagnose them and avoids teating them as
unexpected records.