function optimize (root: ?ASTElement, options: CompilerOptions) {
  if (!root) return
  isPlatformReservedTag = options.isReservedTag || no
  walk(root, true)
}
In SSR, the vdom tree is generated only once and never patched, so
we can optimize most element / trees into plain string render functions.
The SSR optimizer walks the AST tree to detect optimizable elements and trees.

The criteria for SSR optimizability is quite a bit looser than static tree
detection (which is designed for client re-render). In SSR we bail only for
components/slots/custom directives.