[CodeGen] Declare MachineCycleInfo in headers (#187494)
Transform MachineCycleInfo into a class that can be declared and remove
include from many source files.
Similar to 810ba55de9159932d498e9387d031f362b93fbea.
llvm: Link cross-tools with static libllvm.a
We generally use TOOLS_PREFIX being set to indicate that we are building
in the cross-build tools stage. This check was missing for llvm.prog.mk
consumers other than *tblgen, which have not previously been built as
cross tools.
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55930
[RISCV] Relax out of range Zibi conditional branches (#186965)
If `.Label` is not within +-4KiB range, we convert
```
beqi/bnei reg, imm, .Label
```
to
```
bnei/beqi reg, imm, 8
j .Label
```
This is similar to what is done for the RISCV conditional branches
and `Xqcibi` conditional branches.
---------
Co-authored-by: Sudharsan Veeravalli <svs at qti.qualcomm.com>
[FastISel] generate FAKE_USE for llvm.fake.use (#187116)
FastISel was dropping llvm.fake.use because they are not meant to be
generated at O0 with clang.
This patch adds support in FastISel to generate FAKE_USE for llvm.fake.use.
The handling is simpler than in SelectionDagBuilder because no attempt is made to
get rid of useless FAKE_USE (e.g. for constant SSA values) to keep FastISel simple.
The motivation is that flang will generate llvm.fake.use for function arguments under
`-g` (and O0) because Fortran arguments are not copied to the stack (they are
reference like arguments in most cases) and one should be able to access these
variables from the debugger at any point of the function, even after their last use in the
function.
Lowering `~x | (x - 1)` to `~blsi(x)` (#186722)
Alive2 proof:
https://alive2.llvm.org/ce/z/bK93Cn
I've implemented a fold in `InstCombineAndOrXor.cpp` to canonicalize `~x
| (x - 1)` to `~(x & -x)` which enables the CodeGen to emit the `blsi`
instruction.
I've also added a test in `CodeGen/X86`.
Fixes #184055
---------
Co-authored-by: Tim Gymnich <tim at gymni.ch>
Implement imsg_send_config and imsg_recv_config which handle the
sending of bgpd_config.
struct bgpd_config includes various pointers and those should not be passed.
Instead use an zeroed stack object and copy_config() to ensure that all
pointers are NULL before passing the struct.
Also implement imsg_recv_config() which does the reverse.
Reported by Shibo, Shawn, Hugo, Systopia Team
OK tb@
www/php-nextcloud: Update to 32.0.6
This is 5 ~monthly micro updates; upstream has a long track record of
stable micros.
Tested on NetBSD 10 amd64 via nginx/fpm (the standard approach), both
web interface and CalDAV.
Oops missed sun3x in previous changes:
Now that all of the m68k copies of the "rei" function are functionally
equivalent, pick the one that uses the fewest cycles in the "no AST
pending" case and re-factor it into trap_subr.s.
Re-factor badtrap into the shared trap_subr.s. This time we pick the
sun2/sun3 implementation of this trap stub because it provides more
context to the stray trap reporting routine (adjust the N copies of
straytrap() to compensate as needed, sigh).
Re-factor trap0 (system calls) into trap_subr.s. Here we pick the flavor
that has the in-line astpending check bcause it's a few cycles faster in
the (common) case where no AST is pending at the end of a system call.
Re-factor trap12 ("cachectl") into trap_subr.s. Already identical everywhere
except for 68010, where it's a no-op.
[CycleInfo] Don't store top-level cycle per block (#187488)
CycleInfo currently has a second map, that stores the top-level cycle
for a block. I don't think storing this per-block makes a lot of sense,
because the top-level cycle is always the same for all blocks in a
cycle.
So instead store it as a member of the cycle.
[LegalizeTypes] Expand UDIV/UREM by constant via chunk summation (#146238)
This patch improves the lowering of 128-bit unsigned division and
remainder by constants (UDIV/UREM) by avoiding a fallback to libcall
(__udivti3/uremti3) for specific divisors.
When a divisor D satisfies the condition (1 << ChunkWidth) % D == 1, the
128-bit value is split into fixed-width chunks (e.g., 30-bit) and summed
before applying a smaller UDIV/UREM. This transformation is based on the
"remainder by summing digits" trick described in Hacker’s Delight.
This fixes #137514 for some constants.