When should a compiler expand garbage collection barriers?

A friendlier visualization of Java's JIT compiler based on control flow