Process ghost instruction kills during coloring.
Ghost instructions don't generate code, but they can keep registers alive. The coloring pass needs to process values killed by ghost instructions so it knows when the registers are freed up. Also track register pressure changes from ghost kills in the spiller.
This commit is contained in:
@@ -129,9 +129,12 @@ impl<'a> Context<'a> {
|
||||
while let Some(inst) = pos.next_inst() {
|
||||
if let Some(constraints) = self.encinfo.operand_constraints(self.encodings[inst]) {
|
||||
self.visit_inst(inst, constraints, &mut pos, dfg, tracker);
|
||||
tracker.drop_dead(inst);
|
||||
self.process_spills(tracker);
|
||||
} else {
|
||||
let (_throughs, kills) = tracker.process_ghost(inst);
|
||||
self.free_regs(kills);
|
||||
}
|
||||
tracker.drop_dead(inst);
|
||||
self.process_spills(tracker);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user