[PATCH] D30856: Remove opt-bisect support for "cases" in favor of debug counters
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 17:53:11 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL297542: Remove opt-bisect support for "cases" in favor of debug counters (authored by dannyb).
Changed prior to commit:
https://reviews.llvm.org/D30856?vs=91439&id=91445#toc
Repository:
rL LLVM
https://reviews.llvm.org/D30856
Files:
llvm/trunk/docs/OptBisect.rst
llvm/trunk/include/llvm/IR/OptBisect.h
llvm/trunk/lib/IR/OptBisect.cpp
Index: llvm/trunk/docs/OptBisect.rst
===================================================================
--- llvm/trunk/docs/OptBisect.rst
+++ llvm/trunk/docs/OptBisect.rst
@@ -189,12 +189,5 @@
Once the pass in which an incorrect transformation is performed has been
determined, it may be useful to perform further analysis in order to determine
-which specific transformation is causing the problem. Ideally all passes
-would be instrumented to allow skipping of individual transformations. This
-functionality is available through the OptBisect object but it is impractical
-to proactively instrument every existing pass. It is hoped that as developers
-find that they need a pass to be instrumented they will add the instrumentation
-and contribute it back to the LLVM source base.
-
-Helper functions will be added to simplify this level of instrumentation, but
-this work is not yet completed. For more information, contact Andy Kaylor.
+which specific transformation is causing the problem. Debug counters
+can be used for this purpose.
Index: llvm/trunk/include/llvm/IR/OptBisect.h
===================================================================
--- llvm/trunk/include/llvm/IR/OptBisect.h
+++ llvm/trunk/include/llvm/IR/OptBisect.h
@@ -51,24 +51,6 @@
template <class UnitT>
bool shouldRunPass(const Pass *P, const UnitT &U);
- /// Checks the bisect limit to determine if the optimization described by the
- /// /p Desc argument should run.
- ///
- /// This function will immediate return true if bisection is disabled. If the
- /// bisect limit is set to -1, the function will print a message with the
- /// bisect number assigned to the optimization along with the /p Desc
- /// description and return true. Otherwise, the function will print a message
- /// with the bisect number assigned to the optimization and indicating whether
- /// or not the pass will be run and return true if the bisect limit has not
- /// yet been exceded or false if it has.
- ///
- /// Passes may call this function to provide more fine grained control over
- /// individual optimizations performed by the pass. Passes which cannot be
- /// skipped entirely (such as non-optional code generation passes) may still
- /// call this function to control whether or not individual optional
- /// transformations are performed.
- bool shouldRunCase(const Twine &Desc);
-
private:
bool checkPass(const StringRef PassName, const StringRef TargetDesc);
Index: llvm/trunk/lib/IR/OptBisect.cpp
===================================================================
--- llvm/trunk/lib/IR/OptBisect.cpp
+++ llvm/trunk/lib/IR/OptBisect.cpp
@@ -39,14 +39,6 @@
<< "(" << 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 @@
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;
-}
-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30856.91445.patch
Type: text/x-patch
Size: 3500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170311/6eda335c/attachment-0001.bin>
More information about the llvm-commits
mailing list