Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
152 lines (118 sloc) 5.79 KB


Public TODO list. Cross between .finger braindump, all SBCL-related for now.


  1. Hunt perf regressions in regalloc
  2. Straighten jumps to jumps that appear late in the compilation process.
  3. Switch/case: nearly working.

Code review for abarch's regalloc branch

Clean up and commit. We can be smarter later.

Jump tables

expose this as a function: (defun switch (n &rest thunks) (funcall (elt thunks n))).

Live range splitting

Short patches to review/triage

Documentation improvement

Doug's type VOP patches

At least, apply the ones that work as is. Then see what can be improved once we select between branchful and flagful VOPs.

Reply to posts

  • [Sbcl-devel] Windows sb-ext:run-program output issue
  • Re: [Sbcl-help] Questions about ftype declarations.
  • [Sbcl-devel] reader macro restarts not available when loading from a file
  • [Sbcl-devel] Progress report for automated testing of SBCL

Doug's assembler peephole patch

Thoughts so far: doubt that performing flow analysis on assembly code is a good idea. How far can we go by only matching suffixes of some VOP followed by a sequence of VOPs? That way we can exploit TN-level dataflow information that is correct at a VOP granularity.

Also fixes

  • <=/>= direct VOPs to avoid double comisd
  • multiple-value cmov

Choose between flagful and branchful :predicate VOPs more smartly

If both are applicable with same cost, probably want to go for label-ful VOPs if the branch doesn't "look" like a cmov. Otherwise, it's hard to optimise for both conditional branches and conditional moves.


jump-jump tensioning could use some love. IR1 block ordering doesn't always suffice, esp. with our funky insertion of branches during IR2. Another reason IR1 block ordering isn't enough: some blocks compile to nothing.


Add code to check for overflowed allocation,

PPC threading patches

  • Barriers in lock-free caches (e.g. memoised specifier-type)

  • seqlock (frlock) in sb-concurrency get some barrier/read ordering wrong.

Not too hard SMOP

  • "[Sbcl-devel] Feature request: unload all shared libraries", Teemu Likonen
  • "[Sbcl-devel] Can the source transform for mapfoo make its initial cons dynamic-extent?", by Douglas Katzman
  • Allocate TLS indices at load-time
    • subclass global-var for specials
    • add slot to annotate with either load-time handle (see l-t-v), or index
    • pass immediate or constant SC to VOPs (bind, read, set).
  • data-vector-set-with-offset: return value ourself
  • disassemble: emit preambule/prologue via :keyword argument
  • no-consing declaration

Definitely longer-term patches

  • "[Sbcl-devel] Globaldb screwyness because of purify, and a (huge) fix", "[Sbcl-devel] Nice compiler speedup", "[Sbcl-devel] Two more enhancements for globaldb" by Douglas Katzman
  • "Re: [Sbcl-devel] Different treatment of repeated let* variables - special disagreement", by Douglas Katzman
  • generalised brittleness in sb-concurrency tests (e.g.
  • div by mul for signed/unsigned ceiling/floor/truncate
  • real dead code elimination pass
  • IR1 tree matching
  • IR2 tree parsing
  • combination-implementation-style for min/max of floats
  • istm maybe-float-lvar-p should be more specific, like maybe-nan-lvar-p: if a float type has lower and upper bounds, it can't be a nan (or we're doing something seriously wrong).
  • comparison with nan/infty: don't error out, return NIL (except for trapping nan).
  • clang-based C++ FFI
  • refcount at coarse granularity?
  • mark/sweep for older generation
  • Post RFC -> disable interrupts/gc during thread startup

Norec SpecTM

Sequence lock only protects commit/validate. EDSL for trivial read sequence id. Writes only during commit.

Spinning on a single lock bit w/ proportional backoff seems to be comparable to a single CAS in terms of scaling.

Strangely, (preemptable) ticket lock + proportional backoff is much worse.

Just push something usable, we'll fiddle with the details later. It's already pretty good.