Track register pressure for dead EBB parameters.

The spiller wasn't tracking register pressure correctly for dead EBB
parameters in visit_ebb_header(). Make sure we free any dead EBB
parameters.

Fixes #223
This commit is contained in:
Jakob Stoklund Olesen
2018-01-17 12:39:10 -08:00
parent 5463fde203
commit 13af22b46b
5 changed files with 204 additions and 17 deletions

View File

@@ -160,9 +160,9 @@ impl LiveValueTracker {
/// been visited first.
///
/// Returns `(liveins, args)` as a pair of slices. The first slice is the set of live-in values
/// from the immediate dominator. The second slice is the set of `ebb` arguments that are live.
/// from the immediate dominator. The second slice is the set of `ebb` parameters.
///
/// Dead arguments with no uses are included in `args`. Call `drop_dead_args()` to remove them.
/// Dead parameters with no uses are included in `args`. Call `drop_dead_args()` to remove them.
pub fn ebb_top(
&mut self,
ebb: Ebb,
@@ -314,8 +314,8 @@ impl LiveValueTracker {
/// Drop any values that are marked as `is_dead`.
///
/// Use this after calling `ebb_top` to clean out dead EBB arguments.
pub fn drop_dead_args(&mut self) {
/// Use this after calling `ebb_top` to clean out dead EBB parameters.
pub fn drop_dead_params(&mut self) {
self.live.remove_dead_values();
}