Keep dead EBB arguments around in LiveValueTracker::ebb_top().

Provide a drop_dead_args() function which deletes them instead.

We still need to assign a register to dead EBB arguments, so they can't
just be ignored.
This commit is contained in:
Jakob Stoklund Olesen
2017-05-11 11:25:35 -07:00
parent 9d4e23d894
commit d03a217466
3 changed files with 46 additions and 12 deletions

View File

@@ -435,6 +435,11 @@ impl Layout {
self.assign_inst_seq(inst);
}
/// Fetch an ebb's first instruction.
pub fn first_inst(&self, ebb: Ebb) -> Option<Inst> {
self.ebbs[ebb].first_inst.into()
}
/// Fetch an ebb's last instruction.
pub fn last_inst(&self, ebb: Ebb) -> Option<Inst> {
self.ebbs[ebb].last_inst.into()