[ADT] Thread the ImutAVLFactory free list through the nodes (#244626)
Freed nodes are kept in a vector that grows with the number of freed
nodes. Link them through their now unused left pointers instead,
removing the vector's allocation and growth.
Based on #196534 by Christoph Cullmann.
Assisted-by: Claude Opus 5.5
---------
Co-authored-by: Gabor Horvath <gaborh at apple.com>
Co-authored-by: Christoph Cullmann <cullmann at kde.org>
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
[Mips] Don't use trunc.w.fmt for fptosi on MIPS I (#244859)
MIPS I has no trunc.w.fmt. fptosi from float selected trunc.w.s anyway,
since its pattern was marked ISA_MIPS1, and fptosi from double failed
to select.
On MIPS I use cvt.w.fmt with the rounding mode set to round toward
zero, then restore the FCSR. This is the same sequence the assembler
uses for the trunc.w.fmt macro.
cfc1/ctc1 have the same delay as mfc1/mtc1 before MIPS IV, so add them
to the FPU delay slot hazard list. This puts a nop after cfc1 before its
result is used and after ctc1 before the next FPU instruction.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang-tidy] Add SARIF output to clang-tidy (#219182)
[clang-tidy] Add SARIF output for clang-tidy diagnostics.
Clang-tidy is a static analysis framework, and should therefore be able
to output results in the Static Analysis Results Interchange Format
(SARIF). This brings clang-tidy in line with clang and
clang-static-analyzer.
Adds an experimental '--experimental-sarif-export=<file>' option to
clang-tidy that writes diagnostics in SARIF format.
Each diagnostic is reported as a SARIF result with its check name,
severity, and location. Notes are emitted as related locations with
their messages, while notes from clang-analyzer checks are emitted as
thread flows so the analyzer path can be followed in SARIF viewers.
To support this, the shared SARIF writer in clang now skips locations
that are invalid or not in a file instead of asserting, allows a message
on related locations, and fixes artifact indices not matching their
position in the artifacts array. The diagnostic level helpers in
[7 lines not shown]
[PowerPC] Model the CR defs of MTCRF used to restore callee-saved CRs
The epilogue restores the non-volatile CR fields (CR2-CR4) with a single
mtcrf. MTCRF takes only an FXM mask immediate and a GPR, and declares no
CR operands, so the post-RA scheduler sees no dependency between the
restore and instructions that read or write the restored CR bits. It can
therefore hoist the restore above those reads, making the function use the
caller's condition bits instead of its own.
Add the restored CR fields as implicit defs when building the MTCRF in
emitEpilogue() and restoreCRs(), matching the way the prologue already
adds implicit uses to MFCR. The scheduler now models the WAR/WAW
dependencies and keeps the restore after the last read.
This is a regression from #202339 (3fc6711ccaf6), which replaced multiple
MTOCRF instructions -- each with a CR field def -- with a single MTCRF.
Fixes #242250.
[PowerPC] Add a precommit test for MTCRF CR restore scheduling (#242760)
This adds a regression test that pins the current (incorrect) order of
the mtcrf that restores the non-volatile CR fields relative to reads of
the CR bits it writes. A follow-up patch will model the CR fields as
defs and update the CHECK lines; the FIXME marks the expected change.
See #242250
[clang][SSAF] Move lit tests to clang/test/ScalableStaticAnalysis (#241883)
SSAF is not part of the static analyzer proper, so its tests do not
belong under clang/test/Analysis.
This should harmonize the test dir name with the lib and include dir
names.
https://discourse.llvm.org/t/untangle-static-analyzer-and-ssaf-tests/91835/19
- git mv clang/test/Analysis/Scalable clang/test/ScalableStaticAnalysis
- Update the plugin add_subdirectory path and the PR labeler glob
- Add check-clang-scalablestaticanalysis-unit to run
ClangScalableAnalysisTests
How to run SSAF tests from now on:
- Lit tests: ninja check-clang-scalablestaticanalysis (auto-generated
from the directory name, so no explicit target)
- A single lit subdirectory: ninja
check-clang-scalablestaticanalysis-ssaf-linker
[2 lines not shown]
[OpenMP] Don't over-allocate stack in s390x __kmp_invoke_microtask (#244475)
Five arguments are passed in registers, so max(0, argc - 3) of the
p_argv entries go on the stack, as the comment says. The code reserved
max(0, argc - 2) slots, one more than needed.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[ARM] Promote basic operations with +bf16 (#244862)
This promotes basic fadd, fsub, fmul and fdiv operation with +bf16,
ensuring we convert them to fp32. FMA is apparently incorrect to promote
in the same way as it double rounds.
www/code-server: Build the missing native addons
The sqlite3 and keytar node modules were never compiled, so loading
them failed at runtime.
PR: 300929
Sponsored by: Netzkommune GmbH
LowerTypeTests: Only invalidate analyses of modified functions in SimplifyTypeTests
SimplifyTypeTests tried to preserve the CFG analyses, but did not
preserve the function analysis manager proxy, so all function analyses
were invalidated.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>