[AMDGPU] Support partial and empty WWM pools for SGPR spills
SGPR lane spilling currently treats the WWM VGPR pool as all-or-nothing. This
can fail compilation when the requested pool cannot be formed, even though
scratch spilling or a smaller spillable pool could make progress.
This PR lets ordinary SGPR spills fall back to scratch when the pool is empty
and lets WWM register allocation use a nonempty partial pool. It keeps the
full-pool requirement for strict WWM/WQM and explicit spill-carrier
preallocation.
The no-pool fallback is recorded in SIMachineFunctionInfo so frame lowering can
provide enough emergency scavenging slots. The state is also serialized to
preserve the behavior across MIR round trips.
[mlir] Add missing materialization function diag for dialect convertion (#207689)
This Patch adds more precise diagnostics for when a pass is missing a
target/source materialization function, making it easier to locate the
issue in the pass.
[docs][clang-format] Migrate generated clang-format docs to markdown
The challenge here is that the documentation is generated from Doxygen
comments in headers, `Format.h` and `IncludeStyle.h`.
First, the generator was updated to generate markdown constructs, and
then the Doxygen comments were also modified to use markdown constructs.
Mostly this means using single backticks instead of double backticks,
which is the Doxygen-native way of expressing code font blocks anyway,
so that's good.
To validate, I built the Sphinx docs and the doxygen, and I confirmed
that the generator script is idempotent, meaning it doesn't change the
markdown output. When I add a new option to clang-format, it shows up in
the help text block, so it works.
Before/after validation links:
| Source file | Before HTML | After HTML |
| --- | --- | --- |
[4 lines not shown]
ifconfig: Improve CMIS parsing of breakout configs
This fixes a bug where we do not report all lanes when
a NIC configures a breakout. Eg, we reported all 4
lanes when a NIC configured the optics as 1x400g, but
only printed the first lane's strength when configured as
4x100g.
Fix this by actually parsing the active lane count, rather
than pulling it from the default descriptor.
While here, optionally print page 10h when -vvvv is
specified. This aids in determining how a breakout is configured.
I put it under an extra level of verbosity, as I don't want
to let things get out of hand printing CMIS pages.
Sponsored by: Netflix
Reviewed by: kib, sumit.saxena_broadcom.com
Differential Revision: https://reviews.freebsd.org/D58263
[SLP] Add additional test for deferred rematerialization (#213400)
More tests for #211680.
Also cleaned up some commented out code that slipped through with the
old test.
New test stresses the scheduling updates.
[docs] Rewrite selected Clang docs to Markdown (#210843)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is a stacked PR based on #210842 , which will be a standalone
commit that
renames *.rst -> *.md before this PR lands for history preservation
purposes.
This was prepared with rst2myst plus LLM-assisted cleanup. I paged
through all the generated HTML looking for migration artifacts, and all
of the differences I could find appear to be formatting error
corrections.
[ELF] Quote the value in "unknown -z" diagnostics (#213572)
To make stray whitespace more visible (see #212523)
```
$ echo end > tmp.f90 && flang -fuse-ld=lld -Wl,"-z execstack" tmp.f90
ld.lld: warning: unknown -z value: execstack
```
Drop the colon (colon is typically used without quotes in lld/ELF
diagnostics).
Change ErrAlways to Err so that --noinhibit-exec downgrades the errors
to warnings. Read --noinhibit-exec before readConfigs, as Err depends on
it.
[llvm-profdata] Reject merging single-byte-coverage with count profiles (#213177)
llvm-profdata merge previously silently merged single-byte-coverage
profiles with count profiles. We should reject this, because
SingleByteCoverage will always be set to true in the merged profile, and
mess up the PGO pipeline.
mergeProfileKind now errors with cannot merge single-byte-coverage
profiles with count (non-coverage) profiles when exactly one side has
InstrProfKind::SingleByteCoverage set.
Note: Used AI to generate the code
---------
Co-authored-by: Sharon Xu <sharonxu at fb.com>
[docs] Clean up migrated Clang InternalsManual markup
Replace migrated blockquote markup in InternalsManual.md with MyST definition lists where the surrounding text is semantically a term-and-definition list.
[docs] Rename selected Clang docs to Markdown (#210842)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is the initial straight rename commit. It will probably break the
docs build, but it has to be a separate PR for blame preservation
purposes.
ZTS: add coverage for the MMP claim on a degraded mirror
Add mmp_degraded_import, which verifies the uberblock claim requires a
write only to those mirror legs the pool configuration still expects to
be present. A healthy mirror is claimed, a mirror with an offlined leg
is claimed and imports degraded, and a mirror with a leg this host
cannot open, and which the configuration does not mark absent, is
refused. The degraded and unreachable cases repeat on a three-way
mirror, where the number of legs the configuration expects and the
number this host can reach come apart.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Michael Heller <michael.heller at gmail.com>
Closes #18855
mmp: do not require writes to mirror legs the config marks absent
The MMP uberblock claim requires one good write per configured leaf of
each top-level vdev. For a mirror it required two writes
unconditionally (MIN(MAX(children, 1), 2)), so a mirror with a leg that
is persistently offline, faulted, or removed could produce only one good
write and the activity-check claim failed with EIO. A degraded mirror
could therefore not be imported with multihost=on, blocking HA failover.
Count only the legs the pool config still expects to be present, and
require a write to every one of them. A leg taken out of service is
recorded persistently in the config and is seen the same way by every
host, so it is not required. A leg merely unreachable from the
importing host keeps none of those states and stays required, so a host
that can see only some of the legs of an otherwise healthy mirror still
fails the claim and cannot split the pool.
The previous cap of two writes was a compromise made because requiring
every child was too strict for wide mirrors, in particular where a leg
[9 lines not shown]
[flang][OpenMP] Version-dependent parsing of map-type-modifier (#213473)
Up until 5.2, ALWAYS, CLOSE, and PRESENT were keywords of the
map-type-modifier. Starting from 6.0 they all became their own
single-keyword modifiers. This allowed specifying them together,
unlike in the past where map-type-modifier was unique.
To avoid using a single representation of the modifiers, and be
able to validate them through non-conditional properties, the
AST was rewritten back to the older form in canonicalization
when the spec version was set to 5.2 or earlier.
Now that the parser is version-aware, it can generate the desired
AST from the start.
Additionally, extract the OMPX_HOLD modifier out of the map-type-
modifier into its own AST node regardless of version.
[flang] Pass LangOptions to parser via UserState (#213472)
This will help deal with syntax changes across different versions of
OpenMP. There are certain cases where being able to generate different
AST for the same source code depending on the version of the OpenMP
spec makes semantic analysis easier.
---------
Co-authored-by: Michael Kruse <llvm-project at meinersbur.de>
[GlobalISel] Add immediates to `LegalizerQuery` (#211101)
Expands `LegalityQuery` to include instruction immediates in the query.
This allows instructions with immediates to be handled more fully with
legalization rules/predicates (e.g. `G_SEXT_INREG` based on its sext
width) rather than having to resort to custom legalizer logic.
Split from #198979
pkg_repo: Fix incompatible pointer
Fix incompatible variable pointer which causes compile to fail in Linux
systems.
Fix variable clevel_buf that was 'char **'' which is corrected type to 'char *'