[Clang][AllocToken] Support TypeFuncHash and TypeFuncHashPointerSplit modes (#228492)
Extend Clang to support the `-falloc-token-mode=typefunchash` and
`-falloc-token-mode=typefunchashpointersplit` modes, which were added
to LLVM in #227686.
In these modes, CodeGen attaches the qualified name of the enclosing
function as the third operand of !alloc_token metadata. Allocations
outside functions use an empty function name. When type inference fails,
metadata is still emitted with an empty type name, so that a
function-based
token can be assigned. This allows distinguishing allocations that would
otherwise all share the fallback token.
Like the Increment and Random modes, `__builtin_infer_alloc_token()`
is not supported in constant expressions under these modes.
[lldb] Forward step plans through BorrowedStackFrame (#231657)
When a frame provider returns an index relative to its input frames,
LLDB wraps that frame in a BorrowedStackFrame. BorrowedStackFrame
forwards most StackFrame methods to the frame it borrows, except for
GetThreadPlanForStepType, so a scripted frame lost its custom step plans
as soon as another provider was stacked on top of it.
Forward it like the methods, and test stepping with a pass-through
provider stacked on top of a provider whose frames have step plans.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
CI: Add an alpine3-24-kmemleak variant
Accept suffixed Alpine names in qemu-2-start.sh. For a name containing
"kmemleak", boot the linux-stable kernel with kmemleak=on and run ZTS
with -m, so each test is followed by a kmemleak scan. Run it by hand
with specific_os=alpine3-24-kmemleak.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #19359
[flang][clang][OpenMP] Fix context selector matching and scoring
Fix how OMPContext matches and scores context selectors:
- Derive device selector weights from the depth of the construct context
rather than from the candidate's construct selector count.
- Add each selector's score once, not once per property, using
arbitrary-width arithmetic instead of 64-bit sums.
- Match construct selectors as an ordered subsequence of the context and
score the highest-valued embedding. Keep partial matches for match_any.
- Apply the strict-subset rule to all applicable variants before choosing
the best one, rather than only to break ties: a selector that is a
strict subset of another compatible selector scores zero. Treat
kind(any) as an absent kind selector, and compare ISA traits by property
and name and user conditions by identity.
- Score an unknown property as unmatched instead of aborting. With two
applicable candidates, one naming an unknown vendor, Flang aborted with
"Unknown trait set is not to be used!".
[17 lines not shown]
[orc-rt] Describe connection specs in ogre's help. (#231665)
ogre's help described its argument only as "[positional arguments]",
though it takes exactly one connection spec, and never said what forms a
spec can take.
OptionParser gains setPositionalUsage, to name the positional arguments
in the usage line, and setEpilogue, for text printed after the options.
ogre uses them to name its <connection-spec> argument and to list the
forms it accepts. Other tools' help is unchanged.
[clang][modules] Include `-fmodule-map-file=` in context hash (#227776)
The `-fmodule-map-file=` arguments change whether headers are treated as
textual or modular. Not considering these options in the context hash
can lead to mis-compiles. This PR fixes that.
amdsmu: Print how long system spent in S0i3
It's practical to have this printed out proactively, at least while this
is still very experimental.
Sponsored by: The FreeBSD Foundation
www/{nginx,nginx-devel,freenginx}: 3rd-party modules management
Build the gridfs, postgres, redis2 and sflow modules from their own
source ports instead of fetching them with GH_TUPLE.
Sponsored by: Netzkommune GmbH
www/nginx-module-postgres: Add New Port
Sources of the postgres module for the NGINX ports. The module queries
PostgreSQL from nginx itself, with no application in between, and answers
with the rows as text, as JSON, or as nothing but a status code.
Sponsored by: Netzkommune GmbH
www/nginx-module-redis2: Add New Port
Sources of the redis2 module for the NGINX ports. The module sends
commands to a Redis server and answers with the reply as it arrived, in
Redis' own protocol, speaking the protocol itself rather than through a
library.
Sponsored by: Netzkommune GmbH
www/nginx-module-gridfs: Add New Port
Sources of the gridfs module for the NGINX ports. The module serves
files out of MongoDB's GridFS, by name or by object id, and answers a
byte range out of the chunks it needs instead of reading the whole file.
Sponsored by: Netzkommune GmbH
www/nginx-module-sflow: Add New Port
Sources of the sflow module for the NGINX ports. The module samples
requests and sends them to an sFlow collector as UDP datagrams, together
with counters for the server as a whole.
Sponsored by: Netzkommune GmbH
[LV] Have ExtractValue match the shape of the operand. (#229927)
Previously, BuildStructVector would create a vector of a wide struct
type, where each element is widened.
This can cause issues, if a transform turns an extractvalue of a wide
call into a single-scalar (e.g. makeScalarizationDecisions), because we
currently cannot extract lane 0 from a struct of vectors.
Instead of relying on BuildStructVector, we can instead have the
ExtractValue match the shape of its operand (either widen if the operand
is wide, or replicated if the operand is scalar). If a vector value is
needed, we can directly use the existing BuildVector.
This fixes a number of crashes in the newly added tests, including
https://github.com/llvm/llvm-project/issues/229609.
Depends on https://github.com/llvm/llvm-project/pull/229925
PR: https://github.com/llvm/llvm-project/pull/229927
VE: Use i32 registers for 32-bit loads in the SjLj dispatch block
Fix verifier errors in exception test. The call site index and the
PIC jump table offset were loaded with ldl.zx, which defines an i32
register, into vregs with the i64 register class.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
VE: Default to SjLj exception handling
The clang driver selects SjLj exceptions for VE (96d4ccf00c8f), but the
triple defaulted to no exception model. Make SjLj the default for the
triple and MCAsmInfo so llc agrees with the driver.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[libc] Order GPU targets after the generated stdint.h (#231229)
Several GPU targets reach `<stdint.h>` without depending on the
generated header, so a fresh build can compile them before or while
`stdint.h` is written and fail with `unknown type name 'uint32_t'`. This
is the same race as #149993, but via headers that don't include
`<stdint.h>` directly.
- GPU utils: `utils.h` includes `<gpuintrin.h>`, which includes
`<stdint.h>`; depend on `libc.hdr.stdint_proxy`.
- rpc_client: `shared/rpc_util.h` includes `<stdint.h>` but is also used
outside libc, so it can't use the proxy header; declare the dependency
on the libc target instead.
- GPU time_utils: declare its existing dependency on GPU utils.
This also changes GPU fixedbuffer to include `hdr/stdint_proxy.h` rather
than `<stdint.h>`. fixedbuffer was added after #150303, so it was missed
by that conversion.
[4 lines not shown]
AMDGPU: Add vgpr32_lo16/vgpr32_hi16 OutPatFrags
Add OutPatFrags for extracting a 16-bit half of a value after copying
it to a VGPR_32, and use them for the existing open-coded instances.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU][Doc] Add documentation about ABI occupancy
This PR introduces ABI occupancy in documentation. The actual code
implementation will be in follow-up PRs.
ARM: Generate processor family and architecture lists in backend
ARMTargetParserDef.inc is only included by ARMSubtarget. It was
generated by the TargetParser library's tablegen step, which every
other LLVM library depends on, even when the ARM target is not
built. Generate it with the rest of the ARM backend's tablegen outputs
instead.
This removes 14% of the time in the TargetParser tablegen step, along
with a dependency on 71 ARM td files.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
ip_encap: Recompute flowid for packets received over tunnel
Packets decapsulated by a tunnel interface carry the NIC's flowid
computed over the outer tunnel tuple, which is the same for every
flow a peer carries. Therefore mpath nhop selection places all
traffic on one path.
Add encap_set_flowid() to ip_encap.c, which rehashes a decapsulated
IP packet on its inner addresses.
The feature is off by default and is enabled with the per-vnet
net.route.hash_inbound sysctl.
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D60552
VE: Use i32 registers for 32-bit loads in the SjLj dispatch block
Fix verifier errors in exception test. The call site index and the
PIC jump table offset were loaded with ldl.zx, which defines an i32
register, into vregs with the i64 register class.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Skip the second duplicate search when adding to an nvlist.
nvlist_add_common() removes any existing pair with the same name and
then calls nvt_add_nvpair(), which hashes the name and searches the
table for that pair again. The second search can never find anything.
Only the unpack path needs it, because it does not remove duplicates
first.
nvt_add_nvpair() now takes a flag and nvlist_add_common() skips the
search. The search also checked whether the hash table should shrink.
That check still runs on every removal.
In a perf profile of ZFS_IOC_POOL_STATS on a pool with 1200 disks the
second search was about 16% of the samples. A userland test that
builds and copies 200000 lists of 41 pairs went from about 2.42
seconds to about 2.00 seconds.
Reviewed-by: Rob Norris <rob.norris at truenas.com>
Reviewed-by: Ameer Hamza <ameer.hamza at truenas.com>
[2 lines not shown]