Lines Matching full:remark
29 Keys("args", cl::desc("Specify remark argument/s to count by."),
34 "Specify remark argument/s to count (accepts regular expressions)."),
37 RemarkNameOpt("remark-name",
38 cl::desc("Optional remark name to filter collection by."),
42 cl::desc("Optional remark pass name to filter collection by."),
46 "filter-arg-by", cl::desc("Optional remark arg to filter collection by."),
50 cl::desc("Optional remark name to filter collection by "
55 cl::desc("Optional remark arg to filter collection by "
60 cl::desc("Optional remark pass name to filter collection "
64 "remark-type", cl::desc("Optional remark type to filter collection by."),
78 clEnumValN(CountBy::REMARK, "remark-name",
79 "Counts individual remarks based on how many of the remark "
84 cl::init(CountBy::REMARK), cl::sub(CountSub));
90 "Display the count broken down by the filepath of each remark "
97 "the filepath info from the DebugLoc of the remark."),
103 /// Look for matching argument with \p Key in \p Remark and return the parsed
105 static unsigned getValForKey(StringRef Key, const Remark &Remark) {
106 auto *RemarkArg = find_if(Remark.Args, [&Key](const Argument &Arg) {
109 if (RemarkArg == Remark.Args.end())
127 bool Filters::filterRemark(const Remark &Remark) {
128 if (RemarkNameFilter && !RemarkNameFilter->match(Remark.RemarkName))
130 if (PassNameFilter && !PassNameFilter->match(Remark.PassName))
133 return *RemarkTypeFilter == Remark.RemarkType;
135 if (!any_of(Remark.Args,
150 auto &Remark = **MaybeRemark;
152 if (!Filter.filterRemark(Remark))
155 for (Argument Arg : Remark.Args)
168 std::optional<std::string> Counter::getGroupByKey(const Remark &Remark) {
171 return Remark.FunctionName.str();
176 if (!Remark.Loc.has_value())
180 return Remark.Loc->SourceFilePath.str() + ":" + Remark.FunctionName.str();
181 return Remark.Loc->SourceFilePath.str();
186 void ArgumentCounter::collect(const Remark &Remark) {
188 std::optional<std::string> GroupByKey = getGroupByKey(Remark);
195 auto Count = getValForKey(Key, Remark);
200 void RemarkCounter::collect(const Remark &Remark) {
201 if (std::optional<std::string> Key = getGroupByKey(Remark))
284 const Remark &Remark = **MaybeRemark;
285 if (Filter.filterRemark(Remark))
286 Counter.collect(Remark);
308 if (CountByOpt == CountBy::REMARK) {