DescriptionSubzero: Improve effectiveness of local register availability peephole.
X86 only. The register availability peephole optimization during lowering disallows available register substitution when the variable is pre-colored. This is for good reasons (too complex to be discussed here). However, that leaves some potential substitutions on the table.
Specifically, this happens a lot around register arguments to function calls, both at the call site and in the prolog.
The simplest solution seems to be to launder the pre-colored variable through a separate infinite-weight variable, as implemented in this CL through a combination of such copies and extra legalize() calls.
There are other situations where this technique can also work, which may be handled in a separate CL.
This CL also fixes a problem where the stack pointer adjustment in the prolog is subject to dead-code elimination if the function has no epilog. This would only happen in asm-verbose mode, in the final liveness analysis pass prior to code emission.
BUG= none
R=eholk@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=f531931fb45172157bc5816a8f55309556996dc7
Patch Set 1 #Patch Set 2 : Fix register pressure problem #Patch Set 3 : Fix comments. Implement for x86-32. #
Messages
Total messages: 6 (3 generated)
|