Skeleton for an IRE EStatement statement optimizer.
Perform the optimization pass.
Perform the optimization pass. The caller may request that data chains not be updated,
whenever possible. (They may be updated internally by the optimizer, which has the final say
as to how and when DFA calculations should be run.)
The above means that data chains after running this method may or may not have been modified,
and may or may not be in a consistent state with the optimized CFG.
Note: in what scenario would you want when to use perform(false) ? one example is to optimize
performances when chain-calling optimizers in a master optimizer for example. TODO: describe
one scenario in detail.
||if true, update data chains according to the optimizer's policy; if false,
the optimizer should not perform final DFA computations if needed
- the number of optimizations performed; if negative, an error has occurred and the
optimizing process should be aborted
Attempt to optimize a statement. Sub-expressions may be examined. The implementor should not
attempt to modify parent or cousins expressions.
- the new (optimized) statement, or null if the statement could not be optimized