DescriptionSubzero: 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
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=3607b6c924922d261cbc75b68e07a1e2a5aec5dc
Patch Set 1 #Patch Set 2 : Suppress stack offset defs for rematerialize variables in asm-verbose mode #
Total comments: 4
Patch Set 3 : Make the analysis loop more readable #
Messages
Total messages: 9 (2 generated)
|