[CycleInfo] Add -verify-cycle-info and verify<machine-cycles> (#233412)
Add a -verify-cycle-info flag, on by default with EXPENSIVE_CHECKS,
following the example of -verify-loop-info. When it is set,
CycleInfoWrapperPass and MachineCycleInfoWrapperPass verify themselves
in verifyAnalysis(), which the legacy pass manager calls after each pass
that preserves them. This gives automatic verification of cycle info
across the legacy codegen pipeline.
Also add verify<machine-cycles> for the new pass manager, analogous to
verify<cycles>.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
bnxt_en: dcb: stop zeroing ETS and PFC config in bnxt_dcb_init()
bnxt_dcb_init() currently pushes all-zero ETS and PFC settings to
the firmware at every attach. This reserves bandwidth allocation
for RoCE traffic, which prevents L2 traffic from reaching line rate.
These settings should only be updated with valid values when the
RoCE driver is loaded. Therefore, we should stop programming them
during bnxt_dcb_init().
Signed-off-by: Andy Gospodarek <gospo at broadcom.com>
Reviewed by: chandrakanth.patil_broadcom.com, gallatin
MFC after: 2 weeks
Sponsored by: Broadcom Inc.
Differential Revision: https://reviews.freebsd.org/D60516
(cherry picked from commit 31cbd8f27d687ce9b10a22c858296532be400bb4)
[alpha.webkit.UnretainedLocalVarsChecker] Treat a raw pointer collection of a fast enumeration as the origin of its element (#234682)
alpha.webkit.UnretainedLocalVarsChecker still reported the element
variable of an Objective-C fast enumeration when the collection was a
raw pointer local variable or parameter, as in "NSArray *array =
obj.array;" followed by "for (T *x in array)", even though the variable
itself isn't reported. This includes a nested fast enumeration whose
collection is the element of the enclosing one, and a range-based for
loop over an Objective-C collection, which is a fast enumeration as
well.
The collection of a fast enumeration is evaluated before the loop body
is entered and keeps its elements alive. A raw pointer local variable or
parameter holding the collection is checked on its own, so treat it as a
guardian of the element as long as the loop body doesn't mutate it.
Also treat passing the address of an Objective-C object pointer guardian
as a mutation of the guardian as done for other raw pointers.
Authored with Claude Code.
if_bnxt: Fix interrupt storm on Thor2
An interrupt storm was observed on Thor2 because the Rx CQ consumer
index was always one less than it should be. Correct the Rx CQ
consumer index to fix the storm.
Reported by: gallatin
Reviewed by: gallatin
MFC after: 2 weeks
Sponsored by: Broadcom Inc.
Differential Revision: https://reviews.freebsd.org/D58602
(cherry picked from commit 8c69a5dc60b3630a4c5bca0bda714f791324afad)
[SimplifyCFG] Use check-globals=smart for test
Instead of manually writing out check lines for the test. This makes the
test more standard and easier to update.
Reviewers: akuegel, mtrofin
Pull Request: https://github.com/llvm/llvm-project/pull/234826
[bazel][compiler-rt] Introduce source exporting for ASan, UBSan, and LSan (#234492)
This exports the source files, headers, textual sources, and compile
flags for building the AddressSanitizer, UndefinedBehaviorSanitizer, and
LeakSanitizer runtime libraries on demand or via Bazel.
Also exports ignore lists and the basics needed for syms files. The
groups are decomposed in a way that allows us to build equivalent
runtimes to how CMake works. This is the basis that Carbon is building
on to support on-demand sanitizer runtimes.
Assisted-by: Antigravity with Gemini
[bazel][libcxx][libcxxabi] Introduce basic sources and copts exporting for libcxx and libcxxabi (#234489)
This exports the source files directly so that they can be used to build
a libcxx runtime library on demand. It also differentiates between
normal sources and textual sources in necessary places.
It also exports `.in` template files along with the source and headers.
And lastly, it exports `copts` to use when building both libcxx and
libcxxabi.
Assisted-by: Antigravity with Gemini
[AArch64][GlobalISel] Run shift_immed_chain in the post-legalizer combiner (#234727)
The legalizer can create chains of shifts by constants that the
pre-legalizer combiner never sees. Adding `shift_immed_chain` to the
post-legalizer combiner merges them.
```llvm
define i16 @test(i16 %a) {
%r = sdiv i16 %a, 7
ret i16 %r
}
```
Before (7 instructions):
```
sxth w8, w0
mov w9, #18725
mul w8, w8, w9
asr w8, w8, #16
[18 lines not shown]
[IR] Remove -use-dereferenceable-at-point-semantics option (#218428)
This was a temporary migration option, remove it now that the migration
is complete.
[bazel][compiler-rt] Exclude more libc-backed builtins (#234486)
Follows the pattern of #214779 and excludes new builtins added by
#207543 and #209900.
Assisted-by: Antigravity with Gemini
[bazel][libunwind] Introduce basic source and copts exporting for libunwind (#234485)
This exports the source files and copts directly so that they can be
used to build this runtime library on demand. This is used by Carbon's
toolchain to package and build `libunwind`.
Assisted-by: Antigravity with Gemini
[bazel][compiler-rt] Add `libfuzzer` target to `compiler-rt` (#234482)
This lets Bazel users of LLVM to also use `libfuzzer` directly to build
fuzz tests, including the `main`-function it provides. This is a simple
and uncomplicated approach to leveraging `libfuzzer`, and seems useful
to include. Carbon has been using it for the last several years
successfully.
One tricky part is that we have to carefully manage the compiler flags
when compiling with Clang.
Assisted-by: Antigravity with Gemini
Report TrueSearch in usage statistics services
## Problem
TrueSearch has no "Start Automatically" flag and no row in the services table, so it never shows up in the `services` list of the usage statistics and there is no way to tell how many systems use it.
## Solution
Append a `truesearch` entry to `services`, with `enabled` coming from `truesearch.enabled`, the same check middleware uses to decide whether to start the daemon (licensed, and SMB Spotlight or WebShare search have shares to index).
[Clang][ABI][X86] Do not emit zeroext/signext for return values (#232729)
This stops emitting the zeroext/signext attributes for return values on
X86, except for `bool` (which stays zeroext, as it requires
zero-extension to 8 bits) and Darwin.
The `getTypeForExtReturn()` in the X86 backend already ignores
zeroext/signext for i8 and i16 types on non-Darwin platforms. For these
cases, this change has no impact on codegen: The intent is merely to
clarify the used psABI. Using zeroext/signext when no actual extension
takes place is highly confusing, esp. when the behavior is different
between return values and arguments.
However, this *does* change behavior for non-i8/i16 types. Specifically,
it changes `_BitInt` types to have unspecified high bits, instead of
performing a partial sign/zero extension to 8, 16 or 32 bits. This makes
`_BitInt` comply with the Linux psABI, the previous behavior was
incorrect. MSVC does not support `_BitInt`, so there is no correct ABI
there.
[5 lines not shown]
[DenseMap] Skip TrivialCopyable Test on FreeBSD (#234853)
FreeBSD currently does not provide a trivially copyable std::pair to
avoid an ABI break. Consequently, the isRelocatableBucket check fails,
so we disable this static_assert on FreeBSD.