[all-commits] [llvm/llvm-project] 5ce705: [analyzer] Allow exploded graph dumps in release b...

Balazs Benics via All-commits all-commits at lists.llvm.org
Mon May 2 02:42:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ce7050f701c6907cc2522fc43d39a8cbcc119d2
      https://github.com/llvm/llvm-project/commit/5ce7050f701c6907cc2522fc43d39a8cbcc119d2
  Author: Balazs Benics <balazs.benics at sigmatechnology.se>
  Date:   2022-05-02 (Mon, 02 May 2022)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    M clang/test/Analysis/dump_egraph.c
    M clang/test/Analysis/dump_egraph.cpp
    M clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp
    M clang/test/Analysis/exploded-graph-rewriter/escapes.c
    M clang/test/Analysis/exploded-graph-rewriter/initializers_under_construction.cpp
    M clang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp
    M clang/test/Analysis/exploded-graph-rewriter/macros.c
    M clang/test/Analysis/exploded-graph-rewriter/objects_under_construction.cpp
    M clang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp

  Log Message:
  -----------
  [analyzer] Allow exploded graph dumps in release builds

Historically, exploded graph dumps were disabled in non-debug builds.
It was done so probably because a regular user should not dump the
internal representation of the analyzer anyway and the dump methods
might introduce unnecessary binary size overhead.

It turns out some of the users actually want to dump this.

Note that e.g. `LiveExpressionsDumper`, `LiveVariablesDumper`,
`ControlDependencyTreeDumper` etc. worked previously, and they are
unaffected by this change.
However, `CFGViewer` and `CFGDumper` still won't work for a similar
reason. AFAIK only these two won't work after this change.

Addresses #53873

---

**baseline**

| binary | size | size after strip |
| clang | 103M | 83M |
| clang-tidy | 67M | 54M |

**after this change**

| binary | size | size after strip |
| clang | 103M | 84M |
| clang-tidy | 67M | 54M |

CMake configuration:
```
cmake -S llvm -GNinja -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
-DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_USE_LINKER=lld
-DLLVM_ENABLE_DUMP=OFF -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra"
-DLLVM_ENABLE_Z3_SOLVER=ON -DLLVM_TARGETS_TO_BUILD="X86"
```
Built by `clang-14.0.0`.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D124442




More information about the All-commits mailing list