[libc] Clean up some unused includes (#220038)
The `CMakeLists.txt` for these already reflect the correct dependencies
(e.g. `libc/startup/linux/x86_64/tls.cpp` depends on
`libc.config.app_h`, not `do_start`). I was adding some Bazel rules for
libc entrypoints and saw these unused deps.
[libc] Correct hidden attribute on __restore_rt (#220039)
This PR fixes the syntax for a `hidden` attribute in `__restore_rt`.
When compiling with `-Wattributes`, this TU complains about:
```
llvm-project/libc/src/signal/linux/__restore.cpp:20:67: error: unknown attribute 'hidden' ignored [-Werror,-Wunknown-attributes]
20 | extern "C" void __restore_rt() __attribute__((no_sanitize("all"), hidden));
```
[libc][exit] Use LIBC_CONSTINIT macro to allow pre-C++20 compilation (#220041)
The `constinit` specifier was added in these files before
`LIBC_CONSTINIT` was added to LLVM-libc. This PR updates the
`at_quick_exit` and `atexit` entrypoints so they may be compiled
pre-C++20.
Revert "[Test] Add missing dependency for llvm-ordergen (#219992)" (#220036)
This reverts commit ae35002188a5c483c3956f3d4a7f026368126655.
Sorry, this should not have gone upstream.
AArch64: Pass instruction to maybeKillChain (#219997)
Take the containing instruction directly instead of recovering it from
the operand's parent.
Co-authored-by: Claude (Claude-Opus-4.8)
[SandboxVec][BundleVec] Fix crash when seed size < 2 (#219556)
This fixes an assertion crash when the input seed vector provided to
BundleVec contains less than 2 entries. This can happen when the seeds
get vectorized by a pass running between the seed collection and the
invocation of BundleVec.
[docs] Convert first batch of CommandGuide docs to Markdown (#219625)
This change migrates half the CommandGuide rst files. Originally, we
were going to leave man pages out of scope, since migrating to markdown
there means that building man page docs requires an additional
dependency (myst-parser). However, Fedora at least is now grabbing the
generated groff file artifacts from our releases
([link](https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840/37?u=rnk)),
and I suspect other distros will be able to migrate to this model, or
install the necessary build dependency. The extra dependency is mostly a
concern for distros with long LTS timelines.
I reviewed the before and after, and I noticed *lots* of blockquoting
artifacts from extra indentation in the rst original. This was invisible
prior to the furo migration, but the new furo theme makes it very
visible, you can see if in the before/after pages, in particular in
lit.md.
Tracking issue: #201242
[7 lines not shown]
[docs] Rename first batch of CommandGuide docs to Markdown (#219624)
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.
SystemZ: Avoid using operand parent in AssociatedDataAreaTable::insert
Take the MachineFunction directly to reach the target and context
instead of recovering it through the operand's parent.
Co-authored-by: Claude (Claude-Opus-4.8)
clang: Emit "exception-model" module flag
Record the exception-handling model as an "exception-model" IR module
flag when it differs from the target triple's default, mirroring how
other target ABI properties are recorded. Adds a
CodeGenOptions::toExceptionHandling helper to translate clang's
ExceptionHandlingKind into the LLVM ExceptionHandling enum.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
IR: Introduce "exception-model" module flag
Add an "exception-model" IR module flag intended to replace
TargetOptions::ExceptionModel, such that the ABI is fully
computable from the IR alone. Add the basic documentation and
verifier/linker tests, but doesn't wire up the consumers.
The main thing I question is whether the single "wasm" model is
really the correct control. With the existing TargetOption,
WebAssembly is overloading "none" in a weird way that sometimes
means default, and sometimes mean forcibly disabled exceptions.
It additionally has -wasm-enable-eh and -wasm-enable-sjlj cl::opts
and I don't fully understand the interaction between all of these
knobs; the cl::opts are even worse than the TargetOptions since
these still change the ABI and are backend private.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[flang][cuda] Fix device-to-device transfers involving scalar CUDA constants (#219577)
Scalar CUDA constants are designated by a host shadow global, so they
cannot be an operand of a device-to-device copy. Route such transfers
through the shadow instead of passing host pointers to a
cudaMemcpyDeviceToDevice.
[AMDGPU] Allow combining uniform OR/AND to V_PERM
Allow the OR/AND -> V_PERM DAG combine for values, even if they are
uniform.
Co-authored-by: Cursor <cursoragent at cursor.com>
NAS-141684 / 26.0.0-RC.1 / Extend TNC heartbeat retry window to one week (by sonicaj) (#19568)
This commit adds changes to extend the TrueNAS Connect heartbeat retry
window from 48 hours to one week, so an outage or transient backend
problem lasting longer than two days no longer stops heartbeats
permanently. The threshold is now a named constant that the docstring
and the give-up log line derive from, and the alert text has been
corrected to match since it also stated the old figure.
Original PR: https://github.com/truenas/middleware/pull/19567
Co-authored-by: Waqar Ahmed <waqarahmedjoyia at live.com>
[clang][ssaf] Move clang-ssaf-src-edit-merge from clang-tools-extra to clang/tools (#219857)
Colocates src-edit-merge tool with the other clang-ssaf-* tools
(clang-ssaf-analyzer, clang-ssaf-linker), which already live under
clang/tools with tests under clang/test/Analysis/Scalable. PR #216183
which introduced the src-edit-merge tool originally depended on
functionality in clang-tools-extra. However, after addressing code
review feedback it no longer depends on that functionality.
rdar://179151250
Revert "[SSAF][clang-reforge] Add end-to-end clang-reforge tests (#219085)"
This reverts commit b043e590cf490d671ba9377ac11fb6b1e52625be.
The added test in clang relies on clang-tools-extra, breaking clang tests.
[DebugInfo] Don't re-extract a childless unit DIE (#220032)
tryExtractDIEsIfNeeded treats a DieArray with one entry as not yet fully
parsed, but that's wrong for a unit DIE without children. In this case
we try to re-parse and reallocate the DieArray, dangling the existing
DWARFDie.
Assisted-by: Claude
[CIR] Classify a named bit-field access unit as a bit-field on x86_64 (#219309)
mapCIRType built the ABI FieldInfo for a bit-field access unit with
IsBitField set only for an unnamed one, so a named unit reached the
classifier as an ordinary field. We now pass IsBitField with the unit's
width to be able to lower named bit-fields correctly.
A padded record reaching one of these units still reports NYI. The next
PR will change the bridge to read a bit-field's declared reach so those
can be accepted too.
Assisted-by: Cursor / claude-opus-5