[cfe-dev] Tips for speeding analysis up?

Vedran Vukotic Vedran.Vukotic at septentrio.com
Thu Oct 11 06:34:37 PDT 2012


Thank you very much for your kind response :)

I'll try that and see how much bugs we miss by doing so.

Kind regards,

Vedran

From: Anna Zaks [mailto:ganna at apple.com]
Sent: Wednesday, October 10, 2012 7:30 PM
To: Vedran Vukotic
Cc: cfe-dev at cs.uiuc.edu; Gustavo Lopez; Ted Kremenek; Jordan Rose
Subject: Re: [cfe-dev] Tips for speeding analysis up?

Vedran,

There are several low level options that one could use to speed up the analyzes (disable inter procedural analyzes, tell the analyzer to time out sooner,...). However, we do not recommend them. All of them are going to drop bugs found. The idea is that the current set of defaults is the optimal/recommended balance. The clang static analyzer is targeted at deeper checking - something you would run every day, not after every compile.

Said that, we do have a small set of non-path sensitive checks, which are rather fast - they are similar to compiler warnings, but could include stylistic checks or checks with a higher false positive rate. We do not currently have a mode to only enable those without the path-sensitive checking, but this definitely could be done.

Cheers,
Anna.

On Oct 10, 2012, at 1:49 AM, Vedran Vukotic <Vedran.Vukotic at septentrio.com<mailto:Vedran.Vukotic at septentrio.com>> wrote:


Hello,

I'm looking at Clang's analyzer as a replacement for Split (that we're currently using) and it really looks nice and promising. However, due to a relatively large code base the analysis takes really a lot of time (about 14 minutes compared to the 1 min for Splint) and it won't be possible to make the analysis every time a developer compile that code (as we did with Splint).

The analysis provided by Clang is really nice and we can certainly run it every few commits/hours/during the night, however I was looking if there is a way to speed it up (even on cost of bugs found) a bit to also have it at compilation time.

Right know, I made sure it's compiled as a release (and not debug version) and I also disabled deadstore, malloc and similar checks (I've noticed they were a little bit slower than other checks), html reports and I'm running it in the following way:

clang -cc1 -triple i386-pc-linux-gnu -analyze -disable-free -disable-llvm-verifier -analyzer-checker=core -analyzer-output plist -w -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.18.50.0.9 -momit-leaf-frame-pointer -resource-dir ../lib/clang/3.2 -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/local/include -internal-isystem  ../lib/clang/3.2/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir clang/rx2 -ferror-limit 3 -fmessage-length 115 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics

In this way it takes about 10 minutes to finish (still 10 times slower than Splint) that's still too much to run it every time the code is compiled :/

May I ask you if you might have any hints for speeding up the analysis a little bit?

Thank you,

Vedran



________________________________

This e-mail communication contains information that is confidential and may also be privileged. It is intended for the exclusive use of the addressees. If you are not the person or organization to whom it is addressed, you must not copy, distribute or take any action in reliance upon it. If you received this communication in error, please notify Septentrio nv immediately [ telephone +32 [0] 16 300800 ]. Septentrio nv will not accept liability for contractual commitments made by individuals employed by this company outside the scope of our business.
_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu<mailto:cfe-dev at cs.uiuc.edu>
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121011/bf30a38e/attachment.html>


More information about the cfe-dev mailing list