Reapply "[IndirectBrExpand] Preserve profile weights" (#229691) (#230224)
This reverts commit e699478b640736e11855041fda4e2902c0d0bb22. Includes
changes to only enable profile preservation at optimization levels
greater than -O0 which fixes the compile time regression reported in the
revert.
socket: Remove the divert(4) socket compat shim again
Python in the ports tree now handles PF_DIVERT sockets properly; see
ports commit 4d84480d7a68. I no longer have any specific reason to keep
the shim and Gleb wants to remove it, so, let's remove it.
This reverts commit cb7009867ae6b33aa39cb6cb1453b69073144b44.
Requested by: glebius
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D60390
[lldb][Clike] Add IdentifierMap (#222663)
TypeSystemClike needs to store the name of structs, enums, member
variables and similar entities. In the old TypeSystemClang this
information was stored in Clang's IdentifierTable.
This patch introduces an equivalent for TypeSystemClike called
`IdentifierMap`. It turns strings into unique Identifier objects, which
for now directly store the StringRef to the value. The actual storage
of the string contents is either (A) in the IdentifierMap itself
or (B) backed by ConstString/constant memory for strings. Option B
exists mainly because we often already have a ConstString around that
already contains the respective string, and it avoids us having to
save a copy like with TypeSystemClang.
Some design questions where I just picked one option:
(a) Do we really need to deduplicate strings?
[16 lines not shown]
netipsec: Fix V_spd_size updates
key_unregister_ifnet() was erroneously decrementing the size of the
global security policy database, V_sptree, but it doesn't modify that
database. V_sptree_ifnet is for policies attached to if_ipsec
interfaces. Note also that key_register_ifnet() was not incrementing
the counter.
Move the definition of V_spd_size up to the rest of the SPD definitions.
Its inclusion among the SPD cache definitions was confusing to me.
Reviewed by: ae
Reported by: Stephan de Wit and Cedrik Pischem from OPNsense
Sponsored by: OPNsense
Sponsored by: Klara, Inc.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60418
[AMDGPU] Fix memory effects of tensor load/store intrinsics (#229728)
Tensor load/store intrinsics access global and LDS memory through
addresses encoded in integer vectors. Their memory effects are limited
to pointer arguments and inaccessible memory, which can let LLVM delete
needed stores or reuse stale loaded values.
Remove this restriction so LLVM accounts for their reads and writes to
ordinary memory.
LiveVariables: Only visit tracked physical registers
Keep a bitvector of physical registers with a recorded def or use in
the current block. Register mask handling, the end of block scan, and
the per-block reset now only visit those registers instead of every
register. This is significant for targets with many registers, such as
AMDGPU.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
LiveVariables: Remove dead live-in handling and Defs plumbing
No physical register is tracked at the start of a block, so handling
the block live-ins was a no-op. The Defs list was only appended for
instruction defs, which runOnInstr already collects.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Strip LiveVariables down to dead flag computation
This analysis is dead and there are no more explicit uses. There are still
passes implicitly relying on adjustments of dead flags. Missing dead
flags are added, and implicit-def operands are added for partially dead
physical registers.
The whole pass should be deleted, but it's taking a while to get all the dead
flag changes through the rest of the compiler. As a stop-gap to try to recover
some compile time regression, and avoiding new users appearing, strip the pass
down to only commputing the dead flags.
The main side effect of this is kill flags are no longer made accurate, which
is the source of the test churn.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
usbdevs: Add ublox LARA-L6
The device has multiple PIDs as it supports different USB profiles.
Approved by: adrian
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D60482
[CIR] Added Vector Reduce Op (#226546)
Added cir.vec.reduce for vector reduction builtins supporting integer,
floating-point, bitwise and min/max reductions.
Used the operation for generic and x86 reduction builtins and preserved
expression FP options and merged builtin-required reassoc and nnan
flags.
Added CIR, verifier, lowering, fixed and scalable vector, boolean, FP16
and fast-math regression tests.
ddt: don't prune every unique entry for a target below one entry
A percentage prune rounds its target down to whole entries. When the
target is zero, for example 1% of a table with fewer than 100 unique
entries, the search for the oldest age bin to keep never runs, the
cutoff stays at the current time, and the walk prunes every unique
entry instead of none.
Return without pruning when the target is zero. dedup_prune_percentage
prunes 1% of three unique entries, which must keep all of them, and
then 100%, which must remove them.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Kamil Monicz <kamil at monicz.dev>
Closes #19264
[Passes] Declare command line options in TableGen (#230020)
Move the LLVMPasses cl::opts into a private PassesOptions struct
(lib/Passes/PassesOptions.td). PassBuilder holds
`const PassesOptions &Opts`, forward-declared in PassBuilder.h.
-force-new-pm-codegen and -verify-analysis-invalidation become
BoolOrDefault members; the latter defaults to on with EXPENSIVE_CHECKS.
DotCfgChangeReporter keeps the expanded -dot-cfg-dir in a new OutputDir
member instead of writing it back to the option.
-print-{before,after}-pass-number (cl::list) and -print-pipeline-passes
(custom parser) stay cl::opt.
Aided by Opus 5.5
RuntimeLibcalls: Only provide fp128 sincosl when long double is fp128
LibmHasSinCosF128 provided sincosl for any target with sincos, so
llvm.sincos.f128 called sincosl on aarch64 MinGW and hexagon-*-gnu,
where long double is double. Require fp128 long double, and rename it
to LibmHasSincoslF128 to distinguish it from sincosf128.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>