Loop Invariant Code Motion
Implemented behind the new -licm flag.
Hoists invariant arithmetic instructions from loop bodies to pre-headers.
Does not trigger for loops where headers have two incoming edges from
outside the loop.
Also enables multi block address optimization, because most of the
instructions hoisted are address calculations coming from gep.
Does not touch memory operations.
This algorithm does not seem to work well for load-hoisting.
BUG=none
R=jpp@chromium.org, stichnot@chromium.org
Review URL: https://codereview.chromium.org/2138443002 .
9 files changed