This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Directed Acyclic Graph - DOT printer test
AbandonedPublic

Authored by xgupta on Dec 17 2021, 9:11 AM.

Details

Reviewers
bmahjour
Summary

This adds a test to check the formatting of the dot file produced when using -view-sched-dags.

Diff Detail

Event Timeline

xgupta created this revision.Dec 17 2021, 9:11 AM
xgupta published this revision for review.Dec 20 2021, 3:53 AM
xgupta added a reviewer: bmahjour.
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2021, 3:53 AM
xgupta added inline comments.Dec 20 2021, 3:56 AM
llvm/test/Other/print-dot-dag.ll
1

@bmahjour wanted to double-check, do I need to add another cl::opt option that lets me specify the filename? or there is already a way to write the CHECK line (like you did in D93949) in this test case as the filename seems non-deterministic.

bmahjour added inline comments.Dec 20 2021, 7:14 AM
llvm/test/Other/print-dot-dag.ll
1

The DDGPrinter uses the llvm::WriteGraph interface directly and passes in a filename. The SelectionDAGPrinter and ScheduleDAGPrinter use the llvm::ViewGraph interface which is meant for opening a pop-up window to display the graph. When using ViewGraph the .dot file is written into a temp file, and you cannot specify the temp file name.

Also note that the ScheduleDAG and SelectionDAG printers only work in debug builds.

xgupta abandoned this revision.Dec 20 2021, 7:55 AM
xgupta added inline comments.
llvm/test/Other/print-dot-dag.ll
1

Oh, thank you for the clarification. Now I understand why test case is not written for this yet.