Making Sense of State Pruning
summary
State pruning reduces BPF verifier path explosion and currently accounts for about 15% of the verifier by saving and comparing states at designated pruning points. Implementations include pruning-point selection, an RU list (recently used states), SCC and liveness analyses, and precise tracking for scalars; stack-slot pruning needs full range analysis so it’s harder. Heuristics (e.g. bounded-loop check: two jumps and eight instructions) evolved over a decade; tooling added includes live-register printing, verifier logs and tests that exposed printing points roughly every four instructions.
AI-written summary · about
chapters (15)
- 0:00Introduction to state pruning
- 1:48Path explosion problem
- 3:35Pruning points basics
- 7:12State pruning in action
- 9:02State equivalence explained
- 10:32Modern pruning heuristics
- 11:38Register liveness optimization
- 13:26How register liveness works
- 16:33Impact of liveness on pruning
- 18:01Stack slot liveness overview
- 19:24Precise tracking introduction
- 21:10Marking scalars for precision
- 23:59Backtracking precision marks
- 25:43State pruning evolution
- 27:26Q&A session
