Build DAGs (basically find all the common subexpressions).
Must be done after all other optimizations, because most
of them depend on the trees being trees, not DAGs.
The general strategy is:
Compute available expressions (AEs)
For each block
stick together nodes that match, keeping AEs up to date
For each block
unstick unprofitable common subexpressions
(this is generally target-dependent)
Build DAGs (basically find all the common subexpressions). Must be done after all other optimizations, because most of them depend on the trees being trees, not DAGs. The general strategy is: Compute available expressions (AEs) For each block stick together nodes that match, keeping AEs up to date For each block unstick unprofitable common subexpressions (this is generally target-dependent)