18713 bhyve: legacy_emulate_cpuid on Intel should mask AMD-specific 8000_0008 bits
Reviewed by: ixi meow <illumos at iximeow.net>
Reviewed by: Hans Rosenfeld <rosenfeld at grumpf.hope-2000.org>
Reviewed by: Andy Fiddaman <illumos at fiddaman.net>
Approved by: Dan McDonald <danmcd at oxide.computer>
Fix filesystem plugin load and format the new test
set_zfs_attributes annotated app as App | None, but check_annotations
requires App, so the filesystem plugin failed to load. Also ruff-format
the new test_path_safety.py.
AMDGPU: Clear stale kills when merging v_mov_b16 pairs (#242960)
SIPostRA16BitMovFolding can insert the merged 32-bit instruction after
an instruction that kills the first mov's source, which then reads a
register the verifier considers dead:
$vgpr7_lo16 = V_MOV_B16_t16_e32 $vgpr5_lo16
$vgpr16 = V_PERM_B32_e64 killed $vgpr5, $vgpr6, ...
$vgpr7_hi16 = V_MOV_B16_t16_e32 killed $vgpr6_lo16
=>
$vgpr16 = V_PERM_B32_e64 killed $vgpr5, $vgpr6, ...
$vgpr7 = V_PERM_B32_e64 $vgpr6, $vgpr5, ...
Clear kill flags of the first mov's source between the first mov and
the insertion point.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang-doc] Add ConcurrentStringPool implementation (#243321)
This replaces the existing simple wrapper over the UniqueStringSaver
with a proper ConcurrentStringPool.
The new ConcurrentStringPool lifts ideas liberally from other places in
LLVM. More specifically, it takes design elements from
ConcurrentHashTableByPtr, as well as LLD's MergeNoTailSection and
GHashTable, while trying to avoid some of the known problems in
DWARFLinker's StringPool implementation. It also uses a similar strategy
to folly's AtomicHashMap by using atomic operations to avoid per-shard
locking. The new implementation tries to make its internal data layout
cache friendly, both in its choice of size and alignment.
The new ConcurrentStringPool allows clang-doc to run over the sources in
clang/lib in about 156s vs 236s for the baseline (a 34% reduction in
wall time). The micro-benchmarks also show marked improvement as the
core count increases, both over the baseline and over the DWARFLinker
implementation.
Assisted-by: Gemini
IR: Remove traces less-precise-fpmad attribute
Nothing reads this attribute. clang emitted it for -cl-mad-enable,
and the inliner had a merge rule for it, but no backend or optimization
ever used it.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[IPO] Declare ForceFunctionAttrs, Inliner, Instrumentor and Internalize command line options in TableGen (#244509)
-force-attribute=foo:noinline,bar:cold is now a comma-separated list
instead of a single element (`cl::CommaSeparated` wasn't applied).
Pass constructors don't read options, so instead of
ModuleInlinerWrapperPass adding an InlineAdvisorAnalysisPrinterPass
after each inliner, the inliner prints the advisor on exit under
-scc-inline-advisor-printing. A standalone cgscc(inline) now prints as
well. Remove the CGSCC InlineAdvisorAnalysisPrinterPass::run, which has
no other user. InternalizePass's default constructor no longer reads
options; run() builds the -internalize-public-api-* preserve list.
readConfigPathsFile appends to a SmallVectorImpl instead of the global
cl::list.
Renames, with the old spellings kept as aliases:
```
-enable-scc-inline-advisor-printing -> -scc-inline-advisor-printing
```
[LifetimeSafety] Report an invalidated borrow that is returned (#244609)
When the return was what kept an invalidated borrow live, the warning
was computed and then dropped. Report it like the `this`-escape case,
with the return as the use.
Assisted-by: Claude Opus 5.5
Co-authored-by: Gabor Horvath <gaborh at apple.com>
mmu_load_urp20hp(): No need to explicitly invalidate the external VAC
or the MMU's TLB -- user VAC entries and user TLB entries are automatically
invalidated when the USTP register is written, and there's no need to
invalidate supervisor entries in either of those when switching the user
address space.
[Hexagon] Forward target features to the external assembler (#212474)
The external assembler path (-fno-integrated-as, which invokes llvm-mc)
only forwarded -mcpu and -mhvx-ieee-fp, so target features such as HVX,
HVX length, HVX qfloat, and long-calls never reached the assembler. As a
result, HVX-using code that compiled fine with the integrated assembler
failed to assemble with the external one.
Compute the features with hexagon::getHexagonTargetFeatures(); the same
helper used by the compiler and integrated assembler and forward them to
llvm-mc via -mattr=, bringing the external assembler path to parity so
behavior is consistent regardless of which assembler is selected.
Fixes #212471
Signed-off-by: Rishabh Bali <rbali at qti.qualcomm.com>
Co-authored-by: Rishabh Bali <rbali at hu-rbali-hyd.qualcomm.com>
CodeGen: Look up instruction slot indexes without a hash map
Replace the DenseMap from MachineInstr to SlotIndex with a handle
stored in MachineInstr indexing the slot index entry table. There's a
padding slot available so this doesn't increase size.
This also will make it more natural to start serializing the slot
index in MIR which will make reproducing issues easier in greedy.
llc instructions:u over 40 files per target (CTMark for x86_64 and
aarch64, rocm bitcode sample for amdgpu):
x86_64 -0.64%
aarch64 -0.62%
amdgpu -0.43%
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
kern: Have .m rules depend sys/tools/makeobjops.awk
Generated _if.[ch] files have to be rebuilt after commit bf362c1b41c8
("kobj: convert KOBJOPLOOKUP() to returning pointer to function"). Add
a dependency on the build tool, similar to kmod.mk.
Build rules using NORMAL_M (defined in kern.pre.mk) presumably need a
similar treatment, but this restores (most of) the incremental build
now.
Reviewed by: jrtc27
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61821
[BOLT] Verify fragment can fit into a cluster (#244473)
Clustered relaxation has an assumption that each formed cluster has a
size no larger than `--max-cluster-size`. We need to verify that any
single fragment won't be larger than `--max-cluster-size`. With the
124MiB default max cluster size, this is unlikely to happen, but this
option could be specified with a much smaller number that some large
fragment cannot fit into a cluster.
Two emulation patches:
- hw/mc146818rtc.c -- replace previous patch with the one that fixes the
same issue but is more correct by Philippe Mathieu-Daudé (also
being upstreamed).
- m68k/op_helper.c -- In the DIVS.L helper, special case INT_MIN / -1,
which traps on some hosts and crashes Qemu (Qemu issue #2078).
Bump PKGREVISION to 4.