[llvm] [TypeProf][PGO]Skip vtable-based ICP for which type profiles are known to be unrepresentative (PR #110575)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 14:51:26 PDT 2024
================
@@ -132,6 +132,11 @@ static cl::opt<int> ICPMaxNumVTableLastCandidate(
"icp-max-num-vtable-last-candidate", cl::init(1), cl::Hidden,
cl::desc("The maximum number of vtable for the last candidate."));
+static cl::opt<std::string> ICPKnownUnrepresentativeVTables(
+ "icp-known-unrepresentative-vtables", cl::init(""), cl::Hidden,
----------------
snehasish wrote:
Do we need to make this option and the code (e.g. variable names, debug messages) specific to "profile unrepresentativeness"? Can we instead generalize it like naming the option "icp-ignore-vtables", the variable can be `DenseSet<StringRef> IgnoredBaseTypes` and so on?
I think the motivation is justified and can be mentioned in the comments and cl::desc but the implementation don't need to be. IMO this makes the code a little easier to read and follow. What do you think?
https://github.com/llvm/llvm-project/pull/110575
More information about the llvm-commits
mailing list