[JumpTableToSwitch] Use `ConstGlobalLoad` to iterate the jump table (#242994)
This simplifies the code and handles more jump table load patterns.
Open source IR corpus changes:
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/2132.
All changes due to more inlining because of more dispatch table handling in
JTTS.
Note that the helper we reuse here requires the indices to be canonicalized.
This doesn't make a different for JTTS as it always runs after instcombine, but
it requires updating the tests to use canonical index types. Other than the
index type updates there are no changes to the tests.
[BinaryFormat][llvm-readobj] Add the SPARC STT_REGISTER symbol type (#247552)
SPARC V9 uses symbol type 13 (STT_REGISTER) to record how an object
uses the application registers %g2, %g3, %g6 and %g7. Add it to the
ELF headers as STT_SPARC_REGISTER and print it in llvm-readobj and
llvm-readelf for EM_SPARCV9, like GNU readelf does.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
www/py-django-bitfield: Update to 2.4.0
* bitfield/types.py registers its PostgreSQL adapters through
Database.extensions, which only psycopg2 has. Django's postgresql
backend uses psycopg 3 when it is installed, so "import bitfield"
fails with AttributeError: module 'psycopg' has no attribute
'extensions'. Keep the psycopg2 path and register int dumpers for
Bit and BitHandler with psycopg 3 otherwise; 2.4.0 still has the
psycopg2-only code.
* Since Django 5.0 FieldListFilter.used_parameters holds lists, so the
admin changelist fails with TypeError in BitHandler as soon as the
bitfield filter is used. Take the last value, as Django's own
filters do; 2.4.0 has the same code.
* Switch to the PEP517 build framework to make the port future-proof.
While here, add concurrent to USE_PYTHON, expand pkg-descr and switch
to the more preferred DISTVERSION.
[7 lines not shown]
www/py-django-bitfield: Update to 2.4.0
* bitfield/types.py registers its PostgreSQL adapters through
Database.extensions, which only psycopg2 has. Django's postgresql
backend uses psycopg 3 when it is installed, so "import bitfield"
fails with AttributeError: module 'psycopg' has no attribute
'extensions'. Keep the psycopg2 path and register int dumpers for
Bit and BitHandler with psycopg 3 otherwise; 2.4.0 still has the
psycopg2-only code.
* Since Django 5.0 FieldListFilter.used_parameters holds lists, so the
admin changelist fails with TypeError in BitHandler as soon as the
bitfield filter is used. Take the last value, as Django's own
filters do; 2.4.0 has the same code.
* Switch to the PEP517 build framework to make the port future-proof.
While here, add concurrent to USE_PYTHON, expand pkg-descr and switch
to the more preferred DISTVERSION.
[5 lines not shown]
[ConstFolding] Flush fma, rounding, and min/max (#244931)
Use `tryFoldFP` for FMA, rounding, and all six min/max intrinsics so
that they can respect the function's `denormal_fpenv` attribute.
Plumb the context Function into places that fold intrinsics via their
IID but do not have access to an intrinsic call Instruction. Use the
call Instruction's parent Function if available, otherwise use the given
Function. If both are `nullptr`, assume the dynamic denormal mode to
defer to a later pass that can access the Function's `denormal_fpenv`.
Update the baseline tests added in #236190 and remove FIXMEs.
LLM-Assisted
[flang][debug] Describe procedure pointer arguments by their own type (#246397)
When the type of a normal subroutine is created, we unwrap the reference
from each of its arguments. The same was not done for a procedure
pointer, which makes their types differ as shown below. Notice
(integer(kind=4)) vs (PTR TO -> ( integer(kind=4) )) in the gdb output.
module m
contains
subroutine sub(n)
integer :: n
end subroutine
end module
program test
use m
procedure(sub), pointer :: ptr
ptr => sub
end program
[7 lines not shown]
[offload][OpenMP] Split target_task_privates.c by construct
The test added in #245784 fails on the SPIR-V and NVPTX buildbots for
reasons unrelated to that fix: on SPIR-V, clang asserts when emitting the
__kmpc_taskloop call, and on NVPTX, an untied task in a target region
faults at run time.
Move the taskloop and untied task cases into their own tests and mark
them XFAIL on the affected targets, so the plain task case keeps running
everywhere.
Claude assisted with this patch.
[MachinePipeliner] Fix PHIs with loop-invariant backedge (#238601)
This was found by a protoype verifier I am working on.
The pipeliner would use the wrong register, if one of the inputs to a
Phi node is
outside of the loop.
Assisted-By: Gemini
[LV] Commonise the udiv and other replicate cases into one block (#245221)
Previously only the udiv/sdiv/urem/srem cases were adding on the
scalarisation cost for the result and operands. This PR
commonises the udiv/etc cases together with the other block that
handles add/sub/etc. Notionally there shouldn't be any difference
in their treatment and at least now the cost model for add/sub/etc
should be more accurate.
This does result in an increase in some costs, e.g. see
LoopVectorize/AArch64/predication_costs.ll
which I will try to improve in a follow-on PR that only treats the
result as needing scalarisation if a user lives outside the block.
[mlir][LLVM] Add an inherent strictfp attribute to intrinsic ops
Alternative to the discardable llvm.strictfp attribute: give every
LLVM_IntrOp an optional `strictfp` UnitAttr in baseArgs. createIntrinsicCall
sets the call-site strictfp attribute from it, and the intrinsic import
reads it back for every op that has the attribute. Intrinsics with
hand-written LLVM IR builders set it themselves. Constrained and debug
intrinsics opt out with `requiresStrictfp = 0`.
Assembly formats without prop-dict print `strictfp`, and callers of
builders that lost their defaults pass the attribute explicitly.
Assisted-by: Claude Code (Opus 5.5).
VPN: OpenVPN: Instances - recreate a leftover DCO interface before start (#11344)
* VPN: OpenVPN: Instances - recreate a leftover DCO interface before start
if_ovpn keeps the UDP socket of the first peer until the interface is
destroyed. OpenVPN only destroys interfaces it created itself, and
setup_interface() always creates it first, so after a restart with a
client connected, or a crash, the next bind fails with EADDRINUSE and
the instance stays down until a reboot.
Destroy the interface before creating it again when no process is
using it.
refs https://github.com/opnsense/core/issues/10784
* VPN: OpenVPN: Instances - only set up the interface when the instance is not running
setup_interface() forces the interface down before handing it over to
OpenVPN. A start on an instance that is already running did the same to
[5 lines not shown]
www/bunkerweb: Fix restart leaving nginx stopped
With a stop_cmd of its own the script never waited for the master to exit,
so the start after a restart hit a stale pidfile and gave up. Let rc.subr
do the stopping.
Sponsored by: Netzkommune GmbH
[AMDGPU] Support 'row_en' as a normal named-bit modifier
Like the previous patch does for done, this reworks row_en from an
asm string token into a normal modifier.
The exp pseudos stay as they are, because codegen needs the
implicit use of M0 for row_en exports, but they now all share the
same real instructions.
Assisted-By: Claude