DescriptionSubzero: Consider all instruction variables for register preference.
The original code only looked at top-level source operands in the defining instruction, with a TODO to instead consider all inner variables in the instruction.
The primary reason is so that we end up with more instructions like
mov eax, eax
which are later elided as redundant assignments.
A secondary reason is to foster more instructions like:
mov ecx, [ecx]
rather than
mov eax, [ecx]
where ecx's live range ends. This hopefully keeps eax (in the latter case) free for longer and maybe allow some other variable to get a register. By considering all instruction variables, we enable this.
BUG= none
R=jpp@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=28b71be495bb1eada446ba36b5236914d79cea0e
Patch Set 1 #
Total comments: 13
Patch Set 2 : Code review changes #
Messages
Total messages: 6 (1 generated)
|