Avoid identical invariant sub-expressions