This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] exploded-graph-rewriter: NFC: Replace explorers with trimmers.
ClosedPublic

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

Details

Summary

Explorers aren't the right abstraction. For the purposes of displaying svg files we don't care in which order do we explore the nodes. We may care about this for other analyses, but we're not there yet.

The function of cutting out chunks of the graph is performed poorly by the explorers, because querying predecessors/successors on the explored nodes yields original successors/predecessors even if they aren't being explored.

Introduce a new entity, "trimmers", that do one thing but to it right: cut out chunks of the graph. Trimmers mutate the graph, so stale edges aren't even visible to their consumers in the pipeline. Additionally, trimmers are intrinsically composable: multiple trimmers can be applied to the graph sequentially.

Refactor the single-path explorer into the single-path trimmer. Rename the test file for consistency.

Diff Detail

Repository
rL LLVM

Event Timeline

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

In my mind an explorer would trim me a graph so I like the new abstraction to differentiate the two. Thanks!

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

from the root. duplicated from the above line.

This revision is now accepted and ready to land.Jul 26 2019, 12:52 PM
NoQ marked an inline comment as done.Jul 26 2019, 12:55 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