HighCommander4 wrote:

> It looks like this causes a significant compile-time regression: 
> https://llvm-compile-time-tracker.com/compare.php?from=2b855dd97092e2178ac5c470a804a17ec440d7e5&to=9ccde12f5eeb91152900082a2ae839e2a9702b31&stat=instructions:u
>  (Maybe most clearly seen during clang bootstrap, where this adds 0.5% to 
> many compilations: 
> https://llvm-compile-time-tracker.com/compare_clang.php?from=2b855dd97092e2178ac5c470a804a17ec440d7e5&to=9ccde12f5eeb91152900082a2ae839e2a9702b31&stat=instructions%3Au&sortBy=interestingness)
> 
> Is that expected?

I think it's at least conceivable, as the patch adds an extra branch to 
`CallExpr::getBeginLoc()`, which is likely to be called pretty frequently.

The branch is **not** taken most of the time (it's only taken for calls to 
functions with an explicit object argument, which is a C++23 feature), so 
perhaps annotating the branch as "unlikely" is sufficient to avoid the 
performance regression?

https://github.com/llvm/llvm-project/pull/117841
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to