Commit graph

28419 commits

Author SHA1 Message Date
Douglas Katzman da7d90ca9a Optimize SSET-INTERSECTION
Impose a stricter upper bound on consing as explained in the comments.
Test cases by Gemini
2026-07-19 11:33:20 -04:00
Stas Boukarev 0843efc927 x86-64, utf8-sap-to-string: remove redundant moves 2026-07-19 07:49:35 +03:00
Douglas Katzman 26a27bc8d8 Optimize SSET-DIFFERENCE
Iterating over the second set is preferred as it avoids an intermediate list,
and is worse only if the second set is much larger than the first.

Test cases by Gemini
2026-07-18 23:06:28 -04:00
Stas Boukarev 246af00412 Don't signal errors for (log qnan)
Fixes lp#2160268
2026-07-19 02:10:15 +03:00
Douglas Katzman 3751ecd356 Restore the ability to use SSETs as CONSETs
The bit-vector choice is still the default, however now we can run experiments
to see if an adaptive approach would make sense. First of all most consets are
small (< 64 bits) so they really could use just 1 word in the CONSET struct
instead of a separately allocated bit-vector. Over 64 bits the bit-vector is ok
but only up to a certain size. Eventually the vector waste so much more space
compared to an SSET because most CONSETs in large universes are not dense.
2026-07-18 17:10:26 -04:00
Stas Boukarev 3b5740a297 x86-64, utf8-sap-to-string: use a single ymm register for two xmm 2026-07-18 13:58:34 +03:00
Stas Boukarev 9939d74866 Use a memory operand instead of loading into a register, 2 2026-07-18 13:44:16 +03:00
Stas Boukarev 88b11e8094 Use a memory operand instead of loading into a register 2026-07-18 13:34:21 +03:00
Stas Boukarev 121f13c48b Correct #- 2026-07-18 06:09:49 +03:00
Stas Boukarev eb3e4d50f8 x86-64: simd encoding of the whole utf8 range for C strings 2026-07-18 05:28:37 +03:00
Stas Boukarev 094a492c82 Add utf8 strlen test 2026-07-18 05:28:05 +03:00
Stas Boukarev d6129e1920 Add tests for simd-copy-ascii 2026-07-18 05:28:05 +03:00
Douglas Katzman d3fa62156f Limit the scope of warning suppressions
* Rev 906a406a quieted all compiler notes coming from make-host-1,
  rendering moot the muffle-conditions code-deletion-note in shared.lisp,
  not to mention (satisfies unable-to-optimize-note-p) there as well.
* Prevent introduction of new occurrences of the optional+key warning
  by confining the suppression to precisely where there is old code.

We need to fix whatever is wrong with cross-typep so that make-host-2
correctly utilizes the &OPTIONAL-AND-&KEY-IN-LAMBDA-LIST condition.
2026-07-17 23:59:27 +00:00
Douglas Katzman 9c82bf8bdc Add missing feature to arm64 crossbuild test 2026-07-17 22:18:51 +00:00
Douglas Katzman 9bc6ee5903 Silence a bunch of gcc warnings
of this variety
  warning: suggest parentheses around ‘-’ in operand of ‘&’
2026-07-17 21:43:12 +00:00
Douglas Katzman 940bb873d1 build-all-cores 2026-07-17 21:06:42 +00:00
Douglas Katzman 81c43250dc Heed the optional+key style warning 2026-07-17 20:58:00 +00:00
Douglas Katzman 573b76f069 Revert do-conset-elements to older logic on 3 backends 2026-07-17 20:17:33 +00:00
Douglas Katzman 0aeedbcaf6 mips: Implement integer-length vop without looping 2026-07-17 19:51:05 +00:00
Douglas Katzman e4cd2e2548 Improve DO-CONSET-ELEMENTS a little more 2026-07-17 17:37:25 +00:00
Stas Boukarev 13527b1f60 x86-64: simd decoding of the whole unicode range for C strings 2026-07-17 07:05:36 +03:00
Stas Boukarev 3f1f44a4be x86-64: support byte-array inline constants 2026-07-17 04:55:59 +03:00
Stas Boukarev b30453bed8 arm64: speed up length calculation in copy-character-string-to-utf8 2026-07-17 04:29:33 +03:00
Stas Boukarev 0c48a0eec1 arm64, utf8-sap-to-character-string: reduce instruction dependencies 2026-07-17 03:06:41 +03:00
Stas Boukarev a6183f3c0d arm64: better bit packing in copy-utf8-sap-to-character-string 2026-07-16 21:59:16 +03:00
Douglas Katzman 8796281182 Fix arena-related crash 2026-07-16 15:46:05 +00:00
Stas Boukarev e3c2db021f Don't fmakunbound functions present in *handled-conditions*
Otherwise they themselves can't be compiled.
2026-07-16 18:01:32 +03:00
Stas Boukarev eda10e3e57 Fix a compile-time type error on bad arguments to concatenate
Fixes lp#2160747
2026-07-16 17:24:54 +03:00
Douglas Katzman b1c1f00f62 Add yet another way to run the parallelized build of cold-sbcl.core
Using a Bazel rule - which we can certainly commit to our git repo though
probably nobody will use it - I was able to get the end-to-end build time
excluding contribs down to 30 seconds using 300 execution machines.
The usual caveat pertains about *DERIVE-FUNCTION-TYPES* not informing
subsequent files of learned information.  But it's great for making
small algorithmic changes and running some basic smoke tests.
2026-07-16 03:06:24 +00:00
Douglas Katzman 6bd776dee6 Remove a line of output from genesis
Also fix some stype warnings if muffler gets reloaded
2026-07-16 02:56:38 +00:00
Stas Boukarev 3025a181b0 Replace a MUL with USHL 2026-07-16 04:45:53 +03:00
Stas Boukarev 0e34c1c4a8 More optimizations in copy-utf8-sap-to-character-string 2026-07-16 04:16:54 +03:00
Stas Boukarev ab04e16dd5 Micro-optimizations in copy-utf8-sap-to-character-string 2026-07-15 06:49:44 +03:00
Stas Boukarev 280e13f233 arm64: simd decoding of the whole unicode range for C strings 2026-07-15 04:12:18 +03:00
Stas Boukarev 4d6772fd1b arm64: support byte-array inline constants
Fewer instructions to load.
Saves registers on not having to pin in a descriptor register.
2026-07-15 00:32:12 +03:00
Douglas Katzman 2d6b8ff746 Move assembly step first in make-host-2
In my attempt to infer a somewhat graph-based compilation order rather than
simply a linear order, my build was telling me that the assembly routines
depended on output/ucd/* because they follow (by a lot) target-char linearly
and therefore must depend on anything that target-char does. Obviously that's
wrong. Putting the asm files first proves that they depend on no other file.

I would not have been surprised if this failed the crossbuild test because
some asm file depends on a constant that isn't defined until later,
but it seems they're actually all fine this way.
2026-07-14 17:40:47 +00:00
Douglas Katzman 83c7aafa19 Delete work files without pre-testing for existence 2026-07-14 15:18:42 +00:00
Stas Boukarev 6927ec50b9 arm64: encode more vector shift instructions 2026-07-14 00:43:39 +03:00
Douglas Katzman 809276aedd Avoid zillons of lstat() calls from %sbcl-homedir-pathname 2026-07-13 19:58:13 +00:00
Douglas Katzman cfbeebabb3 Set *derive-function-types* to T in make-contrib 2026-07-13 16:08:32 +00:00
Hayley Patton 90ce44aad5 Get the encodable ranges right for SAP-REF-{8,16,32} 2026-07-12 22:51:38 +03:00
Stas Boukarev 99af116141 arm64: encode prfm 2026-07-12 22:51:38 +03:00
Stas Boukarev 3bd658d129 arm64: better copy-character-string-to-utf8-byte-array
Use a single TBL instead of multiple BSL and multiple different TBLs.
2026-07-12 22:51:38 +03:00
Douglas Katzman 8aa85ec581 Enable *derive-function-types* in PCL build
Trade one hack for another basically
2026-07-12 19:13:27 +00:00
Stas Boukarev ba08d271de source-transform-union-typep: eql complexes are not numeric-types
Some checks failed
CL-host / ecl (push) Has been cancelled
CL-host / clisp (push) Has been cancelled
CL-host / ccl (push) Has been cancelled
CL-host / cmucl (push) Has been cancelled
CL-host / sbcl (push) Has been cancelled
Linux arm / build (push) Has been cancelled
Linux arm64 / build () (push) Has been cancelled
Mac / build (arm64, --with-sb-thread --with-nonstop-foreign-call) (push) Has been cancelled
Linux qemu / build (ppc64le) (push) Has been cancelled
Linux qemu / build (riscv64) (push) Has been cancelled
Mac / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Has been cancelled
Linux / build (x86, --with-sb-thread, ) (push) Has been cancelled
Linux / build (x86, --without-sb-thread, ) (push) Has been cancelled
Linux / build (x86, --without-sb-unicode, ) (push) Has been cancelled
Linux / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Has been cancelled
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval --with-nonstop-foreign-call, fasteval) (push) Has been cancelled
Linux / build (x86-64, --with-sb-thread --with-nonstop-foreign-call, sse4) (push) Has been cancelled
Linux / build (x86-64, --with-sb-thread, ) (push) Has been cancelled
Linux / build (x86-64, --without-sb-thread, ) (push) Has been cancelled
Linux / build (x86-64, --without-sb-unicode, ) (push) Has been cancelled
Mac / build (arm64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Has been cancelled
Mac / build (x86-64, --with-sb-thread --with-nonstop-foreign-call) (push) Has been cancelled
Windows arm64 / build (arm64, clang-aarch64, clangarm64) (push) Has been cancelled
Windows / build (x86-64, ucrt-x86_64, ucrt64) (push) Has been cancelled
CL-host / compare-xc-host-fasls (cmucl, false) (push) Has been cancelled
CL-host / compare-xc-host-fasls (ccl, false) (push) Has been cancelled
CL-host / compare-xc-host-fasls (clisp, false) (push) Has been cancelled
CL-host / compare-xc-host-fasls (self, false) (push) Has been cancelled
Fixes lp#2160429
2026-07-11 21:18:44 +03:00
Stas Boukarev 14d60e26b1 Avoid using avx512 registers in generic routines
Some checks are pending
Linux qemu / build (ppc64le) (push) Waiting to run
Linux qemu / build (riscv64) (push) Waiting to run
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux arm / build (push) Waiting to run
Linux arm64 / build () (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread --with-nonstop-foreign-call) (push) Waiting to run
Windows / build (x86-64, ucrt-x86_64, ucrt64) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval --with-nonstop-foreign-call, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread --with-nonstop-foreign-call, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (arm64, --with-sb-thread --with-nonstop-foreign-call) (push) Waiting to run
Windows arm64 / build (arm64, clang-aarch64, clangarm64) (push) Waiting to run
Which forces avx512-capable allocation tramps.

Fixes lp#2160413
2026-07-11 18:03:41 +03:00
Douglas Katzman 173185836f Improve SSET capacity tracking and SSET-ADJOIN
Some checks are pending
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux arm / build (push) Waiting to run
Linux arm64 / build () (push) Waiting to run
Linux qemu / build (ppc64le) (push) Waiting to run
Linux qemu / build (riscv64) (push) Waiting to run
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval --with-nonstop-foreign-call, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread --with-nonstop-foreign-call, sse4) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (arm64, --with-sb-thread --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread --with-nonstop-foreign-call) (push) Waiting to run
Windows arm64 / build (arm64, clang-aarch64, clangarm64) (push) Waiting to run
Windows / build (x86-64, ucrt-x86_64, ucrt64) (push) Waiting to run
* Since tombstones do not exist, there is no reason to separately
  record the available cell count and in-use element count.
* SSET-ADJOIN need not eagerly grow the SSET except when the vector
  length is 0. Only if it discovers that it must insert and the
  capacity is reached should it call SSET-GROW.
* SSET-GROW can avoid some conditional branching now that it won't
  be called with a vector length of 0.

Test cases and some assistance by Gemini
2026-07-10 21:11:40 +00:00
Douglas Katzman eba8865cfd Add test manifest entry
Some checks are pending
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
Linux arm / build (push) Waiting to run
Linux arm64 / build () (push) Waiting to run
Linux qemu / build (ppc64le) (push) Waiting to run
Linux qemu / build (riscv64) (push) Waiting to run
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval --with-nonstop-foreign-call, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread --with-nonstop-foreign-call, sse4) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (arm64, --with-sb-thread --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread --with-nonstop-foreign-call) (push) Waiting to run
Windows arm64 / build (arm64, clang-aarch64, clangarm64) (push) Waiting to run
Windows / build (x86-64, ucrt-x86_64, ucrt64) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
2026-07-10 15:23:54 +00:00
Douglas Katzman 1ce38f9567 Change SSET to not use tombstones
Some checks are pending
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
Linux arm / build (push) Waiting to run
Linux arm64 / build () (push) Waiting to run
Linux qemu / build (ppc64le) (push) Waiting to run
Linux qemu / build (riscv64) (push) Waiting to run
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
Linux / build (x86-64, --with-sb-thread --with-nonstop-foreign-call, sse4) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (arm64, --with-sb-thread --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread --with-nonstop-foreign-call) (push) Waiting to run
Windows arm64 / build (arm64, clang-aarch64, clangarm64) (push) Waiting to run
Windows / build (x86-64, ucrt-x86_64, ucrt64) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc --with-nonstop-foreign-call) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval --with-nonstop-foreign-call, fasteval) (push) Waiting to run
Avoids 1 comparison and branch in the probe loop
2026-07-10 01:15:48 +00:00
Stas Boukarev 81229e243f Optimize instructions in copy-character-string-to-utf8-byte-array 2026-07-10 02:47:17 +03:00