[docs] Rewrite AdminTasks.md as markdown (#210416)
Tracking issue: #201242
This is a stacked PR based on #210415 , which does a rename for history
preservation purposes. See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This was prepared with rst2myst.
[docs] Rename AdminTasks to markdown to preserve history (#210415)
Tracking issue: #201242
Migrating this before I make changes to it. A follow-up PR will do the
migration.
[mlir-c] Value-initialize MlirConversionPatternCallbacks in Python bindings
The Python conversion-pattern binding left the struct default-initialized,
so the newly-added optional matchAndRewrite1ToN field held an indeterminate
pointer. The driver's null check then read garbage and jumped into it,
segfaulting mlir/test/python/rewrite.py. Value-initialize the struct so
optional callbacks default to null.
[mlir-c] Add 1:N TypeConverter conversion and materialization bindings
Builds on the source/target materialization C bindings:
- Target materialization callbacks now receive `originalType` (split from the
previously-shared source/target callback typedef), exposing a documented C++
capability that was otherwise unreachable from C.
- 1:N type conversion: `mlirTypeConverterAdd1ToNConversion` plus an opaque
results accumulator (`MlirTypeConverterConversionResults` /
`mlirTypeConverterConversionResultsAppend`). A declining callback's appended
types are rolled back so the driver's "try the next conversion" invariant
holds.
- 1:N target materialization: `mlirTypeConverterAdd1ToNTargetMaterialization`,
whose callback fills a caller-allocated `outputs` buffer. A success that
leaves any output null is treated as a decline rather than handing the driver
a null-containing result.
- `mlirConversionPatternRewriterReplaceOpWithMultiple` for 1:N value
replacement, which can drive a source materialization with nInputs > 1.
- An optional `matchAndRewrite1ToN` callback on `MlirConversionPatternCallbacks`
[9 lines not shown]
[mlir-c] Fix -Wmissing-field-initializers in rewrite.c test
The new matchAndRewrite1ToN field left three existing
MlirConversionPatternCallbacks initializers under-initialized, which
fails the CI build under -Werror=-Wmissing-field-initializers.
[lldb] Contribute the GDB-remote packet history to diagnostics bundles
Register a Diagnostics artifact provider from ProcessGDBRemote so a
diagnostics bundle captures the GDB-remote packet history, the same data
"process plugin packet history" prints.
[libc][realpath] Validate path components.
This PR updates `realpath` to validate paths and return `ENOTDIR` or `ENOENT` according to https://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html.
This PR also bumps the memory limit in `HermeticTestUtils.cpp`. The realpath unit tests allocate quite a few strings. Since memory in hermetic tests is never free'd, the unit test quickly reaches the limit.
[flang][OpenACC] Discover type descriptors referenced by fir.create_box (#210393)
Register the IndirectGlobalAccess interface for fir.create_box so
acc-implicit-declare finds the derived-type type-descriptor global a
create_box of a record array needs on the device, as it already does
for fir.embox and fir.rebox.
Assisted-by: Cursor
[libc][realpath][test] Create test files/directories (#209369)
Follow-up PRs will add path validation etc to `realpath`, which will
require paths to exist in the filesystem.
This PR bumps the memory limit in `HermeticTestUtils.cpp`. The realpath
unit tests allocate quite a few strings, and since memory in hermetic
tests is never freed, the unit test quickly reaches the limit.
[CIR][AMDGPU] Add support for AMDGCN log builtins (#198032)
Adds codegen support for the following AMDGCN log builtins:
- __builtin_amdgcn_logf (float)
- __builtin_amdgcn_log_bf16 (bfloat16)
These are lowered to the corresponding `llvm.amdgcn.log` intrinsic.
[VPlan] Introduce vputils::doesGeneratePerAllLanes (#199047)
Introduce a query for recipes that produce scalar values for all VF
lanes, returning true for non-single-scalar replicates, non-first-lane
SIVSteps, and a couple of VPInstructions.
[lldb] Add an artifact provider mechanism to Diagnostics
Add a hook that lets a subsystem contribute a file to the diagnostics
bundle, without breaking layering and making Core depend on it. A plugin registers an
ArtifactProvider callback and a file name via AddArtifactProvider.
Providers run when a bundle is collected, and each one that yields
content is written into the bundle and recorded in the report's
attachments.
This restores, in a simpler form, the collection point that the removed
Diagnostics callback mechanism offered. The motivating consumer is the
downstream Swift health check, which registers a provider to write its
"swift-healthcheck.log" into the bundle. Unlike the old callback, a
provider does not open or write its own file: it just returns the
contents as a string and Diagnostics handles the rest.
I have a follow-up PR that takes advantage of this new mechanism
upstream to collect the GDB remote packet log.
TableGen: Deterministically order predicate groups by calling convention
The predicate-group sort in emitSystemRuntimeLibrarySetCalls keyed only on the
predicate name, so two groups sharing a predicate name but differing in calling
convention (e.g. isOSWindows with the default CC vs ARM_AAPCS) tied and could
emit in an unstable order. Break the tie on the calling convention name so the
generated output is deterministic.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[docs] Finish misc MyST migration (#210209)
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 #210208, which is the standalone rename
commit for this miscellaneous Markdown migration batch.
This was prepared with rst2myst plus LLM-assisted cleanup. LLDB man
pages are intentionally left as reStructuredText because LLDB man-page
building should not take on Markdown parser dependencies.
Unfortunately, many of these miscellaneous docs do not have working
standalone doc build targets, so I was not able to render HTML for all
of them. I think the scope is small enough that this is reviewable by
hand.
[SROA] Fix assertion failure when promoting self-referential load/store (#208826)
When LoadAndStorePromoter::run processes a block where a store's value
operand is defined by the load being promoted (a self-referential cycle
in unreachable code), it sets StoredValue to the load instruction. When
it then calls replaceAllUsesWith, the doRAUW assertion fires because the
replacement value contains the value being replaced.
The single-block promotion paths in promoteSingleBlockAlloca already
guard against this with a check for ReplVal == LI, replacing with poison
instead. This patch adds the same guard to the in-block load path in
LoadAndStorePromoter::run, which was missing it. Substituting poison is
correct here since this situation only arises in unreachable code.
The regression was introduced in #135609, which added the
propagateStoredValuesToLoads path in SROA that routes through
LoadAndStorePromoter::run. LoadStoreRewriter handles aggregates and is
unrelated to this path.
Fixes #204799
[clang][analyzer] Fix assertion failure in StdLibraryFunctionsChecker with non-integral ssize_t (#209655)
In StdLibraryFunctionsCheckers' `RangeConstraint::checkSpecificValidity`
asserted that the constrained argument type is integral. When user code
typedefs `ssize_t` to a non-integral type (e.g. `float`) even though
this violates POSIX.1-2017, which requires `ssize_t` to be a signed
integer type, the signature still matches (same canonical type) and the
assertion fires during constraint validation. Remove it and let
`validateByConstraints` gracefully reject the summary by returning
false.
Fixes #209436