Add a liveness verifier.

The liveness verifier will check that the live ranges are consistent
with the function. It runs as part of the register allocation pipeline
when enable_verifier is set.

The initial implementation checks the live ranges, but not the
ISA-specific constraints and affinities.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-21 13:35:20 -07:00
parent c4b794f7cf
commit c5da572ebb
6 changed files with 220 additions and 23 deletions

View File

@@ -81,7 +81,7 @@ impl Context {
/// Run the register allocator.
pub fn regalloc(&mut self, isa: &TargetIsa) -> CtonResult {
self.regalloc
.run(isa, &mut self.func, &self.cfg, &self.domtree);
.run(isa, &mut self.func, &self.cfg, &self.domtree)?;
self.verify_if(isa)
}
}