Max Bernstein's Blog
- Public lists
- davewiner/hackerNewsStars
- Fetched
I had another excellent PLDI this
past June. It was my fourth1. I continued to meet new people and learn
new things!
Overall: I got to meet a lot of new people, which was exciting. I had some good
chats about research. I asked a question at a talk! I got to show Aaron and
J...
A survey of inlining heuristics
Compilers, especially method just-in-time compilers, operate on one function at
a time. It is a natural code unit size, especially for a dynamic language JIT:
at a given point in time, what more information can you gather about other
parts of a running, changing system?
I d...
Checking assembly with Z3
Short post today. New ZJIT contributor dak2 submitted a
PR to fix an overflow bug in fixnum
division in ZJIT. We did the division fine, but lied about the type of the
result in the case of dividing FIXNUM_MIN by -1. You can see how this is
special-cased in CRuby:
static inl...
Travel notes: RubyKaigi Hakodate
I just got back from a three and a half week trip to Japan. It was the longest
trip I have ever been on (aside from studying abroad in Germany, which felt
different). I made the following wild circuit with only a backpack and a
duffel:
Tokyo
Toyama
Kanazawa
Nara is...
Partial static single information form
In compilers, static single information form (SSI) is a common extension to
static single assignment form (SSA). It was introduced by C. Scott Ananian in
1999 in his MS thesis (PDF) 1.
SSI extends your existing SSA intermediate representation by discovering facts
from your ...
Value numbering
Welcome back to compiler land. Today we’re going to talk about value
numbering, which is like SSA, but more.
Static single assignment (SSA) gives names to values: every expression has a
name, and each name corresponds to exactly one expression. It transforms
programs like t...
Using Perfetto in ZJIT
Originally published on Rails At Scale.
Look! A trace of slow events in a benchmark! Hover over the image to see it get bigger.
A sneak preview of what the trace looks like.
Now read on to see what the slow events are and how we got this pretty picture.
The ...
A fuzzer for the Toy Optimizer
Another entry in the Toy Optimizer series.
It’s hard to get compiler optimizers right. Even if you build up a painstaking test
suite by hand, you will likely miss corner cases, especially corner cases at
the interactions of multiple components or multiple optimization passe...
Type-based alias analysis in the Toy Optimizer
Another entry in the Toy Optimizer series.
Last time, we did load-store forwarding in the context
of our Toy Optimizer. We managed to cache the results of both reads from and
writes to the heap—at compile-time!
We were careful to mind object aliasing: we separated our heap...
A multi-entry CFG design conundrum
Background and bytecode design
The ZJIT compiler compiles Ruby bytecode (YARV) to machine code. It starts by
transforming the stack machine bytecode into a high-level graph-based
intermediate representation called HIR.
We use a more or less typical1 control-flow graph (CFG...
Sorry for marking all the posts as unread
I noticed that the URLs were all a little off (had two slashes instead of one) and went in and fixed it. I did not think everyone's RSS software was going to freak out the way it did. PS: this is a special RSS-only post that is not visible on the site. Enjoy.