Implement IR equivalence checker

This commit is contained in:
Jeehoon Kang
2020-06-10 22:27:54 +09:00
parent 6146714112
commit c2380efbb0
5 changed files with 265 additions and 38 deletions

View File

@@ -178,7 +178,7 @@ pub fn test_opt<P1: AsRef<Path>, P2: AsRef<Path>, O: Optimize<ir::TranslationUni
.expect("parse failed while parsing the output from implemented printer");
opt.optimize(&mut ir);
if ir != to {
if !ir.is_equiv(&to) {
stderr()
.lock()
.write_fmt(format_args!(