From d86a6f2211e58cb76f8dcdc0ffc7b9b9da6e68d3 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Wed, 29 Apr 2020 15:33:56 +0100 Subject: [PATCH] print_info: Print IR for A32 instructions --- tests/print_info.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/print_info.cpp b/tests/print_info.cpp index c8e17240..6a84bf7a 100644 --- a/tests/print_info.cpp +++ b/tests/print_info.cpp @@ -57,6 +57,15 @@ void PrintA32Instruction(u32 instruction) { fmt::print("should_continue: {}\n\n", should_continue); fmt::print("IR:\n"); fmt::print("{}\n", IR::DumpBlock(block)); + + Optimization::A32GetSetElimination(block); + Optimization::DeadCodeElimination(block); + Optimization::ConstantPropagation(block); + Optimization::DeadCodeElimination(block); + Optimization::IdentityRemovalPass(block); + + fmt::print("Optimized IR:\n"); + fmt::print("{}\n", IR::DumpBlock(block)); } void PrintA64Instruction(u32 instruction) { @@ -71,6 +80,7 @@ void PrintA64Instruction(u32 instruction) { fmt::print("{}\n", IR::DumpBlock(block)); Optimization::A64GetSetElimination(block); + Optimization::DeadCodeElimination(block); Optimization::ConstantPropagation(block); Optimization::DeadCodeElimination(block); Optimization::IdentityRemovalPass(block);