Run the post-regalloc verification inside the regalloc context.
This means that we can verify the basics with verify_context before moving on to verifying the liveness information. Live ranges are now verified immediately after computing them and after register allocation is complete.
This commit is contained in:
@@ -54,7 +54,7 @@ impl Context {
|
||||
/// The `TargetIsa` argument is currently unused, but the verifier will soon be able to also
|
||||
/// check ISA-dependent constraints.
|
||||
pub fn verify<'a, ISA: Into<Option<&'a TargetIsa>>>(&self, _isa: ISA) -> verifier::Result {
|
||||
verifier::verify_context(self)
|
||||
verifier::verify_context(&self.func, &self.cfg, &self.domtree)
|
||||
}
|
||||
|
||||
/// Run the verifier only if the `enable_verifier` setting is true.
|
||||
@@ -81,7 +81,6 @@ 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)?;
|
||||
self.verify_if(isa)
|
||||
.run(isa, &mut self.func, &self.cfg, &self.domtree)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user