[cfe-commits] PATCH: Add statistics to the analysis based warnings and fix PR10183

Chandler Carruth chandlerc at google.com
Wed Jul 6 05:52:28 PDT 2011


On Wed, Jul 6, 2011 at 5:44 AM, Chandler Carruth <chandlerc at google.com>wrote:

> Hello,
>
> Here are cleaned up and hopefully close to (or completely) ready for commit
> patches to address PR10183.
>
> The first patch is the big one, and it wires up stats for the analysis
> parts of the compile. It's pretty minimal for now, and just covers the stuff
> that was obvious and that I needed to dig into the problem with
> -Wuninitialized in this PR. The second patch is then the actual fix to the
> PR. The fix is essentially just swapping a stack for a queue to move from
> depth-first to breadth-first. I've tried to make the enqueue relatively
> efficient, but its not as efficient as the stack. We could tune this by
> using a proper queue datastructure, but it already is a huge win.
>
> Comments welcome. I've attached the patch files and uploaded the patches to
> the codereview app:
> http://codereview.appspot.com/4631089/
> http://codereview.appspot.com/4673046/
>
> I'm still running some more numbers, but the results look fairly good for
> other inputs as well. I'm benchmarking compile times for gcc.c and for a
> selection of inputs from Clang and LLVM's codebase.
>

Initial results look good:
gcc.c -fsyntax-only -Wuninitialized time goes from 9.139s to 5.303s (40%
speedup)

However the PR10183 speedup wasn't as much as I had hoped. One of my "slow"
measurements must have been slowed down by something else. With the fix its
*only* about 75x faster, going from 80.7s to 1.0s. ;]

Will report on some source files which don't have nasty CFGs to contend with
soon...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110706/b8626af1/attachment.html>


More information about the cfe-commits mailing list