Add a 'clear()' function to Context.

This includes adding `clear()` functions to its (transitive) members.
This commit is contained in:
Dan Gohman
2017-11-15 10:49:32 -08:00
parent 4c829f7c7f
commit 4d9aedbaca
10 changed files with 85 additions and 2 deletions

View File

@@ -70,6 +70,12 @@ impl Spilling {
}
}
/// Clear all data structures in this spilling pass.
pub fn clear(&mut self) {
self.spills.clear();
self.reg_uses.clear();
}
/// Run the spilling algorithm over `func`.
pub fn run(
&mut self,