Subzero: Find rematerializable variables transitively.

There are situations where a variable is assigned as the result of a rematerializable alloca instruction, and then another variable is assigned as essentially a known-offset interior pointer into the alloca space.  In this case, the secondary variable is also rematerializable.

We add a pass, after alloca analysis, to find these derived variables and mark them transitively as rematerializable.  Because we lack use-def chains (or in fact any map to variable use locations), we need to iterate over the CFG until convergence.  Fortunately, this is pretty cheap, and not even done unless the alloca analysis seeds it with an initial set of rematerializable variables.

This analysis is only really needed for arithmetic instructions, but we also need to apply it to assignments and pointer-type bitcasts that are added when the IceConverter directly parses a .ll file rather than a .pexe file.

BUG= none
R=jpp@chromium.org, sehr@chromium.org

Review URL: https://codereview.chromium.org/1441793002 .
4 files changed