[llvm] [OptBisect] Add function filtering support to opt-bisect (PR #222123)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 2 06:20:02 PDT 2026
================
@@ -86,15 +86,24 @@ static cl::list<std::string> OptDisablePasses(
}),
cl::desc("Optimization pass(es) to disable (comma-separated list)"));
+static cl::list<std::string> OptBisectFuncsList(
+ "opt-bisect-funcs", cl::value_desc("function names"), cl::CommaSeparated,
+ cl::cb<void, std::string>([](const std::string &FuncName) {
+ getOptBisector().setEnabledFunc(FuncName);
+ }),
+ cl::Hidden,
+ cl::desc("Only perform opt bisect for functions that are included in this "
+ "list and if empty, apply to all functions."));
----------------
nikic wrote:
And if the intent really is that opt-bisect-funcs disables optimizations on functions not in the list, should passes on those functions also be exluded from the bisect counter? Otherwise you'd have a lot of "useless" bisect numbers that would not actually affect the executed passes.
I'm just overall unclear on how this is going to get used.
https://github.com/llvm/llvm-project/pull/222123
More information about the llvm-commits
mailing list