isuckatcs wrote:

> Consider downstream users that might use this reporting system and have their 
> own trackers. (We don't at Sonar, but pretend), then they would need to 
> remove one more unjust assert.

This is also a fair point, though as far as I know, LLVM doesn't keep API 
compatibility either between releases, so downstream users should expect that 
their code will need adjustments.

> Now we could save the cost for building a call stack, a comparison, a 
> conditional jump based on the result of the previous comparison and also the 
> deconstruction of the stack.

Actually a release build compiled with `-O2` or `-O3` should have this function 
inlined already, so the stack frame is not created. As for the others, I'm not 
sure if that will be a significant or even a measurable performance 
improvement. When it comes to speeding up execution, the rule of thumb is to 
always measure it though.

[D131707](https://reviews.llvm.org/D131707) is/was a patch, where improving 
runtime speed came up as a discussion too. It contains some points about 
performance bottlenecks in the analyzer, tips on how to get started with 
profiling, etc. If you're interested in such stuff, it might worth taking a 
look at.

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

Reply via email to