This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] exploded-graph-rewriter: Implement manual graph trimming.
ClosedPublic

Authored by NoQ on Jul 26 2019, 12:42 PM.

Details

Summary

When -trim-egraph is unavailable (say, when you're debugging a crash on a real-world code that takes too long to reduce), it makes sense to view the untrimmed graph up to the crashing node's predecessor, then dump the ID (or a pointer) of the node in the attached debugger, and then trim the dumped graph in order to keep only paths from the root to the node.

Implement the last part of that plan. Now you can do:

$ exploded-graph-rewriter.py ExprEngine.dot --to 0x12229acd0

And it'll chop out the unnecessary chunks of the graph. You can also specify multiple nodes and you can specify nodes by stable IDs rather than by pointers.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ created this revision.Jul 26 2019, 12:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2019, 12:42 PM
Charusso accepted this revision.Jul 26 2019, 2:02 PM

It is a great idea, thanks!

clang/utils/analyzer/exploded-graph-rewriter.py
918 ↗(On Diff #211985)

Extra comma at (eg.,

989 ↗(On Diff #211985)

only display for consistency with the above arguments.

This revision is now accepted and ready to land.Jul 26 2019, 2:02 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2019, 4:05 PM