AnonMiraj wrote:

Looks like the regression was caused by `areAllIgnored`.
It is really slow.

Even after I tried some optimizations for the function, I can't restore the 
original improvements.
(Looking the group up by `diag::Group` instead of by name, giving the 
`SmallVector` enough inline capacity to avoid a malloc per call, and stopping 
at the first enabled diagnostic instead of computing the highest severity of 
the whole group.) and i am still at +.15% regression

https://github.com/llvm/llvm-project/pull/206363/commits/11d4c47f19a7cae3dfd86ef29a3900c054ac6553
```cpp
   bool areAllIgnored(StringRef Group, SourceLocation Loc) const {
    llvm::SmallVector<diag::kind> diagsInGroup;
    bool Failed = Diags->getDiagnosticsInGroup(diag::Flavor::WarningOrError,
                                               Group, diagsInGroup);
    assert(!Failed && "Incorrect group name?");
    (void)Failed;
    return Diags->getDiagnosticListHighestSeverity(diagsInGroup, Loc, *this) ==
           diag::Severity::Ignored;
  }
```

CC @AaronBallman @erichkeane
Any advice?

https://github.com/llvm/llvm-project/pull/206363
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to