diff options
author | Chris Lattner <sabre@nondot.org> | 2006-06-13 03:10:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-06-13 03:10:48 +0000 |
commit | 9686ae7f4ea5f19ce77e31e64e0916db41a82662 (patch) | |
tree | 956f930211eeff054037c07267d14662bb4d862f /tools/bugpoint/bugpoint.cpp | |
parent | 81c01f0d2cab55e9bd2a723f1015e1cc06b314d2 (diff) | |
download | llvm-9686ae7f4ea5f19ce77e31e64e0916db41a82662.tar.gz llvm-9686ae7f4ea5f19ce77e31e64e0916db41a82662.tar.bz2 llvm-9686ae7f4ea5f19ce77e31e64e0916db41a82662.tar.xz |
Teach bugpoint to kill optimization passes that run over the timeout limit,
which allows it to debug optimizer infinite loops. This patch is contributed
by Nick Lewycky, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/bugpoint.cpp')
-rw-r--r-- | tools/bugpoint/bugpoint.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index 21a4623181..cc05fea650 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/tools/bugpoint/bugpoint.cpp @@ -36,6 +36,11 @@ static cl::list<std::string> InputFilenames(cl::Positional, cl::OneOrMore, cl::desc("<input llvm ll/bc files>")); +static cl::opt<unsigned> +TimeoutValue("timeout", cl::init(300), cl::value_desc("seconds"), + cl::desc("Number of seconds program is allowed to run before it " + "is killed (default is 300s), 0 disables timeout")); + // The AnalysesList is automatically populated with registered Passes by the // PassNameParser. // @@ -57,7 +62,7 @@ int main(int argc, char **argv) { sys::PrintStackTraceOnErrorSignal(); sys::SetInterruptFunction(BugpointInterruptFunction); - BugDriver D(argv[0],AsChild); + BugDriver D(argv[0],AsChild,TimeoutValue); if (D.addSources(InputFilenames)) return 1; D.addPasses(PassList.begin(), PassList.end()); |