Include ISA-specific information in verifier errors.
When the test driver reports a verifier error, make sure to include the TargetIsa when printing the failing function.
This commit is contained in:
@@ -43,7 +43,7 @@ impl SubTest for TestLegalizer {
|
||||
comp_ctx.flowgraph();
|
||||
comp_ctx
|
||||
.legalize(isa)
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, e))?;
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, e))?;
|
||||
|
||||
let mut text = String::new();
|
||||
write!(&mut text, "{}", &comp_ctx.func.display(Some(isa)))
|
||||
|
||||
@@ -41,7 +41,7 @@ impl SubTest for TestLICM {
|
||||
comp_ctx.flowgraph();
|
||||
comp_ctx
|
||||
.licm()
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, e))?;
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, e))?;
|
||||
|
||||
let mut text = String::new();
|
||||
write!(&mut text, "{}", &comp_ctx.func)
|
||||
|
||||
@@ -48,10 +48,10 @@ impl SubTest for TestRegalloc {
|
||||
// TODO: Should we have an option to skip legalization?
|
||||
comp_ctx
|
||||
.legalize(isa)
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, e))?;
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, e))?;
|
||||
comp_ctx
|
||||
.regalloc(isa)
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, e))?;
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, e))?;
|
||||
|
||||
let mut text = String::new();
|
||||
write!(&mut text, "{}", &comp_ctx.func.display(Some(isa)))
|
||||
|
||||
@@ -118,7 +118,7 @@ fn run_one_test<'a>(tuple: (&'a SubTest, &'a Flags, Option<&'a TargetIsa>),
|
||||
// Should we run the verifier before this test?
|
||||
if !context.verified && test.needs_verifier() {
|
||||
verify_function(&func, isa)
|
||||
.map_err(|e| pretty_verifier_error(&func, e))?;
|
||||
.map_err(|e| pretty_verifier_error(&func, isa, e))?;
|
||||
context.verified = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ impl SubTest for TestSimpleGVN {
|
||||
comp_ctx.flowgraph();
|
||||
comp_ctx
|
||||
.simple_gvn()
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, e))?;
|
||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, e))?;
|
||||
|
||||
let mut text = String::new();
|
||||
write!(&mut text, "{}", &comp_ctx.func)
|
||||
|
||||
Reference in New Issue
Block a user