nix: build src incrementally with tools/src_workspace
tools/src_workspace proto|build|image builds this checkout's src and man
in place, as gmake world does, into proto (filled first with illumos and
illumos-extra's packages, as 0-extra-stamp installs them), with the Nix
build's strap, compiler and tools (nixpkgs-illumos'
smartos-live.srcWorkspace), and makes a platform with that whole proto
area (build_nix --proto). tools/illumos_workspace image takes the whole
area too once src_workspace has filled it. The pin moves to
nixpkgs-illumos d5ac4bc, which has them.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[CMake] Name languages explicitly in llvm_add_warning_options
Address review feedback: instead of a hardcoded C|CXX|ALL selector,
llvm_add_warning_options() now takes any number of enabled languages followed
by options. Arguments starting with '-' or '/' are options and everything
else is a language, which must already be enabled (checked against
ENABLED_LANGUAGES). Every option is added to every named language, and the
per-language lists are LLVM_WARNING_OPTIONS_<lang>.
The ALL selector is removed so that adding a language later cannot change the
meaning of existing calls; callers now say "C CXX". llvm_apply_warning_options(),
the -Wno- stripping and the runtimes fold-back loop iterate over the enabled
languages instead of assuming C and CXX, so languages such as Fortran work
once something populates their list. The helper is now a function, and the
temporaries introduced by this patch are unset after use.
LLM-aided
netipsec: Send the packet when the rest of a bundle is skipped
A policy can bundle several requests, for example an ESP tunnel and an AH
transport request. A request at level "use" that has no SA is skipped (as
is "default", which the net.inet.ipsec.*_deflev and
net.inet6.ipsec6.*_deflev sysctls make "use" by default), and the packet
is meant to leave with the transforms of the other requests.
ipsec_process_done() applies the next request of a bundle once a transform
completes. When all remaining requests are skipped,
ipsec{4,6}_perform_request() returns EJUSTRETURN and leaves the packet to
its caller, but ipsec_process_done() returned that to the transform, which
does not send the packet or free it. Keep the references to the SP and the
SA across the call, and on EJUSTRETURN send the packet with the transforms
applied so far, after the UDP encapsulation of the last SA applied.
ipcomp_output() calls ipsec_process_done() directly for packets below the
compression threshold and passed the EJUSTRETURN on to ip_output(), which
then went on with a packet that tunnel mode encapsulation had already
[7 lines not shown]
[AMDGPU] Keep soft waitcnts unchanged until SIInsertWaitcnts converges
On the first visit to a loop header only the preheader state is known.
A soft waitcnt there (e.g. from a release fence) can have some of its
counters simplified away while another counter keeps the instruction
alive: the fence's own vmcnt(0), a preceding wait.asyncmark, or an
explicit s_waitcnt. The soft waitcnt was then rewritten with the
simplified value and promoted to a hard waitcnt, or merged into a
preceding hard one. When the back edge later brought a pending LDS
store, the original lgkmcnt(0) request was gone, and the s_barrier after
the release fence no longer waited for it.
Treat soft waitcnts as requests that depend on the incoming state: never
merge, promote or rewrite them while the analysis iterates. They are
kept unchanged in DeferredErasures, a hard waitcnt (existing or new)
carries what is needed on each visit, and the soft waitcnts are erased
once the analysis converges. This extends #220357, which did the same
only for soft waitcnts that were simplified away entirely.
[11 lines not shown]
[AMDGPU] Pre-commit tests for soft waitcnt requests lost at a loop header (NFC)
Two cases where a soft waitcnt at a loop header loses its lgkmcnt(0)
request: on the first visit no LDS operation is pending, so lgkmcnt is
simplified away while vmcnt keeps the instruction alive (either the soft
waitcnt's own vmcnt, or a preceding hard vmcnt(0) it is merged into).
The DS write in the loop is then not waited for before the S_BARRIER on
the next iteration. The checks show the current, incorrect output.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
uefisign: rename to efisign
uefisign seems to have come first, but the efi* naming has won out in
our UEFI tooling and consistency is good. This fixes it so that
"efi<tab>" gives a reasonable view of what efitools we have in base.
uefi* links are added for compatibility, at least for now. Maybe it's
a reasonable idea to add such links for all of the efi tools, but I'm
punting on that for a moment.
Reviewed by: emaste, imp (both previous version), ziaee
Relnotes: maybe
Differential Revision: https://reviews.freebsd.org/D58187
[OpenMP][flang] Score unknown context selector properties by selector (#232960)
Flang records an unknown property such as kind(bogus) or vendor(bogus)
as TraitProperty::invalid, which belongs to no selector. Under
match_any or match_none, where such a variant can still be selected,
the property therefore lost its selector's weight: kind(bogus) added
nothing, while an unmatched kind(gpu) adds 2^l, where l is the number of
constructs in the context. A score on a selector that mixes known and
unknown properties was also added twice, once for the known property and
once for invalid, and unknown properties in different selectors shared
a single score.
Add VariantMatchInfo::addUnknownTrait, which keeps the property
unmatched and records its selector and score, and score that selector
like any other. Use it in Flang. Clang drops unknown properties while
parsing and is unaffected.
Fixes: https://github.com/llvm/llvm-project/issues/233029
Assisted-by: GitHub Copilot (Claude Opus 5.5)
[clang] Ensure the AST file extracted from a PCM is aligned
The COFF object writer doesn't align section contents within the file, so
the `clangast` section of a `-fmodule-format=obj` PCM may start at an
unaligned offset. The readers use the AST file in place, which trips the
on-disk hash table alignment assertion.
Before #242384, the importing compiler instance copied the AST file out of
a freshly built PCM into a (suitably aligned) heap buffer, which hid the
issue for that PCM. However, reading the PCM from disk has always used the
memory-mapped file directly, which happens when:
* reusing the implicit module cache in a subsequent compilation,
* reading a PCM built by another process (while waiting on the lock),
* reading dependencies that already exist on disk,
* loading explicit modules or PCHs,
* building the global module index.
Since #242384, the freshly built PCM is no longer copied either, so the
assertion now fires on the very first compilation. Note that the reads
[8 lines not shown]
[clang] Make `PCHContainerReader::ExtractPCH()` return a buffer
`ExtractPCH()` used to return a view into the buffer holding the PCM,
leaving it up to the callers to keep that buffer alive. This patch changes
it to take the PCM buffer by-value and return the sub-buffer holding just
the AST file by-value as well. This gives the readers more room to decide
how the AST file is exposed, e.g. to make a copy when needed. No
functional change intended.
The callers are updated as follows:
* The importing compiler instance, the module manager and the global
module index builder extract the AST file once, up front. The
`SubMemoryBuffer` helper moves to the object file reader, the only one
that needs it.
* `ASTReader::ReadASTCore()` and `ModuleManager::addModule()` now rely on
the buffer already being extracted instead of extracting it again. This
relies on the in-memory module cache only holding extracted buffers,
which is why `ASTUnit::LoadFromASTFile()` extracts the AST file read from
stdin before adding it. As a side effect, `ModuleFile::SizeInBits` (used
[6 lines not shown]
[SystenZ][z/OS] Beautify HLASM output
Instructions are currently indented by 2 spaces, which makes the output
hard to read. This changes increases the indentation to 10, which improves
the readability. The indent is now controlled by a constant instead of
hard-coded spaces.
[LLDB] Halt the process before disabling an InstrumentationRuntime plugin
Disabling an InstrumentationRuntime plugin in a process destroys the
plugin instance. The plugins pass a raw `this` pointer as the baton for
their breakpoint callbacks so the plugin's breakpoint must not be hit
while the plugin is being destroyed.
`Process::SetInstrumentationRuntimeEnabled()` now refuses to disable a
plugin unless the process is stopped. When the `plugin disable` command
disables a plugin in a running process it halts the process, disables
the plugin and then resumes the process. The halt is not hidden so
clients see the process stop and then run again.
If the process happens to stop for another reason (e.g. a breakpoint)
at the same time as the halt it is still resumed. This is very unlikely
and is noted in a FIXME.
Enabling a plugin doesn't require the process to be stopped.
Assisted-by: Claude Code
[clang] Ensure the AST file extracted from a PCM is aligned
The COFF object writer doesn't align section contents within the file, so
the `clangast` section of a `-fmodule-format=obj` PCM may start at an
unaligned offset. The readers use the AST file in place, which trips the
on-disk hash table alignment assertion.
Before #242384, the importing compiler instance copied the AST file out of
a freshly built PCM into a (suitably aligned) heap buffer, which hid the
issue for that PCM. However, reading the PCM from disk has always used the
memory-mapped file directly, which happens when:
* reusing the implicit module cache in a subsequent compilation,
* reading a PCM built by another process (while waiting on the lock),
* reading dependencies that already exist on disk,
* loading explicit modules or PCHs,
* building the global module index.
Since #242384, the freshly built PCM is no longer copied either, so the
assertion now fires on the very first compilation. Note that the reads
[8 lines not shown]
[clang] Make `PCHContainerReader::ExtractPCH()` return a buffer
`ExtractPCH()` used to return a view into the buffer holding the PCM,
leaving it up to the callers to keep that buffer alive. This patch changes
it to take the PCM buffer by-value and return the sub-buffer holding just
the AST file by-value as well. This gives the readers more room to decide
how the AST file is exposed, e.g. to make a copy when needed. No
functional change intended.
The callers are updated as follows:
* The importing compiler instance, the module manager and the global
module index builder extract the AST file once, up front. The
`SubMemoryBuffer` helper moves to the object file reader, the only one
that needs it.
* `ASTReader::ReadASTCore()` and `ModuleManager::addModule()` now rely on
the buffer already being extracted instead of extracting it again. This
relies on the in-memory module cache only holding extracted buffers,
which is why `ASTUnit::LoadFromASTFile()` extracts the AST file read from
stdin before adding it. As a side effect, `ModuleFile::SizeInBits` (used
[6 lines not shown]
[TableGen] Cast bit fields to unsigned in SearchableTable comparators (#241428)
Fix MSVC warn with C4804 ("unsafe use of type 'bool' in operation") in
the generated code.
[HLSL] Enable declarations inside cbuffer/tbuffer per spec (#239481)
A `cbuffer` or `tbuffer` declaration may contain any declaration except
for `namespace` or a nested `cbuffer` or `tbuffer` declaration.
Related to Ecma TC57 proposal
https://hlsl-tc57.github.io/tc57/proposal/0005/.
Fixes #225115