= CommonBlock <> is an optimization pass for the <> <>, invoked from <>. == Description It eliminates equivalent blocks in a <> function. The equivalence criteria requires blocks to have no arguments or statements and transfer via `Raise`, `Return`, or `Goto` of a single global variable. == Implementation * https://github.com/MLton/mlton/blob/master/mlton/ssa/common-block.fun[`common-block.fun`] == Details and Notes * Rewrites + ---- L_X () raise (global_Y) ---- + to + ---- L_X () L_Y' () ---- + and adds + ---- L_Y' () raise (global_Y) ---- + to the <> function. * Rewrites + ---- L_X () return (global_Y) ---- + to + ---- L_X () L_Y' () ---- + and adds + ---- L_Y' () return (global_Y) ---- + to the <> function. * Rewrites + ---- L_X () L_Z (global_Y) ---- + to + ---- L_X () L_Y' () ---- + and adds + ---- L_Y' () L_Z (global_Y) ---- + to the <> function. The <> pass rewrites all uses of `L_X` to `L_Y'` and drops `L_X`. For example, all uncaught `Overflow` exceptions in a <> function share the same raising block.