[PATCH] D115946: [DAG] Directed Acyclic Graph - DOT printer test

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 20 07:14:35 PST 2021


bmahjour added inline comments.


================
Comment at: llvm/test/Other/print-dot-dag.ll:1
+; RUN: llc -fast-isel=false  -view-sched-dags < %s 2>&1 > /dev/null
+; RUN: FileCheck %s -input-file=main:entry.dot
----------------
xgupta wrote:
> @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.
> 
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115946/new/

https://reviews.llvm.org/D115946



More information about the llvm-commits mailing list