opt tv plugin: fix -save-ir for non-batched mode
MODIFY
tools/alive-tv.cpp
tools/alive-tv.cpp
@@ -196,8 +196,6 @@ end:
if (opt_smt_stats)
smt::solver_print_stats(*out);
- smt_init.reset();
-
if (opt_alias_stats)
IR::Memory::printAliasStats(*out);

MODIFY
tv/tv.cpp
tv/tv.cpp
@@ -736,7 +736,9 @@ llvmGetPassPluginInfo() {
runTVPass(*const_cast<llvm::Function*>((*L)->getHeader()
->getParent()));
} else {
- runTVPass(*const_cast<llvm::Module*>(unwrapModule(IR)));
+ auto *M = unwrapModule(IR);
+ saveBitcode(M);
+ runTVPass(*const_cast<llvm::Module*>(M));
}
}
};

opt tv plugin: fix -save-ir for non-batched mode