static cl::opt<int> StackSafetyMaxIterations("stack-safety-max-iterations",
cl::init(20), cl::Hidden);
+static cl::opt<int> StackSafetyPrint("stack-safety-print", cl::init(0),
+ cl::Hidden);
+
namespace {
/// Rewrite an SCEV expression for a memory access address to an expression that
}
}
Info.reset(new InfoTy{createGlobalStackSafetyInfo(std::move(Functions))});
+ if (StackSafetyPrint)
+ print(errs());
}
return *Info;
}
StackSafetyGlobalInfo::StackSafetyGlobalInfo(
Module *M, std::function<const StackSafetyInfo &(Function &F)> GetSSI)
- : M(M), GetSSI(GetSSI) {}
+ : M(M), GetSSI(GetSSI) {
+ if (StackSafetyPrint > 1)
+ getInfo();
+}
StackSafetyGlobalInfo::StackSafetyGlobalInfo(StackSafetyGlobalInfo &&) =
default;