This is an archive of the discontinued LLVM Phabricator instance.

Introduce NewPM DOT printers for DomTree
ClosedPublic

Authored by DaniilSuchkov on Jan 4 2022, 3:18 PM.

Details

Summary

This patch adds a couple of NewPM function passes (dot-dom and dot-dom-only) that dump DomTree into .dot files.

Diff Detail

Event Timeline

DaniilSuchkov created this revision.Jan 4 2022, 3:18 PM
DaniilSuchkov requested review of this revision.Jan 4 2022, 3:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2022, 3:18 PM

Fixed formatting.

could you fix the lint checks and also add a test (a simple one is fine)

llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
186

probably better to make this not have a default argument

DaniilSuchkov marked an inline comment as done.Jan 5 2022, 12:13 PM

Fixed lint checks, added a couple of tests and addressed a comment.

aeubanks accepted this revision.Jan 5 2022, 1:37 PM
aeubanks added inline comments.
llvm/test/Analysis/Dominators/print-dot-dom.ll
1 ↗(On Diff #397672)

ideally the files would go in a temp directory (%t) rather than the cwd, but I think the cwd is in the build directory so this is probably fine

This revision is now accepted and ready to land.Jan 5 2022, 1:37 PM
DaniilSuchkov added inline comments.Jan 5 2022, 2:05 PM
llvm/test/Analysis/Dominators/print-dot-dom.ll
1 ↗(On Diff #397672)

but I think the cwd is in the build directory

Yeah, that's correct. There are other tests that do the same thing, like the test from https://reviews.llvm.org/D90638, and it seems to work fine.

This revision was landed with ongoing or failed builds.Jan 5 2022, 3:29 PM
This revision was automatically updated to reflect the committed changes.