//===-- ScheduleDAGPrinter.cpp - Implement ScheduleDAG::viewGraph() -------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This implements the ScheduleDAG::viewGraph method. // //===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/Support/GraphWriter.h" #include "llvm/Support/raw_ostream.h" usingnamespacellvm; namespace llvm { template<> struct DOTGraphTraits<ScheduleDAG*> : public DefaultDOTGraphTraits { … }; } std::string DOTGraphTraits<ScheduleDAG*>::getNodeLabel(const SUnit *SU, const ScheduleDAG *G) { … } /// viewGraph - Pop up a ghostview window with the reachable parts of the DAG /// rendered using 'dot'. /// void ScheduleDAG::viewGraph(const Twine &Name, const Twine &Title) { … } /// Out-of-line implementation with no arguments is handy for gdb. void ScheduleDAG::viewGraph() { … }