From 14f5c47c1d72b3f470acba02c46ec3e80ab59fea Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Sat, 11 Mar 2017 01:41:03 +0000 Subject: Remove opt-bisect support for "cases" in favor of debug counters Summary: Ths "cases" support was not quite finished, is unused, and is really just debug counters. (well, almost, debug counters are slightly more powerful, in that they can skip things at the start, too). Note, opt-bisect itself could also be implemented as a wrapper around debug counters, but not sure it's worth it ATM. I'll shove it on a todo list if we think it is. Reviewers: MatzeB, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30856 llvm-svn: 297542 --- llvm/lib/IR/OptBisect.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'llvm/lib/IR/OptBisect.cpp') diff --git a/llvm/lib/IR/OptBisect.cpp b/llvm/lib/IR/OptBisect.cpp index e9574ca8126..b670c817569 100644 --- a/llvm/lib/IR/OptBisect.cpp +++ b/llvm/lib/IR/OptBisect.cpp @@ -39,14 +39,6 @@ static void printPassMessage(const StringRef &Name, int PassNum, << "(" << PassNum << ") " << Name << " on " << TargetDesc << "\n"; } -static void printCaseMessage(int CaseNum, StringRef Msg, bool Running) { - if (Running) - errs() << "BISECT: running case ("; - else - errs() << "BISECT: NOT running case ("; - errs() << CaseNum << "): " << Msg << "\n"; -} - static std::string getDescription(const Module &M) { return "module (" + M.getName().str() + ")"; } @@ -108,13 +100,3 @@ bool OptBisect::checkPass(const StringRef PassName, printPassMessage(PassName, CurBisectNum, TargetDesc, ShouldRun); return ShouldRun; } - -bool OptBisect::shouldRunCase(const Twine &Msg) { - if (!BisectEnabled) - return true; - int CurFuelNum = ++LastBisectNum; - bool ShouldRun = (OptBisectLimit == -1 || CurFuelNum <= OptBisectLimit); - printCaseMessage(CurFuelNum, Msg.str(), ShouldRun); - return ShouldRun; -} - -- cgit v1.2.3