Only save callee-saved registers that are used (#293)

* Only save callee-saved registers that are actually being used.

* Rename AllocatableSet to RegisterSet

* Style cleanup and small renames for readability.

* Adjust x86 prologue-epilogue test to account for callee-saved register optimization.

* Add more tests for prologue-epilogue optimizations.
This commit is contained in:
Tyler McMullen
2018-04-03 14:44:12 -07:00
committed by Dan Gohman
parent 0948ca9963
commit 775c674b38
15 changed files with 310 additions and 123 deletions

View File

@@ -92,7 +92,7 @@ impl TargetIsa for Isa {
abi::regclass_for_abi_type(ty)
}
fn allocatable_registers(&self, func: &ir::Function) -> regalloc::AllocatableSet {
fn allocatable_registers(&self, func: &ir::Function) -> regalloc::RegisterSet {
abi::allocatable_registers(func, &self.isa_flags)
}