This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Allow exploded graph dumps in release builds
ClosedPublic

Authored by steakhal on Apr 26 2022, 2:27 AM.

Details

Summary

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

binarysizesize after strip
clang103M83M
clang-tidy67M54M

after this change

binarysizesize after strip
clang103M84M
clang-tidy67M54M

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.

Diff Detail

Event Timeline

steakhal created this revision.Apr 26 2022, 2:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2022, 2:27 AM
steakhal requested review of this revision.Apr 26 2022, 2:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2022, 2:27 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
martong accepted this revision.Apr 26 2022, 5:27 AM

LGTM, thanks!

For the record, I am inserting the url of the issue:
https://github.com/llvm/llvm-project/issues/53873

This revision is now accepted and ready to land.Apr 26 2022, 5:27 AM
This revision was automatically updated to reflect the committed changes.