]> granicus.if.org Git - clang/commit
[analyzer] Use a FoldingSet to cache simple RetainSummary instances, rather than...
authorJordy Rose <jediknil@belkadan.com>
Sun, 18 Mar 2012 01:26:10 +0000 (01:26 +0000)
committerJordy Rose <jediknil@belkadan.com>
Sun, 18 Mar 2012 01:26:10 +0000 (01:26 +0000)
commitef94588752babc1b7c46b955e57945fc4c183db2
tree2bc5c54cfdb0eb32c8757ac6ede960fc7306c567
parent957ff27311d444fb87b5b3acb6f44d5de4533b23
[analyzer] Use a FoldingSet to cache simple RetainSummary instances, rather than explicitly keeping DoNothing and StopTracking summaries and nothing else.

I tried to test the effects of this change on memory usage and run time, but what I saw on retain-release.m was indistinguishable from noise (debug and release builds). Even so, some caveman profiling showed 101 cache hits that we would have generated new summaries for before (i.e. not default or stop summaries), and the more code we analyze, the more memory we should save.

Maybe we should have a standard project for benchmarking the retain count checker's memory and time?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153007 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp