Search code examples
compiler-optimizationv8

Control optimization in V8's TurboFan


I'm studying some internals of V8's TurboFan and came across this slide: Original slide.

This diagram shows a branch that is removed during control optimization, resulting in a direct connection to a "Dead" node. However, the nodes x and y are not eliminated during this process.

Why are the nodes x and y retained after control reduction? Shouldn't they be removed as well since they seem to be part of the dead code?


Solution

  • The slide shows an intermediate step. Nodes depending on dead control will be removed.