[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
Tue Oct 1 08:50:36 PDT 2024
================
@@ -2060,6 +2062,24 @@ bool parser<float>::parse(Option &O, StringRef ArgName, StringRef Arg,
return false;
}
+// parser<DenseSet<StringRef> implementation
+//
+void parser<DenseSet<StringRef>>::printOptionDiff(
+ const Option &O, const DenseSet<StringRef> &V,
+ OptionValue<DenseSet<StringRef>> D, size_t GlobalWidth) const {}
+
+bool parser<DenseSet<StringRef>>::parse(Option &O, StringRef ArgName,
+ StringRef Arg,
----------------
snehasish wrote:
Are you certain that the contents of `StringRef Arg` outlives the DenseSet<StringRef> returned? All the others above return the contents by value.
I would prefer a cl::opt<std::string> which is parsed and validated in the ICP pass. Is there an advantage to your proposed approach and are there any precedents in the codebase? IMO this option feels overly restrictive when rejecting duplicated strings from the user.
https://github.com/llvm/llvm-project/pull/110575
More information about the llvm-commits
mailing list