TV: don't throw fatal error on timeout
MODIFY
tv/tv.cpp
tv/tv.cpp
@@ -344,7 +344,7 @@ struct TVPass : public llvm::FunctionPass {
if (Errors errs = verifier.verify()) {
cerr << "Transformation doesn't verify!\n" << errs << endl;
- if (FatalErrors)
+ if (FatalErrors && !errs.isTimeout())
llvm::report_fatal_error("Alive2: Transform doesn't verify; aborting!");
} else {
cerr << "Transformation seems to be correct!\n\n";

MODIFY
util/errors.cpp
util/errors.cpp
@@ -11,6 +11,14 @@ void Errors::add(string &&str) {
errs.emplace_back(str);
}
+bool Errors::isTimeout() const {
+ for (auto &err : errs) {
+ if (err != "Timeout")
+ return false;
+ }
+ return !errs.empty();
+}
+
ostream& operator<<(ostream &os, const Errors &errs) {
for (auto &err : errs.errs) {
os << "ERROR: " << err << '\n';

MODIFY
util/errors.h
util/errors.h
@@ -15,6 +15,7 @@ class Errors {
public:
void add(std::string &&str);
explicit operator bool() const { return !errs.empty(); }
+ bool isTimeout() const;
friend std::ostream& operator<<(std::ostream &os, const Errors &e);
};

TV: don't throw fatal error on timeout