Skip to main content

WINDOW

Constant WINDOW 

Source
pub const WINDOW: usize = 16;
Expand description

How far a load is carried looking for the instruction that takes it in.

Measured over the corpus at -O2, which folds this many loads at each bound:

  1     2     4     8    16    32
852   858   863   864   865   865

Sixteen, because that is where the curve stops. Doubling it again finds nothing, and the pass still costs a fixed amount per instruction, which is what the bound is for.

The curve is that flat because of the rule about memory rather than because of anything the selector does. The load that folds is the last access to memory before the arithmetic, and almost always that is the instruction immediately in front of it. What the room past one buys is the thirteen where a register was written or a constant made in between.