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.