From 8aa8dfe26a7b6f03c943c0f55a259e34eb58a408 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Tue, 26 Oct 2021 10:19:27 -0700 Subject: [PATCH] cranelift: in `test_compile` filetest, log disasm not clif With the old backends, this would log the lowered+legalized clif, but the log is useles now with the new backends. Logging the disasm is the new moral equivalent. --- cranelift/filetests/src/test_compile.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cranelift/filetests/src/test_compile.rs b/cranelift/filetests/src/test_compile.rs index c0115f3d47..0426e36710 100644 --- a/cranelift/filetests/src/test_compile.rs +++ b/cranelift/filetests/src/test_compile.rs @@ -44,12 +44,6 @@ impl SubTest for TestCompile { .compile(isa) .map_err(|e| crate::pretty_anyhow_error(&comp_ctx.func, e))?; - info!( - "Generated {} bytes of code:\n{}", - total_size, - comp_ctx.func.display() - ); - let disasm = comp_ctx .mach_compile_result .as_ref() @@ -57,6 +51,9 @@ impl SubTest for TestCompile { .disasm .as_ref() .unwrap(); + + info!("Generated {} bytes of code:\n{}", total_size, disasm); + run_filecheck(&disasm, context) } }