tcp/rack: reject wma_divisor values <= 0
The net.inet.tcp.rack.measure.wma_divisor sysctl is the divisor
of the goodput weighted moving average used when the dynamic
goodput multiplier is enabled. Setting it to 0 panics the kernel.
Make the variable and the sysctl unsigned, reject 0 and values
above INT32_MAX.
MFC after: 1 month
Found with: Claude Code Opus 5.5
Reviewed by: tuexen, glebius, markj (early version)
Differential Revision: https://reviews.freebsd.org/D60759
(cherry picked from commit 7668705cb9837d4c3a6db9b3434b3a522220c8ea)
[clang-tidy][docs] Rewrite modernize check docs to Markdown [1/4] (#232207)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is the first part of rewriting check documentations in modernize module from reST to MyST Markdown.
AI Usage: This was prepared with rnk's fork of rst2myst and GPT6-assisted (Codex) cleanup.
I manually verified that the documentation renders as expected.
Preview site:
https://broken.life/llvm-staging/modernize-markdown-port/index.html
Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
[orc-rt] Move SymbolLookupResult into its own header. NFC. (#242948)
Splits SymbolLookupResult out of SymbolLookupSet.h, along with its SPS
serialization (now SPSSymbolLookupResult.h) and its unit tests. This
prepares for adding an interned-string counterpart to SymbolLookupSet:
both kinds of set will share the result type.
Merge commit 72a20b8e2987 from llvm git (by Gabriel Baraldi):
[SLPVectorizer] Check std::optional coming out of getPointersDiff (#175784)
Fixes https://github.com/llvm/llvm-project/issues/175768
There are other unchecked uses std::optional in this pass but I couldn't
figure out a test that triggers them
This fixes a clang crash in the SLP vectorizer, hit when building
audio/csound on powerpc64le. The hardened libc++ traps on the disengaged
optional, so clang dies with exit code 133. The second hunk is adapted to
llvm 21, where analyzeConstantStrideCandidate() is still isStridedLoad().
Approved by: re (cperciva)
Reviewed by: dim
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D61354
[2 lines not shown]
[clang-tidy][docs] Rename modernize check docs to Markdown [1/4] (#232206)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is the first part of the mechanical rename of the check
documentations in modernize module.
The rewrite is provided by the next PR in this stack.
AMDGPU: Fold inline immediates in peephole-opt
Currently the AMDGPU implementation of foldImmediate handles a small
set of special cases that require rewriting the instruction opcode
(COPY -> mov, and fma-like to fmac-like). Most general immediate folding
is handled in SIFoldOperands. Teach PeepholeOpt to fold all inline
immediates into target instructions which should always be an improvement.
This is to help alleviate some phase ordering problems in future changes.
I've also never liked how SIFoldOperands is written and it could use a
rewrite, and this will alleviate some of its responsibilties. It will
always be necessary since some operand folds require additional context
that foldImmediate won't have (namely, we have to make contextually aware
tradeoffs for which operands are worth folding to respect constant bus
restrictions, considering other users of the values).
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
[LoongArch] Compute exact offset value in foldLargeOffset()
foldLargeOffset() reconstructed the offset additively with a mask of the
bits overwritten later, which is only valid for the canonical sequences
produced by LoongArchMatInt where every instruction writes a disjoint bit
field. Non-canonical chains reach the pass when part of the constant is
materialized in another basic block, e.g. ORI on top of ORI, or ORI after
SLLI.D, and the computed offset was wrong:
ori 256; ori 1 -> g+1 (expected g+257)
lu12i.w+ori 0x678; ori 0xf -> g+305418255 (expected g+305419903)
ori 0xabc; slli.d 4; ori 0xf0 -> g+41200 (expected g+44016)
Collect the chain first, then evaluate it in program order with the exact
semantics of each instruction. The existing restrictions (single non-debug
use, no target flags, at most 4 instructions, LU32I.D/LU52I.D/SLLI.D only
with the pcala64 sequence) are kept.
Assisted-By: LLM
[LoongArch][NFC] Add tests for folding non-canonical large offset chains
Add tests where the offset is partially materialized in another basic
block, so the offset chain seen by foldLargeOffset() is not in the
canonical form produced by LoongArchMatInt. The current output is wrong:
ori_ori: expected g+257, got g+1
ori_ori_overlap: expected g+305419903, got g+305418255
ori_slli_ori: expected g+44016, got g+41200 (large code model)
Assisted-By: LLM
[lld][test] Require asserts for LTO verifier pass-manager tests (#242933)
Fixes 58561153d5fc (#242663).
#242663 makes ld.lld, ld64.lld and wasm-ld always set disableVerify in
NDEBUG builds, so --lto-debug-pass-manager no longer prints "Running
pass: VerifierPass" in builds without assertions. The tests below check
for the verifier pass in the default (no -disable-verify) mode, so they
fail when lld is built without LLVM assertions:
lld/test/ELF/lto/verify-invalid.ll
lld/test/MachO/verify.ll
lld/test/wasm/lto/verify-invalid.ll
Mark them REQUIRES: asserts.
Assisted-by: Gemini
[LV] Don't calculate cost/register pressure for vp.merge that can be folded. (#208621)
In EVL vectorization, LV generates a `vp.merge` to clean up poison
values in the tail (inactive) lanes, which often happens during outer
loop vectorization.
However, in RISC-V peephole optimizations, most of these `vp.merge`
operations can be folded by changing the tail policy from agnostic
(`ta`) to undisturbed (`tu`). This patch wraps vp.merge(RecipeA) into an
expression recipe, making it easier for LV to skip cost and register
usage calculations for vp.merge that can be folded in the backend.
ait: update to 1.16
New:
- Added C-x h for mark-entire-buffer
- support bold and italics
Enhancements:
- Added the word 'Wrapped' when you have gotten to the end of a file
while doing an isearch.
- Added C-u support to go backwards with esc m
- Ignore whitespace between point and bracket for jumping brackets
and treat backet jumping as esc b or esc f if there is no bracket.
- msgline now fully supports UTF-8
- dynamic-expand now searches all opened buffers
- Added more files types/langs for syntax highlighting
Bugs:
- Fixed bug when end quote is next to an escaped quote and you
attempt to jump to the matching quote.
[11 lines not shown]
[NVPTX] Add known bits for clz.b64 and popc.b64 (#237793)
The target nodes from #236435 lost the known bits that the generic nodes
provided, so a rotate by a count keeps a mask it doesn't need, and a
count in another block no longer forms mul.wide. As suggested on
#236435, bound the count the same way SelectionDAG does for CTLZ and
CTPOP.
Assisted-by: Claude Code (Claude Opus 5.5)
[Hexagon] Exclude debug instructions from load/store widening size limit (#221649)
`HexagonLoadStoreWidening` uses `MachineBasicBlock::size()` as a compile-time guard, so debug instructions can push a block over the limit and disable otherwise valid load or store widening.
Use `sizeWithoutDebugLargerThan` so debug instructions and pseudo probes do not consume the limit. Add focused MIR coverage for both sides of the instruction-count threshold.
Fixes #221634
This issue was found by a non-AI automated testing tool. AI assisted with the analysis and development of the fix.
Sparc: Use LastSubtargetCache in getSubtargetImpl (#242852)
Adopt new common pattern for targets to lookup subtargets.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
poke: update to 5.0
* User interface updates
- Now hyperlink server can bind to a user-specified port for
listening to commands (-p, --hserver-port).
* Poke Language updates
- Floating-point arithmetic is now supported on uint<32>/uint<64>
types. uint<32> will be interpreted as a single-precision
floating-point number and uint<64> will be interpreted as a
double-precision floating-point number as defined per the IEEE
754 standard. The following expressions are now supported:
- Addition: a .+ b
- Subtraction: a .- b
- Multiplication: a .* b
- Division: a ./ b
- Ceil-devision: a ./^ b
- Exponentiation: a .** b
- Remainder: a .% b
[67 lines not shown]