Subzero: Implement "second-chance bin-packing" for register allocation.

If a variable gets a register but is later evicted because of a higher-weight variable, there's a chance that the first variable could have been allocated a register if only its initial choice had been different.

To improve this, we keep track of which variables are evicted, and then allow register allocation to run again, focusing only on those once-evicted variables, and not changing any previous register assignments.

This can iterate until there are no more evictions.

This is more or less what the linear-scan literature describes as "second-chance bin-packing".

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4095
R=jpp@chromium.org

Review URL: https://codereview.chromium.org/1395693005 .
8 files changed